diff --git a/godot/maps/textures/str_metalflr3.png.import b/godot/maps/textures/str_metalflr3.png.import index 5e81077..65fae7b 100644 --- a/godot/maps/textures/str_metalflr3.png.import +++ b/godot/maps/textures/str_metalflr3.png.import @@ -3,19 +3,20 @@ importer="texture" type="CompressedTexture2D" uid="uid://cox27erh4uq28" -path="res://.godot/imported/str_metalflr3.png-db3d8c40da647ad915fa1b22fce3ffd4.ctex" +path.s3tc="res://.godot/imported/str_metalflr3.png-db3d8c40da647ad915fa1b22fce3ffd4.s3tc.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc"], +"vram_texture": true } [deps] source_file="res://maps/textures/str_metalflr3.png" -dest_files=["res://.godot/imported/str_metalflr3.png-db3d8c40da647ad915fa1b22fce3ffd4.ctex"] +dest_files=["res://.godot/imported/str_metalflr3.png-db3d8c40da647ad915fa1b22fce3ffd4.s3tc.ctex"] [params] -compress/mode=0 +compress/mode=2 compress/high_quality=false compress/lossy_quality=0.7 compress/uastc_level=0 @@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -37,4 +38,4 @@ process/normal_map_invert_y=false process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 -detect_3d/compress_to=1 +detect_3d/compress_to=0 diff --git a/godot/maps/textures/str_metalflr8.png.import b/godot/maps/textures/str_metalflr8.png.import index 16f7345..96fec26 100644 --- a/godot/maps/textures/str_metalflr8.png.import +++ b/godot/maps/textures/str_metalflr8.png.import @@ -3,19 +3,20 @@ importer="texture" type="CompressedTexture2D" uid="uid://drdl2mbqb5okx" -path="res://.godot/imported/str_metalflr8.png-8c7a73422910961fddcab67d4ec776e6.ctex" +path.s3tc="res://.godot/imported/str_metalflr8.png-8c7a73422910961fddcab67d4ec776e6.s3tc.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc"], +"vram_texture": true } [deps] source_file="res://maps/textures/str_metalflr8.png" -dest_files=["res://.godot/imported/str_metalflr8.png-8c7a73422910961fddcab67d4ec776e6.ctex"] +dest_files=["res://.godot/imported/str_metalflr8.png-8c7a73422910961fddcab67d4ec776e6.s3tc.ctex"] [params] -compress/mode=0 +compress/mode=2 compress/high_quality=false compress/lossy_quality=0.7 compress/uastc_level=0 @@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -37,4 +38,4 @@ process/normal_map_invert_y=false process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 -detect_3d/compress_to=1 +detect_3d/compress_to=0 diff --git a/godot/maps/textures/str_metalgrbl3.png.import b/godot/maps/textures/str_metalgrbl3.png.import index 0944f43..6725e3a 100644 --- a/godot/maps/textures/str_metalgrbl3.png.import +++ b/godot/maps/textures/str_metalgrbl3.png.import @@ -3,19 +3,20 @@ importer="texture" type="CompressedTexture2D" uid="uid://bl4vie7uwsri" -path="res://.godot/imported/str_metalgrbl3.png-e3eb428045ed48142ddcfe47e5c2ddf3.ctex" +path.s3tc="res://.godot/imported/str_metalgrbl3.png-e3eb428045ed48142ddcfe47e5c2ddf3.s3tc.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc"], +"vram_texture": true } [deps] source_file="res://maps/textures/str_metalgrbl3.png" -dest_files=["res://.godot/imported/str_metalgrbl3.png-e3eb428045ed48142ddcfe47e5c2ddf3.ctex"] +dest_files=["res://.godot/imported/str_metalgrbl3.png-e3eb428045ed48142ddcfe47e5c2ddf3.s3tc.ctex"] [params] -compress/mode=0 +compress/mode=2 compress/high_quality=false compress/lossy_quality=0.7 compress/uastc_level=0 @@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -37,4 +38,4 @@ process/normal_map_invert_y=false process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 -detect_3d/compress_to=1 +detect_3d/compress_to=0 diff --git a/godot/maps/textures/str_metalpan8.png.import b/godot/maps/textures/str_metalpan8.png.import index 66c761a..2653695 100644 --- a/godot/maps/textures/str_metalpan8.png.import +++ b/godot/maps/textures/str_metalpan8.png.import @@ -3,19 +3,20 @@ importer="texture" type="CompressedTexture2D" uid="uid://bhxk5pmugja2l" -path="res://.godot/imported/str_metalpan8.png-eba6b499e686b10431a4b63f54205a08.ctex" +path.s3tc="res://.godot/imported/str_metalpan8.png-eba6b499e686b10431a4b63f54205a08.s3tc.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc"], +"vram_texture": true } [deps] source_file="res://maps/textures/str_metalpan8.png" -dest_files=["res://.godot/imported/str_metalpan8.png-eba6b499e686b10431a4b63f54205a08.ctex"] +dest_files=["res://.godot/imported/str_metalpan8.png-eba6b499e686b10431a4b63f54205a08.s3tc.ctex"] [params] -compress/mode=0 +compress/mode=2 compress/high_quality=false compress/lossy_quality=0.7 compress/uastc_level=0 @@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -37,4 +38,4 @@ process/normal_map_invert_y=false process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 -detect_3d/compress_to=1 +detect_3d/compress_to=0 diff --git a/godot/maps/textures/str_rotwoodgen3.png.import b/godot/maps/textures/str_rotwoodgen3.png.import index d8d373c..365f291 100644 --- a/godot/maps/textures/str_rotwoodgen3.png.import +++ b/godot/maps/textures/str_rotwoodgen3.png.import @@ -3,19 +3,20 @@ importer="texture" type="CompressedTexture2D" uid="uid://dfmfvmgbi1wff" -path="res://.godot/imported/str_rotwoodgen3.png-1a246be62dcef3636e849a647d198fc7.ctex" +path.s3tc="res://.godot/imported/str_rotwoodgen3.png-1a246be62dcef3636e849a647d198fc7.s3tc.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc"], +"vram_texture": true } [deps] source_file="res://maps/textures/str_rotwoodgen3.png" -dest_files=["res://.godot/imported/str_rotwoodgen3.png-1a246be62dcef3636e849a647d198fc7.ctex"] +dest_files=["res://.godot/imported/str_rotwoodgen3.png-1a246be62dcef3636e849a647d198fc7.s3tc.ctex"] [params] -compress/mode=0 +compress/mode=2 compress/high_quality=false compress/lossy_quality=0.7 compress/uastc_level=0 @@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -37,4 +38,4 @@ process/normal_map_invert_y=false process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 -detect_3d/compress_to=1 +detect_3d/compress_to=0 diff --git a/rust/src/game/opts.rs b/rust/src/game/opts.rs index 759bbe5..084794e 100644 --- a/rust/src/game/opts.rs +++ b/rust/src/game/opts.rs @@ -22,6 +22,11 @@ impl Default for GameOptions { opts.insert(GameOption::GoalsNeededToWin, GameOptionValue::Number(5.)); opts.insert(GameOption::RespawnTimer, GameOptionValue::Number(5.)); opts.insert(GameOption::SpawnProtection, GameOptionValue::Number(3.)); + opts.insert( + GameOption::TelegrenadesAllowed, + GameOptionValue::Boolean(true), + ); + opts.insert(GameOption::PickupsAllowed, GameOptionValue::Boolean(true)); Self { values: opts, teams: Vec::new(), @@ -60,6 +65,10 @@ impl GameOptions { } pub fn is_team_true(&self, team: u8, opt: GameOption) -> bool { + if !self.is_true(opt) { + return false; + } + if let Some(opts) = self.teams.get(team as usize) { let opt = opts .values diff --git a/rust/src/pickup.rs b/rust/src/pickup.rs index fcc6a29..0e4a1a0 100644 --- a/rust/src/pickup.rs +++ b/rust/src/pickup.rs @@ -5,7 +5,10 @@ use godot::{ use serde::{Deserialize, Serialize}; use crate::{ - game::Game, map::Map, net::network_manager::NetworkManager, player::IPlayer, + game::{Game, opts::GameOption}, + map::Map, + net::network_manager::NetworkManager, + player::IPlayer, replay::StandaloneReplayManager, }; @@ -145,10 +148,16 @@ impl PickupCommon for T { if let Some(game) = &mut Game::singleton() && let Ok(player) = collider.try_dynify::() { - game.bind_mut().on_pickup( - self.id().unwrap_or(0), - player.dyn_bind().get_player_id().unwrap_or(0), - ); + if game.bind().opts.is_team_true( + game.bind() + .get_player_team(player.dyn_bind().get_player_id().unwrap_or(0)), + GameOption::PickupsAllowed, + ) { + game.bind_mut().on_pickup( + self.id().unwrap_or(0), + player.dyn_bind().get_player_id().unwrap_or(0), + ); + } } } }