diff --git a/dialog/yeli_intro_01.dtl b/dialog/yeli_intro_01.dtl
index e6799e2..61e595d 100644
--- a/dialog/yeli_intro_01.dtl
+++ b/dialog/yeli_intro_01.dtl
@@ -1,7 +1,7 @@
join Yeli center
Yeli (_part_side): Hi Vesna! So nice to see you!
Yeli: It's been so long!
-[text_input text="How have you been?" var="PLAYERMOOD" placeholder="good" default="good" allow_empty="true"]
+[text_input text="How have you been?" var="PLAYERMOOD" placeholder="Good" default="Good" allow_empty="true"]
Yeli: {PLAYERMOOD} huh? Nice!
Yeli: Well, enough chitchat! There is so much to do on the farm. Would you like to help me?
- Absolutely!
@@ -10,6 +10,6 @@ Yeli: Well, enough chitchat! There is so much to do on the farm. Would you like
Yeli: Very good!
- For sure!
Yeli: Awesome!
-Yeli: Ok then let's start with the tilling. In order to till the soil and plant something, you need a hoe or rake.
+Yeli: Ok then let's start with the tilling. In order to till the soil and plant something, you need a hoe or rake.
Yeli: You can find one leaning against the back fence somewhere. Pick it up and come back to me.
leave Yeli
diff --git a/dialog/yeli_intro_02.dtl b/dialog/yeli_intro_02.dtl
new file mode 100644
index 0000000..2fdf1ec
--- /dev/null
+++ b/dialog/yeli_intro_02.dtl
@@ -0,0 +1,4 @@
+join Yeli center
+Yeli: So you found it? Nice!
+Yeli: Now find a nice plot of land and start tilling it. You can simply click on the ground while you have the rake in your hand.
+leave Yeli
diff --git a/dialog/yeli_intro_02.dtl.uid b/dialog/yeli_intro_02.dtl.uid
new file mode 100644
index 0000000..f22eb66
--- /dev/null
+++ b/dialog/yeli_intro_02.dtl.uid
@@ -0,0 +1 @@
+uid://c2edb6qee3oft
diff --git a/dialog/yeli_intro_03.dtl b/dialog/yeli_intro_03.dtl
new file mode 100644
index 0000000..e294d40
--- /dev/null
+++ b/dialog/yeli_intro_03.dtl
@@ -0,0 +1,12 @@
+join Yeli center
+Yeli: Done tilling? Ok, next step is watering!
+Yeli: First, pick up the watering can and select it in your inventory by using the mouse wheel.
+Yeli: Then go to the well and press [E] to fill it up.
+Yeli: Did you follow?
+- Pick up waterin can, then go to well. Got it.
+- Not exactly. What do I do again?
+ Yeli: Pick up the watering can and fill it up at the well. Easy peasy.
+Yeli: Alright, then you go to a field that you prepared and click on it while holding the watering can. You'll see it turn dark from the water.
+Yeli: Your current watering can has a capacity of 4. That means it can water 4 fields before it needs to be refilled.
+Yeli: Now go and water the fields, then come back to me. There's another thing, but let's do this step by step.
+leave Yeli
diff --git a/dialog/yeli_intro_03.dtl.uid b/dialog/yeli_intro_03.dtl.uid
new file mode 100644
index 0000000..aa92577
--- /dev/null
+++ b/dialog/yeli_intro_03.dtl.uid
@@ -0,0 +1 @@
+uid://c8ak87t7rdyur
diff --git a/dialog/yeli_intro_04.dtl b/dialog/yeli_intro_04.dtl
new file mode 100644
index 0000000..5c55e6b
--- /dev/null
+++ b/dialog/yeli_intro_04.dtl
@@ -0,0 +1,7 @@
+join Yeli center
+Yeli: Nicely done!
+Yeli: Your fields are now prepped for the growing part.
+Yeli: Here, have some tomato seeds. Use them to grow your first plants.
+Yeli: Once the plants are planted, you can trigger their next development stage by watering them and pressing [E] at their field. It's a little trick I've learned. But don't tell anyone else!
+Yeli: Once the tomatoes are fully grown, you can harvest them and we can cook a nice soup out of them.
+leave Yeli
diff --git a/dialog/yeli_intro_04.dtl.uid b/dialog/yeli_intro_04.dtl.uid
new file mode 100644
index 0000000..7079d12
--- /dev/null
+++ b/dialog/yeli_intro_04.dtl.uid
@@ -0,0 +1 @@
+uid://vr8kyg00yn6u
diff --git a/prefabs/characters/Player2D.tscn b/prefabs/characters/Player2D.tscn
index be2da7d..072d0dd 100644
--- a/prefabs/characters/Player2D.tscn
+++ b/prefabs/characters/Player2D.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=821 format=3 uid="uid://c25udixd5m6l0"]
+[gd_scene load_steps=822 format=3 uid="uid://c25udixd5m6l0"]
[ext_resource type="Script" uid="uid://b05uyj001ehwi" path="res://scripts/CSharp/Common/Farming/VesnaBehaviour2D.cs" id="1_yd5ep"]
[ext_resource type="Script" uid="uid://cjbclkxesh3hc" path="res://scripts/CSharp/Common/CharacterControls/Player2D.cs" id="2_1vqmv"]
@@ -818,6 +818,7 @@
[ext_resource type="Texture2D" uid="uid://x8hr8287ff2n" path="res://art/farm/farming/farmobjekte/tools atlas.png" id="816_1a3c1"]
[ext_resource type="Script" uid="uid://bcskt5ckh3rqa" path="res://scripts/CSharp/Common/Farming/FarmingControls2D.cs" id="817_6nrw3"]
[ext_resource type="PackedScene" uid="uid://b1d2e7ely6hyw" path="res://prefabs/farm/base_field_2d.tscn" id="818_16w6h"]
+[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="819_4na52"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ssqtd"]
radius = 110.018
@@ -3563,5 +3564,11 @@ _fieldPrefab = ExtResource("818_16w6h")
_movingPlayer = NodePath("../CharacterBody2D")
_camera = NodePath("../CharacterBody2D/Camera2D")
+[node name="Node2D" type="Node2D" parent="."]
+position = Vector2(0, 374)
+script = ExtResource("819_4na52")
+
[connection signal="PickedUpTool" from="." to="CharacterBody2D" method="ActivateTool"]
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D" method="PlayWateringAnimation"]
+[connection signal="timelineEnded" from="Node2D" to="." method="EnableMovement"]
+[connection signal="timelineStarted" from="Node2D" to="." method="DisableMovement"]
diff --git a/prefabs/characters/Yeli.tscn b/prefabs/characters/Yeli.tscn
index 1679129..f164e7a 100644
--- a/prefabs/characters/Yeli.tscn
+++ b/prefabs/characters/Yeli.tscn
@@ -183,7 +183,9 @@ animations = [{
}]
[node name="Yeli" type="Node2D"]
+z_index = 1
y_sort_enabled = true
+position = Vector2(0, 322)
script = ExtResource("1_at1n1")
[node name="InteractionArea" parent="." instance=ExtResource("42_ahrat")]
@@ -194,19 +196,18 @@ scale = Vector2(2.805, 2.805)
shape = SubResource("CircleShape2D_at1n1")
[node name="Label" parent="InteractionArea" index="1"]
-top_level = true
custom_minimum_size = Vector2(10, 10)
-offset_left = -94.0
-offset_top = 83.0
-offset_right = -39.65
-offset_bottom = 113.0
-scale = Vector2(3, 3)
+offset_left = -127.273
+offset_top = -245.633
+offset_right = 119.727
+offset_bottom = -142.633
+theme_override_font_sizes/font_size = 60
text = "[E] talk"
[node name="TalkingControl" type="Node2D" parent="." node_paths=PackedStringArray("_sprite")]
script = ExtResource("1_hn8at")
_sprite = NodePath("AnimatedSprite")
-_timelinesToPlay = PackedStringArray("yeli_intro_01", "yeli_intro_02")
+_timelinesToPlay = PackedStringArray("yeli_intro_01", "yeli_intro_02", "yeli_intro_03", "yeli_intro_04")
[node name="AnimatedSprite" type="AnimatedSprite2D" parent="TalkingControl"]
y_sort_enabled = true
diff --git a/prefabs/farm/base_field_2d.tscn b/prefabs/farm/base_field_2d.tscn
index 0008eed..f0efc2e 100644
--- a/prefabs/farm/base_field_2d.tscn
+++ b/prefabs/farm/base_field_2d.tscn
@@ -19,6 +19,7 @@ scale = Vector2(2.225, 2.225)
[node name="FieldBehaviour" type="Sprite2D" parent="."]
z_index = -1
+scale = Vector2(0.9, 1)
texture = ExtResource("2_yi42k")
script = ExtResource("2_femni")
Tilled = ExtResource("2_yi42k")
@@ -33,6 +34,13 @@ position = Vector2(6, -161)
[node name="CollisionShape3D" parent="FieldBehaviour/BasePlant/ReadyPlantInventoryItem/InteractionArea2/Area2D" index="0"]
shape = SubResource("CircleShape2D_femni")
+[node name="ReadyPlant" parent="FieldBehaviour/BasePlant/ReadyPlantInventoryItem" index="5"]
+visible = false
+position = Vector2(0, -291.3)
+
+[node name="01" parent="FieldBehaviour/BasePlant/ReadyPlantInventoryItem/ReadyPlant" index="0"]
+visible = true
+
[connection signal="Interacted" from="InteractionArea2" to="FieldBehaviour/BasePlant" method="Grow"]
[editable path="FieldBehaviour/BasePlant"]
diff --git a/prefabs/farm/base_plant_2d.tscn b/prefabs/farm/base_plant_2d.tscn
index 2681098..b9cde65 100644
--- a/prefabs/farm/base_plant_2d.tscn
+++ b/prefabs/farm/base_plant_2d.tscn
@@ -39,7 +39,6 @@ position = Vector2(0, 0.5)
[node name="TomatoSeed" type="Sprite2D" parent="Seeds"]
visible = false
y_sort_enabled = true
-material = SubResource("ShaderMaterial_u4cty")
texture = ExtResource("2_rmjrk")
flip_v = true
region_enabled = true
@@ -48,7 +47,6 @@ region_rect = Rect2(-2, 15, 85, 81)
[node name="TomatoSeed2" type="Sprite2D" parent="Seeds"]
visible = false
y_sort_enabled = true
-material = SubResource("ShaderMaterial_u4cty")
texture = ExtResource("2_rmjrk")
flip_v = true
region_enabled = true
@@ -57,7 +55,6 @@ region_rect = Rect2(15, 177, 84, 108)
[node name="TomatoSeed3" type="Sprite2D" parent="Seeds"]
visible = false
y_sort_enabled = true
-material = SubResource("ShaderMaterial_u4cty")
texture = ExtResource("2_rmjrk")
flip_v = true
region_enabled = true
diff --git a/prefabs/interactions/generic_item_on_ground_2d.tscn b/prefabs/interactions/generic_item_on_ground_2d.tscn
index f0a35dc..196b827 100644
--- a/prefabs/interactions/generic_item_on_ground_2d.tscn
+++ b/prefabs/interactions/generic_item_on_ground_2d.tscn
@@ -49,12 +49,13 @@ autowrap_mode = 3
shape = SubResource("CircleShape2D_tlhp6")
[node name="Label" parent="InteractionArea2" index="1"]
-offset_left = -142.0
-offset_top = -278.0
-offset_right = 1.0
-offset_bottom = -170.0
+visible = false
+top_level = true
+offset_left = -72.0
+offset_top = -58.0
+offset_right = 71.0
+offset_bottom = 50.0
theme = SubResource("Theme_xu8me")
-horizontal_alignment = 1
vertical_alignment = 1
[node name="Icon" type="Sprite2D" parent="."]
diff --git a/prefabs/interactions/interaction_area_2d.tscn b/prefabs/interactions/interaction_area_2d.tscn
index e32ecda..4796490 100644
--- a/prefabs/interactions/interaction_area_2d.tscn
+++ b/prefabs/interactions/interaction_area_2d.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=3 format=3 uid="uid://cqc72e4hq6bcd"]
+[gd_scene load_steps=4 format=3 uid="uid://cqc72e4hq6bcd"]
[ext_resource type="Script" uid="uid://ckp413wrub5fm" path="res://scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs" id="1_5ajrf"]
@@ -6,6 +6,9 @@
resource_local_to_scene = true
radius = 300.0
+[sub_resource type="Theme" id="Theme_5ajrf"]
+default_font_size = 75
+
[node name="InteractionArea" type="Node2D" node_paths=PackedStringArray("_area", "_label")]
script = ExtResource("1_5ajrf")
_area = NodePath("Area2D")
@@ -19,10 +22,13 @@ shape = SubResource("CircleShape2D_npluf")
[node name="Label" type="Label" parent="."]
visible = false
-offset_right = 50.0
-offset_bottom = 30.0
-scale = Vector2(2, 2)
+offset_left = -46.0
+offset_top = -55.0
+offset_right = 45.0
+offset_bottom = 48.0
+theme = SubResource("Theme_5ajrf")
text = "[E]"
+horizontal_alignment = 1
[connection signal="body_entered" from="Area2D" to="." method="OnPlayerEntered"]
[connection signal="body_exited" from="Area2D" to="." method="OnPlayerExited"]
diff --git a/project.godot b/project.godot
index 4a8be23..715fb64 100644
--- a/project.godot
+++ b/project.godot
@@ -33,7 +33,9 @@ directories/dtl_directory={
"semi_cat": "res://dialog/semi_cat.dtl",
"test_time_line": "res://dialog/test_time_line.dtl",
"yeli_intro_01": "res://dialog/yeli_intro_01.dtl",
-"yeli_intro_02": "res://dialog/yeli_intro_02.dtl"
+"yeli_intro_02": "res://dialog/yeli_intro_02.dtl",
+"yeli_intro_03": "res://dialog/yeli_intro_03.dtl",
+"yeli_intro_04": "res://dialog/yeli_intro_04.dtl"
}
variables={
"PLAYERMOOD": "Good"
diff --git a/scenes/Babushka_scene_farm_outside_2d.tscn b/scenes/Babushka_scene_farm_outside_2d.tscn
index 65a53ae..309879f 100644
--- a/scenes/Babushka_scene_farm_outside_2d.tscn
+++ b/scenes/Babushka_scene_farm_outside_2d.tscn
@@ -796,7 +796,6 @@ z_index = 1
y_sort_enabled = true
[node name="Yeli" parent="YSorted" instance=ExtResource("24_wtdui")]
-z_index = 1
position = Vector2(6173, 3310)
[node name="Vesna" parent="YSorted" node_paths=PackedStringArray("_fieldParent") instance=ExtResource("1_7wfwe")]
@@ -839,7 +838,7 @@ _blueprint = ExtResource("26_ipqaa")
shape = SubResource("CircleShape2D_2nee2")
[node name="CanGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
-position = Vector2(6702, 3507)
+position = Vector2(8192, 3507)
[node name="SpawnWithItem" parent="YSorted/CanGenericPickup" index="0"]
_blueprint = ExtResource("28_ipqaa")
diff --git a/scripts/CSharp/Common/CharacterControls/Player2D.cs b/scripts/CSharp/Common/CharacterControls/Player2D.cs
index 2027e07..bea8f96 100644
--- a/scripts/CSharp/Common/CharacterControls/Player2D.cs
+++ b/scripts/CSharp/Common/CharacterControls/Player2D.cs
@@ -19,6 +19,12 @@ public partial class Player2D : CharacterBody2D
private Vector2 _lastDirection = Vector2.Zero;
private InventoryManager _inventoryManager;
+ public bool InputEnabled
+ {
+ get => _canHandleInput;
+ set => _canHandleInput = value;
+ }
+
public override void _Ready()
{
InventoryManager.Instance.playerInventory.InventoryContentsChanged += HandleNewItemInInventory;
diff --git a/scripts/CSharp/Common/Farming/VesnaBehaviour2D.cs b/scripts/CSharp/Common/Farming/VesnaBehaviour2D.cs
index c3068e3..5d14bce 100644
--- a/scripts/CSharp/Common/Farming/VesnaBehaviour2D.cs
+++ b/scripts/CSharp/Common/Farming/VesnaBehaviour2D.cs
@@ -68,4 +68,20 @@ public partial class VesnaBehaviour2D : Node
}
#endregion
+
+ ///
+ /// Enables the character movement in the Player2D script.
+ ///
+ public void EnableMovement()
+ {
+ _player2d.InputEnabled = true;
+ }
+
+ ///
+ /// Disables the character movement in the Player2D script.
+ ///
+ public void DisableMovement()
+ {
+ _player2d.InputEnabled = false;
+ }
}
\ No newline at end of file