From 15bd5e998243974957c417e9f831a8874cbe3632 Mon Sep 17 00:00:00 2001 From: Zenny Date: Sat, 25 Apr 2026 16:06:59 -0700 Subject: [PATCH] Fix elemental damage fx, fix dialogue error --- .../01. sproingy/SproingyModelView.tscn | 4 -- .../02. michael/MichaelModelView.tscn | 4 -- .../03. filth_eater/FilthEaterModelView.tscn | 4 -- .../05. ballos/BallosModelView.tscn | 4 -- .../06. Planter/PlanterModelView.tscn | 3 -- .../07. chinthe/ChintheModelView.tscn | 5 --- .../08a. Ambassador/AmbassadorModelView.tscn | 4 -- .../AmbassadorSmallModelView.tscn | 4 -- .../AmbassadorSteelModelView.tscn | 4 -- .../09. Agni/AgniDemonModelView.tscn | 4 -- .../enemy_types/11. Palan/PalanModelView.tscn | 4 -- .../12. Shield of Heaven/ShieldModelView.tscn | 5 --- .../GoldSproingyModelView.tscn | 3 -- .../9b. Aqueos Demon/AqueosModelView.tscn | 4 -- Zennysoft.Game.Ma/src/npc/Npc.cs | 42 +++++++++---------- 15 files changed, 21 insertions(+), 77 deletions(-) diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn index 4e6c115d..7de1dbf1 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn @@ -3973,28 +3973,24 @@ libraries = { [node name="WindHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/MichaelModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/MichaelModelView.tscn index e8ed7acf..b4938418 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/MichaelModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/MichaelModelView.tscn @@ -4504,28 +4504,24 @@ libraries = { [node name="WindHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn index b77000aa..1d7ba1b6 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn @@ -5765,28 +5765,24 @@ libraries = { [node name="WindHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/BallosModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/BallosModelView.tscn index 6d6d2893..4a5228a0 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/BallosModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/BallosModelView.tscn @@ -4775,14 +4775,12 @@ libraries = { [node name="RustHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="HolyHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -4801,14 +4799,12 @@ libraries = { [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/06. Planter/PlanterModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/06. Planter/PlanterModelView.tscn index e7762c69..b1df093d 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/06. Planter/PlanterModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/06. Planter/PlanterModelView.tscn @@ -5454,14 +5454,12 @@ libraries = { [node name="WindHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -5474,7 +5472,6 @@ libraries = { [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/ChintheModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/ChintheModelView.tscn index 3a11a3c5..af8fa48e 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/ChintheModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/ChintheModelView.tscn @@ -6811,7 +6811,6 @@ libraries = { [node name="RustHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -6824,28 +6823,24 @@ libraries = { [node name="WindHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/AmbassadorModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/AmbassadorModelView.tscn index 03cc8d18..7e58fc63 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/AmbassadorModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/AmbassadorModelView.tscn @@ -5392,7 +5392,6 @@ libraries = { [node name="RustHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -5411,21 +5410,18 @@ libraries = { [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/08b. Ambassador (red)/AmbassadorSmallModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/08b. Ambassador (red)/AmbassadorSmallModelView.tscn index 3da8c3bf..6f38ca2e 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/08b. Ambassador (red)/AmbassadorSmallModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/08b. Ambassador (red)/AmbassadorSmallModelView.tscn @@ -5351,7 +5351,6 @@ libraries = { [node name="RustHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -5370,21 +5369,18 @@ libraries = { [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/08c. Ambassador (steel)/AmbassadorSteelModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/08c. Ambassador (steel)/AmbassadorSteelModelView.tscn index 9feb4301..94bd0653 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/08c. Ambassador (steel)/AmbassadorSteelModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/08c. Ambassador (steel)/AmbassadorSteelModelView.tscn @@ -5461,7 +5461,6 @@ libraries = { [node name="RustHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -5474,14 +5473,12 @@ libraries = { [node name="WindHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -5494,7 +5491,6 @@ libraries = { [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agni/AgniDemonModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agni/AgniDemonModelView.tscn index 8561dd82..12128b86 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agni/AgniDemonModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agni/AgniDemonModelView.tscn @@ -5434,7 +5434,6 @@ libraries = { [node name="RustHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -5453,21 +5452,18 @@ libraries = { [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/PalanModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/PalanModelView.tscn index 47af6659..9269c240 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/PalanModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/PalanModelView.tscn @@ -5630,7 +5630,6 @@ libraries = { [node name="RustHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -5649,21 +5648,18 @@ libraries = { [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldModelView.tscn index 63c4c76d..d97401cb 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldModelView.tscn @@ -6742,7 +6742,6 @@ libraries = { [node name="RustHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -6755,28 +6754,24 @@ libraries = { [node name="WindHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn index 2d072a8d..9271ce56 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn @@ -3925,21 +3925,18 @@ libraries = { [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosModelView.tscn index a3fd7207..eb35ae37 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosModelView.tscn @@ -5371,7 +5371,6 @@ libraries = { [node name="RustHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } @@ -5390,21 +5389,18 @@ libraries = { [node name="WaterHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="CurseHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } [node name="EarthHitAnimation" type="AnimationPlayer" parent="VFXAnimations"] unique_name_in_owner = true -root_node = NodePath("../../Secondary Animation Player") libraries = { &"": SubResource("AnimationLibrary_0tqwp") } diff --git a/Zennysoft.Game.Ma/src/npc/Npc.cs b/Zennysoft.Game.Ma/src/npc/Npc.cs index f93bbf05..b4e84ae5 100644 --- a/Zennysoft.Game.Ma/src/npc/Npc.cs +++ b/Zennysoft.Game.Ma/src/npc/Npc.cs @@ -22,50 +22,50 @@ public partial class Npc : Node3D public void OnReady() { - SetPhysicsProcess(true); - DialogueZone.BodyEntered += DialogueZone_BodyEntered; - DialogueZone.BodyExited += DialogueZone_BodyExited; - DialogueExitZone.BodyExited += DialogueExitZone_BodyExited; - Hitbox.AreaEntered += Hitbox_AreaEntered; + SetPhysicsProcess(true); + DialogueZone.BodyEntered += DialogueZone_BodyEntered; + DialogueZone.BodyExited += DialogueZone_BodyExited; + DialogueExitZone.BodyExited += DialogueExitZone_BodyExited; + Hitbox.AreaEntered += Hitbox_AreaEntered; } private void Hitbox_AreaEntered(Area3D area) { - if (area.GetOwner() is ThrownItem thrownItem) - { - DialogueController.ShowDialogue(Dialogue, "get_item"); - thrownItem.QueueFree(); - } + if (area.GetOwner() is ThrownItem thrownItem) + { + DialogueController.ShowDialogue(Dialogue, "get_item"); + thrownItem.QueueFree(); + } } private void DialogueZone_BodyExited(Node3D body) { - _isInDialogueZone = false; + _isInDialogueZone = false; } private void DialogueExitZone_BodyExited(Node3D body) { - DialogueController.Interrupt(); + DialogueController.Interrupt(); } private void DialogueZone_BodyEntered(Node3D body) { - _isInDialogueZone = true; + _isInDialogueZone = true; } public override void _Input(InputEvent @event) { - if (@event.IsActionPressed(GameInputs.Interact) && _isInDialogueZone) - { - DialogueController.ShowDialogue(Dialogue, "general"); - } + if (Dialogue != null && @event.IsActionPressed(GameInputs.Interact) && _isInDialogueZone) + { + DialogueController.ShowDialogue(Dialogue, "general"); + } } public void OnExitTree() { - DialogueZone.BodyEntered -= DialogueZone_BodyEntered; - DialogueZone.BodyExited -= DialogueZone_BodyExited; - DialogueExitZone.BodyExited -= DialogueExitZone_BodyExited; - Hitbox.AreaEntered -= Hitbox_AreaEntered; + DialogueZone.BodyEntered -= DialogueZone_BodyEntered; + DialogueZone.BodyExited -= DialogueZone_BodyExited; + DialogueExitZone.BodyExited -= DialogueExitZone_BodyExited; + Hitbox.AreaEntered -= Hitbox_AreaEntered; } }