From 4c8a152ca56086c1f22fb629035bb6a30bc3e78d Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 17 Sep 2025 17:18:28 +0200 Subject: [PATCH] Fixed Cooldowns changing when trying to pick up items --- enemies/ghost animation/Ghost 1.png.import | 6 ++++++ enemies/ghost animation/Ghost 2.png.import | 6 ++++++ enemies/ghost animation/Ghost 3.png.import | 6 ++++++ enemies/ghost animation/Ghost 4.png.import | 6 ++++++ enemies/ghost animation/Ghost 5.png.import | 6 ++++++ enemies/ghost.tscn | 2 +- items/active_item.gd | 4 ++++ items/bow.gd | 5 ++--- items/updash.gd | 3 +-- player/player.tscn | 1 + player/sword.tscn | 1 + .../Background Prototype Layer 1.png.import | 6 ++++++ .../Background Prototype Layer 2.png.import | 6 ++++++ .../Background Prototype Layer 3.png.import | 6 ++++++ .../Background Prototype Layer 4.png.import | 6 ++++++ world/Background prototype.png.import | 6 ++++++ 16 files changed, 70 insertions(+), 6 deletions(-) diff --git a/enemies/ghost animation/Ghost 1.png.import b/enemies/ghost animation/Ghost 1.png.import index 305b740..b1d0f88 100644 --- a/enemies/ghost animation/Ghost 1.png.import +++ b/enemies/ghost animation/Ghost 1.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Ghost 1.png-43131954ed622829dc5453ddf6a96b4c. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/enemies/ghost animation/Ghost 2.png.import b/enemies/ghost animation/Ghost 2.png.import index 4ee80ea..87f2b9b 100644 --- a/enemies/ghost animation/Ghost 2.png.import +++ b/enemies/ghost animation/Ghost 2.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Ghost 2.png-67077adaa01a71a5c0b85fac254bdf8e. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/enemies/ghost animation/Ghost 3.png.import b/enemies/ghost animation/Ghost 3.png.import index 932de75..5d4f743 100644 --- a/enemies/ghost animation/Ghost 3.png.import +++ b/enemies/ghost animation/Ghost 3.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Ghost 3.png-18da238556f83c92715d2db31a14d159. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/enemies/ghost animation/Ghost 4.png.import b/enemies/ghost animation/Ghost 4.png.import index 8c6d724..1ac4e37 100644 --- a/enemies/ghost animation/Ghost 4.png.import +++ b/enemies/ghost animation/Ghost 4.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Ghost 4.png-45ba6df3ef207a5eff72f5f0036139d6. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/enemies/ghost animation/Ghost 5.png.import b/enemies/ghost animation/Ghost 5.png.import index 98ac10c..c47e6e7 100644 --- a/enemies/ghost animation/Ghost 5.png.import +++ b/enemies/ghost animation/Ghost 5.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Ghost 5.png-08f0125e59cfd0173a5d36d75efeae60. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/enemies/ghost.tscn b/enemies/ghost.tscn index be29f28..fd386d9 100644 --- a/enemies/ghost.tscn +++ b/enemies/ghost.tscn @@ -9,7 +9,7 @@ [node name="Ghost" type="Area2D"] z_index = 1 -scale = Vector2(0.4, 0.4) +scale = Vector2(0.8, 0.8) collision_layer = 0 collision_mask = 4 script = ExtResource("1_6attn") diff --git a/items/active_item.gd b/items/active_item.gd index 746b915..7a77194 100644 --- a/items/active_item.gd +++ b/items/active_item.gd @@ -5,10 +5,14 @@ class_name ActiveItem extends Item func collect() -> bool: if (player.active_item == null): player.active_item = self + actually_collect() return true return false +func actually_collect(): + pass + func activate(): assert(false) diff --git a/items/bow.gd b/items/bow.gd index 0affe74..cfb25fd 100644 --- a/items/bow.gd +++ b/items/bow.gd @@ -2,9 +2,8 @@ extends ActiveItem @export var cooldown = 1 @export var arrow_scene : PackedScene -func collect(): - player.set_cooldown(cooldown) - return super.collect() +func actually_collect(): + player.set_cooldown(cooldown) func activate(): diff --git a/items/updash.gd b/items/updash.gd index ac8989a..cd11831 100644 --- a/items/updash.gd +++ b/items/updash.gd @@ -1,9 +1,8 @@ extends ActiveItem var cooldown = 10 -func collect(): +func actually_collect(): player.set_cooldown(cooldown) - return super.collect() func activate(): diff --git a/player/player.tscn b/player/player.tscn index a28016f..e1a7dea 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -58,6 +58,7 @@ frame_progress = 0.433977 [node name="EarthAligner" parent="." instance=ExtResource("3_i3pqv")] [node name="Sword" parent="." instance=ExtResource("4_yw30f")] +position = Vector2(0, -1.9999999) [node name="ActiveItemCooldown" type="Timer" parent="."] one_shot = true diff --git a/player/sword.tscn b/player/sword.tscn index 355a79d..14a7e43 100644 --- a/player/sword.tscn +++ b/player/sword.tscn @@ -17,6 +17,7 @@ animations = [{ }] [node name="Sword" type="Area2D"] +scale = Vector2(1.8, 1.8) collision_mask = 2 script = ExtResource("1_hv1tj") diff --git a/world/Background Prototype/Background Prototype Layer 1.png.import b/world/Background Prototype/Background Prototype Layer 1.png.import index 3291c4a..2b3265d 100644 --- a/world/Background Prototype/Background Prototype Layer 1.png.import +++ b/world/Background Prototype/Background Prototype Layer 1.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Background Prototype Layer 1.png-47bb54b6d20a compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/world/Background Prototype/Background Prototype Layer 2.png.import b/world/Background Prototype/Background Prototype Layer 2.png.import index 7415d89..f18ed3b 100644 --- a/world/Background Prototype/Background Prototype Layer 2.png.import +++ b/world/Background Prototype/Background Prototype Layer 2.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Background Prototype Layer 2.png-ab86220f0fff compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/world/Background Prototype/Background Prototype Layer 3.png.import b/world/Background Prototype/Background Prototype Layer 3.png.import index 7399a52..816fbed 100644 --- a/world/Background Prototype/Background Prototype Layer 3.png.import +++ b/world/Background Prototype/Background Prototype Layer 3.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Background Prototype Layer 3.png-5a49ea16a5dc compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/world/Background Prototype/Background Prototype Layer 4.png.import b/world/Background Prototype/Background Prototype Layer 4.png.import index 6ff53ad..b465008 100644 --- a/world/Background Prototype/Background Prototype Layer 4.png.import +++ b/world/Background Prototype/Background Prototype Layer 4.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Background Prototype Layer 4.png-ee5791549e67 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/world/Background prototype.png.import b/world/Background prototype.png.import index c64e0d8..e719aee 100644 --- a/world/Background prototype.png.import +++ b/world/Background prototype.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Background prototype.png-82410769bb8789c49aff compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false