diff --git a/dialog/yeli_quest_select.dtl b/dialog/yeli_quest_select.dtl index 773a607..5c3b4e0 100644 --- a/dialog/yeli_quest_select.dtl +++ b/dialog/yeli_quest_select.dtl @@ -7,4 +7,8 @@ ifquest res://resources/quests/demo/3_talk_yeli_2.tres, 1: ifquest res://resources/quests/demo/5_talk_yeli_3.tres, 1: jump quest2_tomatoes_interim/ [end_timeline] -No Dialog for active quest "{ACTIVEQUEST}" +ifquest res://resources/quests/demo/2_collect_ducks.tres, 1: + join Yeli right + Yeli: Have you collected all the ducks yet? + [end_timeline] +No dialogue for active quest "{ACTIVEQUEST}" diff --git a/prefabs/characters/Yeli.tscn b/prefabs/characters/Yeli.tscn index 262a78b..757dcab 100644 --- a/prefabs/characters/Yeli.tscn +++ b/prefabs/characters/Yeli.tscn @@ -226,5 +226,6 @@ itemToToggle = NodePath("../TalkingControl/AnimatedSprite") [connection signal="Talking" from="." to="Dialogic starter" method="open"] [connection signal="Interacted" from="InteractionArea" to="." method="ToggleTalking"] +[connection signal="timelineEnded" from="DialogicToggle" to="." method="ToggleTalking"] [editable path="InteractionArea"] diff --git a/scenes/Babushka_scene_farm_outside_2d.tscn b/scenes/Babushka_scene_farm_outside_2d.tscn index 45bf977..8f66563 100644 --- a/scenes/Babushka_scene_farm_outside_2d.tscn +++ b/scenes/Babushka_scene_farm_outside_2d.tscn @@ -1030,6 +1030,7 @@ y_sort_enabled = true [node name="Yeli" parent="YSorted" instance=ExtResource("24_wtdui")] position = Vector2(6403, 3362) _timelinesToPlay = PackedStringArray("yeli_quest_select") +_retriggerSameTimeline = true [node name="Vesna" parent="YSorted" node_paths=PackedStringArray("_fieldParent") instance=ExtResource("1_7wfwe")] z_index = 1 @@ -2335,27 +2336,28 @@ max_distance = 2e+07 playback_type = 2 script = ExtResource("40_w3jkj") -[node name="SpeicialQuestTrigger" type="Node" parent="."] +[node name="SpecialQuestTrigger" type="Node" parent="."] -[node name="QuestInstantStart" type="Node" parent="SpeicialQuestTrigger"] +[node name="QuestInstantStart" type="Node" parent="SpecialQuestTrigger"] -[node name="QuestTrigger" type="Node" parent="SpeicialQuestTrigger/QuestInstantStart"] +[node name="QuestTrigger" type="Node" parent="SpecialQuestTrigger/QuestInstantStart"] script = ExtResource("66_2065p") questResource = ExtResource("67_tm0yg") toStatus = 1 +makeActive = true -[node name="ToolsCollectedTrigger" type="Node" parent="SpeicialQuestTrigger"] +[node name="ToolsCollectedTrigger" type="Node" parent="SpecialQuestTrigger"] script = ExtResource("68_hux6i") _itemsToContain = Array[Resource]([SubResource("Resource_y820s"), SubResource("Resource_50loj")]) _onAvailableQuest = ExtResource("68_lbnqo") _toNextQuest = ExtResource("69_l4wxt") -[node name="FieldWorkTrigger" type="Node" parent="SpeicialQuestTrigger"] +[node name="FieldWorkTrigger" type="Node" parent="SpecialQuestTrigger"] script = ExtResource("74_fv1t2") _onAvailableQuest = ExtResource("75_l7ekk") _toNextQuest = ExtResource("76_xcwle") -[node name="StartDialog" type="Node" parent="SpeicialQuestTrigger/FieldWorkTrigger"] +[node name="StartDialog" type="Node" parent="SpecialQuestTrigger/FieldWorkTrigger"] script = ExtResource("77_l7ekk") timeline = "quest2_tomatoes_end" @@ -2377,8 +2379,8 @@ timeline = "quest2_tomatoes_end" [connection signal="DuckCollected" from="YSorted/ducks/Duck7" to="YSorted/ducks" method="Increment"] [connection signal="Dialogue" from="YSorted/ducks/DialogicToggle" to="YSorted/ducks/dialogic starter" method="open"] [connection signal="finished" from="Audio/Background Music Ramp up" to="Audio/Background Music loop" method="PlayFromOffset"] -[connection signal="ready" from="SpeicialQuestTrigger/QuestInstantStart" to="SpeicialQuestTrigger/QuestInstantStart/QuestTrigger" method="Trigger"] -[connection signal="OnFulfilled" from="SpeicialQuestTrigger/FieldWorkTrigger" to="SpeicialQuestTrigger/FieldWorkTrigger/StartDialog" method="open"] +[connection signal="ready" from="SpecialQuestTrigger/QuestInstantStart" to="SpecialQuestTrigger/QuestInstantStart/QuestTrigger" method="Trigger"] +[connection signal="OnFulfilled" from="SpecialQuestTrigger/FieldWorkTrigger" to="SpecialQuestTrigger/FieldWorkTrigger/StartDialog" method="open"] [editable path="YSorted/Vesna"] [editable path="YSorted/BrĂ¼nnen/InteractionArea"] diff --git a/scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs b/scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs index 759d4b6..72a7b3f 100644 --- a/scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs +++ b/scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs @@ -1,4 +1,5 @@ using System; +using Babushka.scripts.CSharp.Common.Services; using Godot; namespace Babushka.scripts.CSharp.Common.CharacterControls; @@ -28,7 +29,6 @@ public partial class InteractionArea2D : Node2D public override void _Ready() { - if (_useSprite && _useOutline) { try @@ -40,12 +40,12 @@ public partial class InteractionArea2D : Node2D GD.PrintErr($"No sprite to outline found on: {GetParent().Name}" + exception.Message); } } - } + public void OnPlayerEntered(Node2D player) { - if (!_active) + if (!_active || !InputService.Instance.InputEnabled) return; if(_showLabel) @@ -72,7 +72,7 @@ public partial class InteractionArea2D : Node2D public override void _Input(InputEvent @event) { - if (!_active) + if (!_active || !InputService.Instance.InputEnabled) return; if (@event.IsAction("interact") && @event.IsPressed()) diff --git a/scripts/CSharp/Common/Farming/FarmingControls2D.cs b/scripts/CSharp/Common/Farming/FarmingControls2D.cs index 2d7ce7e..c9e259c 100644 --- a/scripts/CSharp/Common/Farming/FarmingControls2D.cs +++ b/scripts/CSharp/Common/Farming/FarmingControls2D.cs @@ -165,5 +165,4 @@ public partial class FarmingControls2D : Node2D } #endregion - } \ No newline at end of file diff --git a/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs b/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs index 6f7ed23..60ffd13 100644 --- a/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs +++ b/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs @@ -52,6 +52,7 @@ public partial class PlantBehaviour2D : Node2D if (_field.FieldState != FieldState.Watered || _magicWordSaid != _magicWordNeeded) return; + // todo: replace with EventBus when possible GetTree().CallGroup("PlantGrowing", VesnaAnimations.MethodName.PlayFarmingAnimation); switch (_state) { diff --git a/scripts/CSharp/Common/Items/NonInventoryPickup.cs b/scripts/CSharp/Common/Items/NonInventoryPickup.cs index a43eb30..1124923 100644 --- a/scripts/CSharp/Common/Items/NonInventoryPickup.cs +++ b/scripts/CSharp/Common/Items/NonInventoryPickup.cs @@ -7,6 +7,7 @@ public partial class NonInventoryPickup : Node2D { public void PlayPickupAnimation() { + // todo: replace with EventBus implementation as soon as this is possible GetTree().CallGroup("Pickup", VesnaAnimations.MethodName.PlayPickUpAnimation); } } \ No newline at end of file diff --git a/scripts/CSharp/Common/Quest/QuestMessagePopup.cs b/scripts/CSharp/Common/Quest/QuestMessagePopup.cs index 6cb8792..0baf839 100644 --- a/scripts/CSharp/Common/Quest/QuestMessagePopup.cs +++ b/scripts/CSharp/Common/Quest/QuestMessagePopup.cs @@ -1,6 +1,5 @@ using Godot; using System; -using System.Net.Mime; using Babushka.scripts.CSharp.Common.Quest; public partial class QuestMessagePopup : Control