Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eeb56fd7ad | |||
| 871e1856f1 | |||
| 378bf45c49 |
@@ -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]
|
||||
Yeli doesn't seem to have anything to say...
|
||||
|
||||
@@ -2170,7 +2170,6 @@ script = ExtResource("475_nxglm")
|
||||
|
||||
[connection signal="FilledWateringCan" from="." to="CharacterBody2D/WateringCanUI" method="Refill"]
|
||||
[connection signal="InventorySelectionChanged" from="." to="CharacterBody2D/WateringCanUI" method="IsWateringCanActive"]
|
||||
[connection signal="PickedUpTool" from="." to="CharacterBody2D" method="ActivateTool"]
|
||||
[connection signal="PickedUpTool" from="." to="CharacterBody2D/visuals" method="ActivateTool"]
|
||||
[connection signal="PickedUpTool" from="." to="CharacterBody2D/WateringCanUI" method="IsWateringCanActive"]
|
||||
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/visuals" method="PlayWateringAnimation"]
|
||||
|
||||
@@ -224,7 +224,9 @@ scale = Vector2(0.7, 0.7)
|
||||
script = ExtResource("44_aqu1t")
|
||||
itemToToggle = NodePath("../TalkingControl/AnimatedSprite")
|
||||
|
||||
[connection signal="FinishedTalking" from="." to="InteractionArea" method="SetActiveInverse"]
|
||||
[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"]
|
||||
|
||||
@@ -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
|
||||
@@ -1159,6 +1160,7 @@ region_rect = Rect2(130, 0, 201, 278)
|
||||
|
||||
[node name="bush6" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/left side"]
|
||||
modulate = Color(0.8428, 0.8771, 0.98, 1)
|
||||
z_index = 2
|
||||
material = SubResource("ShaderMaterial_bcdgk")
|
||||
position = Vector2(2612, 4022)
|
||||
scale = Vector2(2, 2)
|
||||
@@ -1254,6 +1256,7 @@ region_enabled = true
|
||||
region_rect = Rect2(1699, 76, 280, 230)
|
||||
|
||||
[node name="bush14" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/left side"]
|
||||
z_index = 2
|
||||
material = SubResource("ShaderMaterial_bcdgk")
|
||||
position = Vector2(8925, 4194)
|
||||
scale = Vector2(-5.54387, 3.80466)
|
||||
@@ -1514,6 +1517,7 @@ region_enabled = true
|
||||
region_rect = Rect2(1699, 76, 280, 230)
|
||||
|
||||
[node name="bush13" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/right side"]
|
||||
z_index = 2
|
||||
material = SubResource("ShaderMaterial_bcdgk")
|
||||
position = Vector2(8145, 4141)
|
||||
scale = Vector2(-2.82886, 2.51195)
|
||||
@@ -1523,6 +1527,7 @@ region_enabled = true
|
||||
region_rect = Rect2(1699, 76, 280, 230)
|
||||
|
||||
[node name="bush14" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/right side"]
|
||||
z_index = 2
|
||||
material = SubResource("ShaderMaterial_bcdgk")
|
||||
position = Vector2(8925, 4194)
|
||||
scale = Vector2(-5.54387, 3.80466)
|
||||
@@ -1533,6 +1538,7 @@ region_rect = Rect2(130, 0, 201, 278)
|
||||
|
||||
[node name="bush15" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/right side"]
|
||||
modulate = Color(0.8428, 0.8771, 0.98, 1)
|
||||
z_index = 2
|
||||
material = SubResource("ShaderMaterial_bcdgk")
|
||||
position = Vector2(7763, 4164)
|
||||
scale = Vector2(3.21806, 3.18583)
|
||||
@@ -1799,7 +1805,7 @@ region_enabled = true
|
||||
region_rect = Rect2(29, 204, 219, 159)
|
||||
|
||||
[node name="grass27" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/grass"]
|
||||
z_index = -5
|
||||
z_index = 2
|
||||
position = Vector2(7757, 3423)
|
||||
rotation = 1.57079
|
||||
scale = Vector2(7.28513, 6.16997)
|
||||
@@ -2335,27 +2341,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 +2384,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"]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Babushka.scripts.CSharp.Common.Services;
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common.CharacterControls;
|
||||
@@ -25,10 +26,13 @@ public partial class InteractionArea2D : Node2D
|
||||
set => _active = value;
|
||||
}
|
||||
|
||||
public void SetActiveInverse(bool active)
|
||||
{
|
||||
IsActive = !active;
|
||||
}
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
|
||||
if (_useSprite && _useOutline)
|
||||
{
|
||||
try
|
||||
@@ -40,12 +44,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 +76,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())
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System.Threading.Tasks;
|
||||
using Babushka.scripts.CSharp.Common.Inventory;
|
||||
using Babushka.scripts.CSharp.Common.Services;
|
||||
using Godot;
|
||||
|
||||
@@ -165,5 +165,4 @@ public partial class FarmingControls2D : Node2D
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -46,23 +46,21 @@ public partial class VesnaBehaviour2D : Node
|
||||
{
|
||||
InventorySlot currentSlot = InventoryManager.Instance.GetCurrentSelectedSlot();
|
||||
ItemInstance? currentItem = currentSlot.itemInstance;
|
||||
|
||||
if (currentItem == null)
|
||||
return;
|
||||
|
||||
|
||||
int toolId = -1;
|
||||
|
||||
if (currentItem.blueprint == _hoe)
|
||||
if (currentItem != null && currentItem.blueprint == _hoe)
|
||||
{
|
||||
toolId = 0;
|
||||
}
|
||||
|
||||
if (currentItem.blueprint == _wateringCan)
|
||||
if (currentItem != null && currentItem.blueprint == _wateringCan)
|
||||
{
|
||||
toolId = 1;
|
||||
}
|
||||
|
||||
ActivateTool(toolId);
|
||||
_vesnaAnimations.ActivateTool(toolId >= 0, toolId);
|
||||
EmitSignal(SignalName.InventorySelectionChanged, toolId);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common.Inventory;
|
||||
|
||||
[GlobalClass]
|
||||
@@ -18,7 +19,7 @@ public partial class ItemResource : Resource
|
||||
|
||||
[Export]
|
||||
public PackedScene? itemPrefab;
|
||||
|
||||
|
||||
public ItemResource()
|
||||
{
|
||||
name = "";
|
||||
@@ -27,3 +28,4 @@ public partial class ItemResource : Resource
|
||||
itemPrefab = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,8 @@ public partial class TalkingCharacter : Node2D
|
||||
private int _timelineIndex = 0;
|
||||
|
||||
[Signal] public delegate void TalkingEventHandler(string timelineName);
|
||||
|
||||
[Signal] public delegate void FinishedTalkingEventHandler(bool hasTimeLinesToPlay);
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
ToggleTalking();
|
||||
@@ -37,5 +38,7 @@ public partial class TalkingCharacter : Node2D
|
||||
}
|
||||
if (_sprite != null)
|
||||
_sprite.Play();
|
||||
|
||||
EmitSignal(SignalName.FinishedTalking, _timelineIndex >= _timelinesToPlay.Length);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Net.Mime;
|
||||
using Babushka.scripts.CSharp.Common.Quest;
|
||||
|
||||
public partial class QuestMessagePopup : Control
|
||||
|
||||
Reference in New Issue
Block a user