Compare commits

..

7 Commits

Author SHA1 Message Date
Sanelschnitte 2940475062 Added dialog in Dialogic
basic char, text, choice - eventually needs more events and functions to work properly
2025-07-09 23:43:02 +02:00
kziolkowski 746ac58329 Merge pull request 'Feature: Quest system' (#11) from feature/quest_system into develop
Reviewed-on: #11
2025-07-07 15:24:28 +02:00
cblech a9cb20c8bc Fixed journal references 2025-07-07 04:51:35 +02:00
cblech 32249fde86 Made quest visuals 2025-07-07 04:41:14 +02:00
cblech 27e137bc02 Made quest usable 2025-07-07 04:41:03 +02:00
cblech 01daddee3b Made basic quest setup 2025-07-07 04:40:40 +02:00
Jonathan ba512508f8 Merge pull request 'feature/farm_scene_rework' (#10) from feature/farm_scene_rework into develop
Reviewed-on: #10
2025-07-07 03:46:51 +02:00
99 changed files with 1305 additions and 1504 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

-34
View File
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cgmu3qlovdr22"
path="res://.godot/imported/field_outline_1.png-6d3fddc82592de77807ed60581b515c5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/masks/field_outline_1.png"
dest_files=["res://.godot/imported/field_outline_1.png-6d3fddc82592de77807ed60581b515c5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

-34
View File
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://djpigvoyadvjs"
path="res://.godot/imported/field_outline_3.png-1ae7ea2c620df01f38d55e21a86cbf92.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/masks/field_outline_3.png"
dest_files=["res://.godot/imported/field_outline_3.png-1ae7ea2c620df01f38d55e21a86cbf92.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 MiB

After

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

-34
View File
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dgavbfci8x178"
path="res://.godot/imported/grass-1.png-ca7b452843206b712388940e3c3d5532.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-1.png"
dest_files=["res://.godot/imported/grass-1.png-ca7b452843206b712388940e3c3d5532.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

-34
View File
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://badnnid7dgnpk"
path="res://.godot/imported/grass-4.png-e2855f1a80a4bb56abcc9b4ab623b57b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-4.png"
dest_files=["res://.godot/imported/grass-4.png-e2855f1a80a4bb56abcc9b4ab623b57b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

-34
View File
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b644ofy7fml5w"
path="res://.godot/imported/grass-5.png-415eca44a6277d6c20c8cb81e371080f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-5.png"
dest_files=["res://.godot/imported/grass-5.png-415eca44a6277d6c20c8cb81e371080f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

-34
View File
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d3dwl6ph0pu1d"
path="res://.godot/imported/grass-6.png-78792f43caad598457a381c5989c9eb5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-6.png"
dest_files=["res://.godot/imported/grass-6.png-78792f43caad598457a381c5989c9eb5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://h2b5aufaaw7w"
path="res://.godot/imported/grass-2.png-6f43a52066099666b3212aa92bb38a9f.ctex"
uid="uid://cvu5dybw31uxn"
path="res://.godot/imported/Circle.png-1776eabbad99f201f3fa20f90655dedf.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-2.png"
dest_files=["res://.godot/imported/grass-2.png-6f43a52066099666b3212aa92bb38a9f.ctex"]
source_file="res://art/ui/UI/Circle.png"
dest_files=["res://.godot/imported/Circle.png-1776eabbad99f201f3fa20f90655dedf.ctex"]
[params]
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://ct7ea8ikor5rf"
path="res://.godot/imported/grass-3.png-694a7f12b6e32536c4f27363ec79c45a.ctex"
uid="uid://70twb0i3e2wo"
path="res://.godot/imported/journal_note.png-456d095624ebf40e3c23543b3d0f829a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-3.png"
dest_files=["res://.godot/imported/grass-3.png-694a7f12b6e32536c4f27363ec79c45a.ctex"]
source_file="res://art/ui/UI/journal_note.png"
dest_files=["res://.godot/imported/journal_note.png-456d095624ebf40e3c23543b3d0f829a.ctex"]
[params]
Binary file not shown.

After

Width:  |  Height:  |  Size: 395 KiB

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://eg5ej0mtuac"
path="res://.godot/imported/field_outline_2.png-e3ddb80217ba93d880ff746f003587ee.ctex"
uid="uid://d0anh3hdk0clc"
path="res://.godot/imported/journal_standard.png-09a8c39fc0e5420f9430aff7f945ae55.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/masks/field_outline_2.png"
dest_files=["res://.godot/imported/field_outline_2.png-e3ddb80217ba93d880ff746f003587ee.ctex"]
source_file="res://art/ui/UI/journal_standard.png"
dest_files=["res://.godot/imported/journal_standard.png-09a8c39fc0e5420f9430aff7f945ae55.ctex"]
[params]
Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://hvchk6t0xe7j"
path="res://.godot/imported/Ente.png-21ead71377d82aa0401b2345b9713a4b.ctex"
uid="uid://b2q3xgw8xj880"
path="res://.godot/imported/quest_note.png-857ff56cb8cdd8e4401bb6320261518e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/animals/Ente.png"
dest_files=["res://.godot/imported/Ente.png-21ead71377d82aa0401b2345b9713a4b.ctex"]
source_file="res://art/ui/UI/quest_note.png"
dest_files=["res://.godot/imported/quest_note.png-857ff56cb8cdd8e4401bb6320261518e.ctex"]
[params]
+19
View File
@@ -0,0 +1,19 @@
{
"@path": "res://addons/dialogic/Resources/character.gd",
"@subpath": NodePath(""),
&"_translation_id": "",
&"color": Color(1, 1, 1, 1),
&"custom_info": {
"sound_mood_default": "",
"sound_moods": {},
"style": ""
},
&"default_portrait": "",
&"description": "helpful spirit forest",
&"display_name": "Chuga",
&"mirror": false,
&"nicknames": [""],
&"offset": Vector2(0, 0),
&"portraits": {},
&"scale": 1.0
}
+1
View File
@@ -0,0 +1 @@
uid://dkbi4kpwu5o07
+19
View File
@@ -0,0 +1,19 @@
{
"@path": "res://addons/dialogic/Resources/character.gd",
"@subpath": NodePath(""),
&"_translation_id": "",
&"color": Color(1, 1, 1, 1),
&"custom_info": {
"sound_mood_default": "",
"sound_moods": {},
"style": ""
},
&"default_portrait": "",
&"description": "Yeli's Domovoi",
&"display_name": "Domovoi",
&"mirror": false,
&"nicknames": [""],
&"offset": Vector2(0, 0),
&"portraits": {},
&"scale": 1.0
}
+1
View File
@@ -0,0 +1 @@
uid://75u6ft7n7w0l
+19
View File
@@ -0,0 +1,19 @@
{
"@path": "res://addons/dialogic/Resources/character.gd",
"@subpath": NodePath(""),
&"_translation_id": "",
&"color": Color(1, 1, 1, 1),
&"custom_info": {
"sound_mood_default": "",
"sound_moods": {},
"style": ""
},
&"default_portrait": "",
&"description": "",
&"display_name": "Everyone",
&"mirror": false,
&"nicknames": [""],
&"offset": Vector2(0, 0),
&"portraits": {},
&"scale": 1.0
}
+1
View File
@@ -0,0 +1 @@
uid://6o18wptg611k
+19
View File
@@ -0,0 +1,19 @@
{
"@path": "res://addons/dialogic/Resources/character.gd",
"@subpath": NodePath(""),
&"_translation_id": "",
&"color": Color(1, 1, 1, 1),
&"custom_info": {
"sound_mood_default": "",
"sound_moods": {},
"style": "NPC_narrative"
},
&"default_portrait": "",
&"description": "Main character",
&"display_name": "Vesna2",
&"mirror": false,
&"nicknames": [""],
&"offset": Vector2(0, 0),
&"portraits": {},
&"scale": 1.0
}
+1
View File
@@ -0,0 +1 @@
uid://c0vfdx7xal0py
+3
View File
@@ -0,0 +1,3 @@
join Vesna2 center
Thats the last one. I should get back to Yeli.
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://m4koh11hl7dr
+8
View File
@@ -0,0 +1,8 @@
join Yeli center
join Vesna2 center
Yeli (_part_side): Come here, you little quacking beast!
- What a mess!
- You havent called me that way yet.
Yeli (_part_side): Vesna, oh, thank goodness!
Yeli (_part_side): Please could you get the runner ducks back into their coop?
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://8hbdcasjfqe2
+4
View File
@@ -0,0 +1,4 @@
join Vesna2 center
Vesna2: I just wish I liked tomatoes more.
Vesna2: Well…Yeli probably started with the cooking. I should go inside.
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://caar10vf25avk
+10
View File
@@ -0,0 +1,10 @@
join Yeli center
join Vesna2 center
Yeli (_part_side): Great! Now I need you to plant some tomatoes!
label plant tomatoes
Yeli (_part_side): Use the hoe to break up the soil. Then plant the seeds and water the fields.
Yeli (_part_side): Got it?
- Of course!
- Wait … How do I plant the tomatoes again?
jump plant tomatoes
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://hiddni4o2feu
+10
View File
@@ -0,0 +1,10 @@
join Yeli center
join Vesna2 center
Yeli (_part_side): Thank you, my child! Your Yeli is not so agile anymore.
Vesna2: But youre diligent! Youve started with the preparation for dinner.
Yeli (_part_side): Indeed, I have.
Yeli (_part_side): But, oh my, those ducks messed up the tomatos.
Yeli (_part_side): Oh, would you like to assist me?
Vesna2: What do I have to do?
Yeli (_part_side): First, take the hoe and watering can over there! Then come back to me!
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://jiu6pdap5wuj
+9
View File
@@ -0,0 +1,9 @@
join Yeli center
join Vesna2 center
Yeli (_part_side): Wow! So many?
Yeli (_part_side): Good job! Put it in the kettle!
[wait_input]
Yeli (_part_side): Mmmh! This will be something.
Yeli (_part_side): Thank you! I can take everything else from here.
Yeli (_part_side): See you for dinner!
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://bh4ept5nbdxes
+15
View File
@@ -0,0 +1,15 @@
join Vesna2 center
join Domovoi center
Vesna2: Oh no, most of the beets arent ripe yet.
Domovoi: Pssss!
Domovoi: Yeah, you!
Domovoi: The code word is “Rosty Rosty”
Vesna2: What?
Domovoi: Just say it!
Vesna2: Rosty…rosty?
# Hier wächst die rote Beete magisch. Mit einem Signal/Ereignis?
[signal]
Vesna2: It worked! How did it work?
Vesna2: Thank y…and hes gone.
What a truly quirky individual.
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://hlvjcir0ined
+21
View File
@@ -0,0 +1,21 @@
join Yeli center
join Vesna2 center
Yeli (_part_side): You see, you dont need a man to keep your garden in shape.
- Just a little help from Vesna.
- Frankly, I kept Vasily away from our garden after he destroyed our sunflowers.
Yeli (_part_side): Haha! True words.
Yeli (_part_side): Its your very first time in this house in a long time, isnt it?
Vesna2: Yes. And you have two cats now?
Yeli (_part_side): No, no, the second bowl is for the Domovoi, as a gift.
Yeli (_part_side): Your Yeli still practices the old traditions.
Vesna2: And have you spotted any Domovois since?
Yeli (_part_side): No, but would you believe it, the cat grew double the size. Haha!
Vesna2: Your cat really gets the best of the best. Your soup already smells great!
Yeli (_part_side): But its missing…something.
Yeli (_part_side): Ah!
label bring_beets
Yeli (_part_side): Would you bring me some beets from the garden while I take care of the soup? Heres the key!
- Sure!
- What do you need again?
jump bring_beets
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://dsc2d4fpu8ip2
+18
View File
@@ -0,0 +1,18 @@
join Yeli center
join Vesna2 center
Everyone: Smachnoho!
Vesna2: Lovely soup, Yeli!
Yeli (_part_side): God bless you, my child! Thats also thanks to you.
Vesna2: So, how do you like it in Lasnoye so far?
- It feels different from when Vasily and I used to live here.
- Its just as I remembered it.
Yeli (_part_side): Indeed, it is.
Yeli (_part_side): Since the evacuation, Lasnoye and its people had to adapt to…new circumstances.
Yeli (_part_side): But at its core, its still our motherland from back then.
Vesna2: …And the forest? Has anyone tried to go back and--
Yeli (_part_side): The forest is strictly off-limits!
Yeli (_part_side): Dragana forbids it.
Yeli (_part_side): The grime turned the forest into a dangerous place.
Yeli (_part_side): But here youre safe. After all, you can always count on your Yeli!
Vesna2: In that case, pass me some more soup!
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://b176n5u7bplyh
+5
View File
@@ -0,0 +1,5 @@
join Chuga center
Chuga: I believe youve seen enough for today.
Chuga: And yes, you too.
Thank you for playing!
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://ck5nt0bykudeb
+22
View File
@@ -0,0 +1,22 @@
join Vesna2 center
join Chuga center
Chuga: Look who it is!
Vesna2: Your name was Chuga, right? I want to go to the forest!
Chuga: To the forest? After everything the others told you?
Vesna2: Will you let me through?
Chuga: Will I?
Chuga: Let us have a riddle!
Chuga: If you answer correctly, I let you through.
Chuga: If not, I let you through anyway.
Vesna2: So, whats the point of answering?
Chuga: You give me an answer, and I give you something to see in the dark.
Chuga: Or are you planning to return with bumps and bruises?
Chuga: So, listen\: “I wear a crown, but Im no king.” Vesna, what am I?
- Queen
Chuga: What a boring answer.
- Tree
Thats it!
- Soup
Chuga: Hate the player, not the game.
Chuga: Here you go!
[end_timeline]
+1
View File
@@ -0,0 +1 @@
uid://57esymqfp3v3
+1 -1
View File
@@ -9,7 +9,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="_builds/Babushka_win_0_3/Babushka.exe"
export_path="_builds/Babushka_win_0_2/Babushka.exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
+20
View File
@@ -0,0 +1,20 @@
[gd_scene load_steps=2 format=3 uid="uid://cqcs80xsgygeb"]
[ext_resource type="PackedScene" uid="uid://2q1n6g2kj5er" path="res://prefabs/UI/Quest/QuestLog.tscn" id="1_7u5et"]
[node name="Book" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="QuestLog" parent="." instance=ExtResource("1_7u5et")]
layout_mode = 1
offset_left = 247.0
offset_top = 72.0
offset_right = -205.0
offset_bottom = -76.0
grow_horizontal = 1
grow_vertical = 1
+45 -13
View File
@@ -1,24 +1,22 @@
[gd_scene load_steps=9 format=3 uid="uid://cgjc4wurbgimy"]
[gd_scene load_steps=10 format=3 uid="uid://cgjc4wurbgimy"]
[ext_resource type="Script" uid="uid://hg7jay2kt441" path="res://scripts/CSharp/Common/Inventory/InventoryUi.cs" id="1_6wusm"]
[ext_resource type="Texture2D" uid="uid://3ln8aleyxgp1" path="res://art/ui/UI/UI_bag_export_01.png" id="3_vvo7l"]
[ext_resource type="Texture2D" uid="uid://u0dku75l17re" path="res://art/ui/UI/UI_bag_export_highlight_01.png" id="5_df8i8"]
[ext_resource type="PackedScene" uid="uid://c0kmdjeqkqrwv" path="res://prefabs/UI/Inventory/Slot.tscn" id="5_u7kje"]
[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="6_n5apg"]
[ext_resource type="Script" uid="uid://7wwid23tc8as" path="res://scripts/CSharp/Common/Quest/QuestMessagePopup.cs" id="6_n5apg"]
[ext_resource type="Texture2D" uid="uid://bag1xalfh731d" path="res://art/ui/UI/UI_bag_export_highlight_02.png" id="6_u7kje"]
[ext_resource type="Texture2D" uid="uid://cxptule8n38ph" path="res://art/ui/UI/UI_bag_export_highlight_03.png" id="7_l3npx"]
[ext_resource type="PackedScene" uid="uid://2q1n6g2kj5er" path="res://prefabs/UI/Quest/QuestLog.tscn" id="7_vvo7l"]
[ext_resource type="Texture2D" uid="uid://qwia360i1ir1" path="res://art/ui/UI/inventory_active.png" id="8_df8i8"]
[node name="CanvasLayer" type="CanvasLayer"]
layer = 90
follow_viewport_enabled = true
[node name="DialogicToggle" type="Node2D" parent="." node_paths=PackedStringArray("itemToToggle")]
[node name="DialogicToggle" type="Node2D" parent="."]
scale = Vector2(0.7, 0.7)
script = ExtResource("6_n5apg")
itemToToggle = NodePath("../Inventory")
[node name="Inventory" type="Control" parent="." node_paths=PackedStringArray("_slotsParent", "_slotsMover", "_headerSlots", "_slotSelect")]
[node name="Inventory" type="Control" parent="." node_paths=PackedStringArray("_headerSlots")]
layout_mode = 3
anchors_preset = 8
anchor_left = 0.5
@@ -30,13 +28,9 @@ grow_vertical = 2
scale = Vector2(0.7, 0.7)
size_flags_vertical = 8
script = ExtResource("1_6wusm")
_slotsParent = NodePath("SlotsContainer/SlotsMover/Slots")
_slotsMover = NodePath("SlotsContainer/SlotsMover")
_headerSlots = [NodePath("SlotsContainer/SlotsMover/Slots/Slot"), NodePath("SlotsContainer/SlotsMover/Slots/Slot2"), NodePath("SlotsContainer/SlotsMover/Slots/Slot3"), NodePath("SlotsContainer/SlotsMover/Slots/Slot4"), NodePath("SlotsContainer/SlotsMover/Slots/Slot5"), NodePath("SlotsContainer/SlotsMover/Slots/Slot6"), NodePath("SlotsContainer/SlotsMover/Slots/Slot7"), NodePath("SlotsContainer/SlotsMover/Slots/Slot8"), NodePath("SlotsContainer/SlotsMover/Slots/Slot9")]
_slotSelect = NodePath("SlotsContainer/SlotsMover/SlotSelectContainer/Selector")
_headerSlots = []
[node name="SlotsContainer" type="Control" parent="Inventory"]
custom_minimum_size = Vector2(500, 0)
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
@@ -46,7 +40,8 @@ anchor_bottom = 0.5
offset_left = -250.0
offset_right = 250.0
grow_horizontal = 2
grow_vertical = 2
grow_vertical = 0
scale = Vector2(0.7, 0.7)
[node name="SlotsMover" type="Control" parent="Inventory/SlotsContainer"]
custom_minimum_size = Vector2(900, 610)
@@ -450,3 +445,40 @@ offset_right = 100.0
offset_bottom = 100.0
texture = ExtResource("8_df8i8")
expand_mode = 1
[node name="QuestLogRoot" parent="." instance=ExtResource("7_vvo7l")]
[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
grow_vertical = 0
[node name="ColorRect" type="ColorRect" parent="Control"]
custom_minimum_size = Vector2(200, 200)
layout_mode = 0
offset_left = 150.0
offset_top = -250.0
offset_right = 350.0
offset_bottom = -50.0
color = Color(1, 1, 0.584314, 1)
script = ExtResource("6_n5apg")
_showPosition = Vector2(150, -250)
_hidePosition = Vector2(150, 50)
[node name="Text" type="Label" parent="Control/ColorRect"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 20.0
offset_top = 20.0
offset_right = -20.0
offset_bottom = -20.0
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
text = "Switch to Unity"
horizontal_alignment = 1
vertical_alignment = 1
+67
View File
@@ -0,0 +1,67 @@
[gd_scene load_steps=3 format=3 uid="uid://1iqqwh7d6xoh"]
[ext_resource type="Script" uid="uid://dwhee40ksubke" path="res://scripts/CSharp/Common/Quest/QuestListItemUi.cs" id="1_svwef"]
[ext_resource type="Texture2D" uid="uid://cvu5dybw31uxn" path="res://art/ui/UI/Circle.png" id="2_qlq3v"]
[node name="QuestListItem" type="Control"]
custom_minimum_size = Vector2(0, 40)
layout_mode = 3
anchors_preset = 0
offset_right = 300.0
offset_bottom = 30.0
script = ExtResource("1_svwef")
[node name="TitleButton" type="Button" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
flat = true
[node name="HBoxContainer" type="HBoxContainer" parent="TitleButton"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="TitleButton/HBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_top = 0
theme_override_constants/margin_right = 30
theme_override_constants/margin_bottom = 0
[node name="DotText" type="Label" parent="TitleButton/HBoxContainer/MarginContainer"]
layout_mode = 2
size_flags_vertical = 1
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 17
text = "•"
vertical_alignment = 1
[node name="TitleText" type="Label" parent="TitleButton/HBoxContainer"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 17
text = "Switch to Unity"
vertical_alignment = 1
autowrap_mode = 2
[node name="Circled" type="TextureRect" parent="TitleButton"]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_qlq3v")
[connection signal="pressed" from="TitleButton" to="." method="ClickedTitleButton"]
+162
View File
@@ -0,0 +1,162 @@
[gd_scene load_steps=6 format=3 uid="uid://2q1n6g2kj5er"]
[ext_resource type="Script" uid="uid://c7ilqe2fmjyvx" path="res://scripts/CSharp/Common/Quest/QuestListUi.cs" id="1_17sli"]
[ext_resource type="Script" uid="uid://o1qpo0wdqlw3" path="res://scripts/CSharp/Common/Quest/QuestLog.cs" id="1_vc33n"]
[ext_resource type="PackedScene" uid="uid://1iqqwh7d6xoh" path="res://prefabs/UI/Quest/QuestListItem.tscn" id="2_fswdj"]
[ext_resource type="Texture2D" uid="uid://d0anh3hdk0clc" path="res://art/ui/UI/journal_standard.png" id="2_wdbu4"]
[ext_resource type="Script" uid="uid://b8mywolvj2yq7" path="res://scripts/CSharp/Common/Quest/QuestDescriptionUi.cs" id="4_1vy15"]
[node name="QuestLogRoot" type="Control"]
layout_mode = 3
anchors_preset = 0
[node name="MovingLog" type="Control" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 460.0
offset_top = -615.0
offset_right = 1460.0
offset_bottom = -54.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
mouse_filter = 2
script = ExtResource("1_vc33n")
_closedPos = Vector2(460, -615)
_openedPos = Vector2(460, 240)
[node name="Background" type="Control" parent="MovingLog"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="TextureRect" type="TextureRect" parent="MovingLog/Background"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_wdbu4")
expand_mode = 2
stretch_mode = 5
[node name="MarginContainer" type="MarginContainer" parent="MovingLog"]
layout_mode = 2
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 160
theme_override_constants/margin_top = 60
theme_override_constants/margin_right = 160
theme_override_constants/margin_bottom = 60
[node name="ReferenceRect" type="ReferenceRect" parent="MovingLog/MarginContainer"]
layout_mode = 2
[node name="QuestLog" type="HBoxContainer" parent="MovingLog/MarginContainer/ReferenceRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="LeftPage" type="Control" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog"]
layout_mode = 2
size_flags_horizontal = 3
[node name="MarginContainer" type="MarginContainer" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/LeftPage"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 15
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 15
[node name="ReferenceRect" type="ReferenceRect" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/LeftPage/MarginContainer"]
layout_mode = 2
border_color = Color(1.49205e-06, 0.62774, 0.489941, 1)
[node name="VBoxContainer2" type="VBoxContainer" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/LeftPage/MarginContainer/ReferenceRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/LeftPage/MarginContainer/ReferenceRect/VBoxContainer2"]
custom_minimum_size = Vector2(0, 60.975)
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 31
text = "Quests"
horizontal_alignment = 1
vertical_alignment = 1
[node name="VBoxContainer" type="VBoxContainer" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/LeftPage/MarginContainer/ReferenceRect/VBoxContainer2"]
layout_mode = 2
size_flags_vertical = 3
script = ExtResource("1_17sli")
_questListItemPrefab = ExtResource("2_fswdj")
[node name="RightPage" type="Control" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog"]
layout_mode = 2
size_flags_horizontal = 3
[node name="MarginContainer" type="MarginContainer" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 15
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 15
[node name="ReferenceRect" type="ReferenceRect" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage/MarginContainer"]
layout_mode = 2
border_color = Color(1.49205e-06, 0.62774, 0.489941, 1)
[node name="VBoxContainer2" type="VBoxContainer" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage/MarginContainer/ReferenceRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage/MarginContainer/ReferenceRect/VBoxContainer2"]
custom_minimum_size = Vector2(0, 60.975)
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 31
text = "Details"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Description" type="RichTextLabel" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage/MarginContainer/ReferenceRect/VBoxContainer2"]
layout_mode = 2
size_flags_vertical = 3
theme_override_colors/default_color = Color(0, 0, 0, 1)
bbcode_enabled = true
text = "[center][font_size=24]Find 10 Mushroms[/font_size][/center]
Collect 10 mushroms in the forrest by the bushes down the road with the singn that says \"to the mushroms\" and has a small mushrom logo on it. Its realy hard to miss."
script = ExtResource("4_1vy15")
[connection signal="DetailQuestChanged" from="MovingLog" to="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage/MarginContainer/ReferenceRect/VBoxContainer2/Description" method="UpdateText"]
+6 -1
View File
@@ -2122,6 +2122,10 @@ texture = ExtResource("816_1a3c1")
region_enabled = true
region_rect = Rect2(-1, 1128, 417, 299)
[node name="Camera2D" type="Camera2D" parent="CharacterBody2D"]
position = Vector2(26, -469)
zoom = Vector2(0.3, 0.3)
[node name="WateringCanUI" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("_stages")]
position = Vector2(0, -929)
scale = Vector2(2, 2)
@@ -2163,10 +2167,11 @@ visible = false
position = Vector2(3, 12)
texture = ExtResource("473_g32y8")
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer", "_wateringParticles")]
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer", "_camera", "_wateringParticles")]
script = ExtResource("817_6nrw3")
_fieldPrefab = ExtResource("818_16w6h")
_movingPlayer = NodePath("../CharacterBody2D")
_camera = NodePath("../CharacterBody2D/Camera2D")
_wateringParticles = NodePath("../pouring water vfx")
_wateringCanParticlesVerticalOffset = -100.0
+10 -20
View File
@@ -1,13 +1,10 @@
[gd_scene load_steps=11 format=3 uid="uid://b1d2e7ely6hyw"]
[gd_scene load_steps=8 format=3 uid="uid://b1d2e7ely6hyw"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="1_femni"]
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="2_femni"]
[ext_resource type="Texture2D" uid="uid://cgmu3qlovdr22" path="res://art/masks/field_outline_1.png" id="3_cus02"]
[ext_resource type="Texture2D" uid="uid://eg5ej0mtuac" path="res://art/masks/field_outline_2.png" id="4_msuq8"]
[ext_resource type="Texture2D" uid="uid://djpigvoyadvjs" path="res://art/masks/field_outline_3.png" id="5_21et0"]
[ext_resource type="Texture2D" uid="uid://cpxjptdjw7bi6" path="res://art/farm/tilable grounds/böden/trockene farming erde rund.png" id="2_yi42k"]
[ext_resource type="Texture2D" uid="uid://d3dq15edmgbwf" path="res://art/farm/tilable grounds/böden/nasse farming erde rund.png" id="4_lsfck"]
[ext_resource type="PackedScene" uid="uid://c3hwbwo423nbm" path="res://prefabs/farm/base_plant_2d.tscn" id="5_femni"]
[ext_resource type="Texture2D" uid="uid://c2pirgay3jfnn" path="res://art/farm/tilable grounds/böden/trockene farming erde.png" id="6_4k6eh"]
[ext_resource type="Texture2D" uid="uid://ctvdxwgmfaj5c" path="res://art/farm/tilable grounds/böden/nasse farming erde.png" id="7_rrmd3"]
[sub_resource type="CircleShape2D" id="CircleShape2D_yi42k"]
resource_local_to_scene = true
@@ -24,15 +21,13 @@ visible = false
z_index = 1
scale = Vector2(2.225, 2.225)
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldSprite", "_maskSprite", "_growingCollider")]
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_growingCollider")]
z_index = -1
scale = Vector2(0.9, 1)
texture = ExtResource("2_yi42k")
script = ExtResource("2_femni")
_fieldSprite = NodePath("MaskedField/FieldTexture")
_maskSprite = NodePath("MaskedField")
_maskTexture = Array[Texture2D]([ExtResource("3_cus02"), ExtResource("4_msuq8"), ExtResource("5_21et0")])
Tilled = ExtResource("6_4k6eh")
Watered = ExtResource("7_rrmd3")
Tilled = ExtResource("2_yi42k")
Watered = ExtResource("4_lsfck")
_growingCollider = NodePath("BasePlant/InteractionArea")
[node name="BasePlant" parent="FieldBehaviour" node_paths=PackedStringArray("_field") instance=ExtResource("5_femni")]
@@ -50,17 +45,12 @@ shape = SubResource("CircleShape2D_yi42k")
[node name="CollisionShape3D" parent="FieldBehaviour/BasePlant/ReadyPlantInventoryItem/InteractionArea2/Area2D" index="0"]
shape = SubResource("CircleShape2D_femni")
[node name="Label" parent="FieldBehaviour/BasePlant/ReadyPlantInventoryItem/InteractionArea2" index="1"]
visible = false
[node name="ReadyPlant" parent="FieldBehaviour/BasePlant/ReadyPlantInventoryItem" index="5"]
position = Vector2(0, -291.3)
[node name="MaskedField" type="Sprite2D" parent="FieldBehaviour"]
clip_children = 1
scale = Vector2(1.5, 1.5)
texture = ExtResource("4_msuq8")
[node name="FieldTexture" type="Sprite2D" parent="FieldBehaviour/MaskedField"]
texture = ExtResource("6_4k6eh")
[connection signal="Interacted" from="InteractionArea2" to="FieldBehaviour/BasePlant" method="Grow"]
[editable path="FieldBehaviour/BasePlant"]
-122
View File
@@ -1,122 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://muuxxgvx33fp"]
[ext_resource type="Texture2D" uid="uid://hvchk6t0xe7j" path="res://art/animals/Ente.png" id="1_cgxhx"]
[node name="Duck" type="Node2D"]
[node name="body" type="Sprite2D" parent="."]
position = Vector2(14, 222)
scale = Vector2(1.07526, 1.01724)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(30, 168, 125, 326)
[node name="head" type="Sprite2D" parent="body"]
position = Vector2(58, -166)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(45, 24, 87, 82)
[node name="beak upper" type="Sprite2D" parent="body/head"]
z_index = 1
y_sort_enabled = true
position = Vector2(28, 16)
scale = Vector2(0.585, 0.5)
texture = ExtResource("1_cgxhx")
offset = Vector2(50, 0)
region_enabled = true
region_rect = Rect2(292, 37, 152, 98)
[node name="beak lower" type="Sprite2D" parent="body/head"]
y_sort_enabled = true
position = Vector2(24, 34)
rotation = 0.0428005
scale = Vector2(0.585, 0.5)
texture = ExtResource("1_cgxhx")
offset = Vector2(50, 0)
region_enabled = true
region_rect = Rect2(295, 170, 145, 39)
[node name="wing" type="Sprite2D" parent="body"]
position = Vector2(-62, 103)
rotation = -0.41677
scale = Vector2(0.889059, 0.988488)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(196, 231, 180, 164)
[node name="underbelly" type="Sprite2D" parent="body"]
position = Vector2(-14.8802, 125.831)
rotation = -2.93148
scale = Vector2(0.710887, 1.04894)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(196, 231, 180, 164)
[node name="leg left" type="Sprite2D" parent="body"]
position = Vector2(30, 95)
rotation = 2.58706
scale = Vector2(0.679, 0.679)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(196, 231, 177, 161)
[node name="left thigh" type="Sprite2D" parent="body/leg left"]
position = Vector2(83.7622, -71.8698)
rotation = 0.610927
scale = Vector2(0.886555, 0.832726)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(368, 263, 81, 89)
[node name="left shin" type="Sprite2D" parent="body/leg left/left thigh"]
position = Vector2(1.60523, -73.2123)
rotation = -0.515749
scale = Vector2(1.1036, 0.96548)
skew = 0.0519596
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(360, 361, 68, 126)
[node name="left foot" type="Sprite2D" parent="body/leg left/left thigh/left shin"]
position = Vector2(-9.87654, -96.2852)
rotation = -2.49519
scale = Vector2(1.05636, 0.957748)
skew = -0.152411
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(246, 393, 111, 111)
[node name="leg right" type="Sprite2D" parent="body"]
position = Vector2(-33, 108)
rotation = 2.58706
scale = Vector2(0.67, 0.62)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(196, 231, 177, 161)
[node name="right thigh" type="Sprite2D" parent="body/leg right"]
position = Vector2(79.9638, -66.0038)
rotation = 1.02507
scale = Vector2(0.886555, 0.832726)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(368, 263, 81, 89)
[node name="right shin" type="Sprite2D" parent="body/leg right/right thigh"]
position = Vector2(-30.7045, -51.617)
rotation = -1.27892
scale = Vector2(1.1036, 0.96548)
skew = 0.0519596
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(360, 361, 68, 126)
[node name="right foot" type="Sprite2D" parent="body/leg right/right thigh/right shin"]
position = Vector2(52.0876, -74.1994)
rotation = 0.121931
scale = Vector2(1.05636, -0.891307)
skew = -0.152411
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(246, 393, 111, 111)
+21
View File
@@ -26,16 +26,32 @@ buses/default_bus_layout="uid://b6dwkmkyb0axk"
Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd"
InventoryManager="*res://scripts/CSharp/Common/Inventory/InventoryManager.cs"
QuestManager="*res://scripts/CSharp/Common/Quest/QuestManager.cs"
Signal_Debugger="*res://addons/SignalVisualizer/Debugger/SignalDebugger.gd"
[dialogic]
directories/dch_directory={
"Chuga": "res://dialog/Chuga.dch",
"Domovoi": "res://dialog/Domovoi.dch",
"Everyone": "res://dialog/Everyone.dch",
"Vesna2": "res://dialog/Vesna2.dch",
"Yeli": "res://dialog/Yeli.dch",
"defaulty_the_default_character": "res://dialog/defaulty_the_default_character.dch",
"semi_cat": "res://dialog/semi_cat.dch"
}
directories/dtl_directory={
"quest1_ducks_end": "res://dialog/quest1_ducks_end.dtl",
"quest1_ducks_start": "res://dialog/quest1_ducks_start.dtl",
"quest2_tomatoes_end": "res://dialog/quest2_tomatoes_end.dtl",
"quest2_tomatoes_interim": "res://dialog/quest2_tomatoes_interim.dtl",
"quest2_tomatoes_start": "res://dialog/quest2_tomatoes_start.dtl",
"quest3_beets_end": "res://dialog/quest3_beets_end.dtl",
"quest3_beets_interim": "res://dialog/quest3_beets_interim.dtl",
"quest3_beets_start": "res://dialog/quest3_beets_start.dtl",
"quest4_dinner": "res://dialog/quest4_dinner.dtl",
"quest5_forest_end": "res://dialog/quest5_forest_end.dtl",
"quest5_forest_start": "res://dialog/quest5_forest_start.dtl",
"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",
@@ -163,6 +179,11 @@ interact={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
]
}
ui_inventory_journal_open_close={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":74,"key_label":0,"unicode":106,"location":0,"echo":false,"script":null)
]
}
ui_inventory_open_close={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":73,"key_label":0,"unicode":105,"location":0,"echo":false,"script":null)
+10
View File
@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="QuestResource" load_steps=2 format=3 uid="uid://0aruj4lm74n6"]
[ext_resource type="Script" uid="uid://vji5lp4qc8pp" path="res://scripts/CSharp/Common/Quest/QuestResource.cs" id="1_kisdg"]
[resource]
script = ExtResource("1_kisdg")
id = "test_01"
title = "First Testing Quest"
description = "Do the first thing you do to complete this quest"
metadata/_custom_type_script = "uid://vji5lp4qc8pp"
+10
View File
@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="QuestResource" load_steps=2 format=3 uid="uid://be1dmc6d2mxl5"]
[ext_resource type="Script" uid="uid://vji5lp4qc8pp" path="res://scripts/CSharp/Common/Quest/QuestResource.cs" id="1_t87fj"]
[resource]
script = ExtResource("1_t87fj")
id = "test_02"
title = "Second Testing Quest"
description = "Second my ass. Do what ever. I don't care"
metadata/_custom_type_script = "uid://vji5lp4qc8pp"
+10
View File
@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="QuestResource" load_steps=2 format=3 uid="uid://tmmnsg1bge2"]
[ext_resource type="Script" uid="uid://vji5lp4qc8pp" path="res://scripts/CSharp/Common/Quest/QuestResource.cs" id="1_y0umc"]
[resource]
script = ExtResource("1_y0umc")
id = "test_03"
title = "Third Testing Quest"
description = "I'd like to apologize for the second quest, he has some bad manners"
metadata/_custom_type_script = "uid://vji5lp4qc8pp"
File diff suppressed because it is too large Load Diff
+15
View File
@@ -0,0 +1,15 @@
[gd_scene load_steps=6 format=3 uid="uid://dbpsqfedlku4f"]
[ext_resource type="PackedScene" uid="uid://cqcs80xsgygeb" path="res://prefabs/UI/Book/Book.tscn" id="1_bd7dq"]
[ext_resource type="Script" uid="uid://cg0oqug38c81n" path="res://scripts/CSharp/Common/Quest/QuestTestingScript.cs" id="2_sv6jn"]
[ext_resource type="Resource" uid="uid://0aruj4lm74n6" path="res://resources/quests/test_01.tres" id="3_nhtae"]
[ext_resource type="Resource" uid="uid://be1dmc6d2mxl5" path="res://resources/quests/test_02.tres" id="4_kr4yw"]
[ext_resource type="Resource" uid="uid://tmmnsg1bge2" path="res://resources/quests/test_03.tres" id="5_4cktu"]
[node name="BabushkaTestsBook" type="Node"]
[node name="Book" parent="." instance=ExtResource("1_bd7dq")]
[node name="QuestTesting" type="Node" parent="."]
script = ExtResource("2_sv6jn")
_questsToActivate = Array[Object]([ExtResource("3_nhtae"), ExtResource("4_kr4yw"), ExtResource("5_4cktu")])
+193
View File
@@ -0,0 +1,193 @@
[gd_scene load_steps=6 format=3 uid="uid://c4ns2ixo8k2ih"]
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="1_opxcj"]
[ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="3_sx4ix"]
[ext_resource type="Resource" uid="uid://0aruj4lm74n6" path="res://resources/quests/test_01.tres" id="4_qyyck"]
[ext_resource type="Resource" uid="uid://be1dmc6d2mxl5" path="res://resources/quests/test_02.tres" id="5_sokiv"]
[ext_resource type="Resource" uid="uid://tmmnsg1bge2" path="res://resources/quests/test_03.tres" id="6_ajsa7"]
[node name="BabushkaTestsQuests" type="Node2D"]
[node name="CanvasLayer" parent="." instance=ExtResource("1_opxcj")]
[node name="CanvasLayer2" type="CanvasLayer" parent="."]
layer = 128
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer2"]
offset_left = 71.0
offset_top = 53.0
offset_right = 571.0
offset_bottom = 353.0
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer2/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
alignment = 1
[node name="Label" type="Label" parent="CanvasLayer2/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
text = "Quest 1"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Active" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Active"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer/Active"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("4_qyyck")
toStatus = 1
makeCurrent = true
[node name="Done" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Done"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer/Done"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("4_qyyck")
toStatus = 2
[node name="Cancle" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Cancle"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer/Cancle"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("4_qyyck")
toStatus = 3
[node name="Hide" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Hide
"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer/Hide"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("4_qyyck")
[node name="HBoxContainer2" type="HBoxContainer" parent="CanvasLayer2/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
alignment = 1
[node name="Label" type="Label" parent="CanvasLayer2/VBoxContainer/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
text = "Quest 2"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Active" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 3
text = "Active"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer2/Active"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("5_sokiv")
toStatus = 1
[node name="Done" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 3
text = "Done"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer2/Done"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("5_sokiv")
toStatus = 2
[node name="Cancle" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 3
text = "Cancle"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer2/Cancle"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("5_sokiv")
toStatus = 3
[node name="Hide" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 3
text = "Hide
"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer2/Hide"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("5_sokiv")
[node name="HBoxContainer3" type="HBoxContainer" parent="CanvasLayer2/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
alignment = 1
[node name="Label" type="Label" parent="CanvasLayer2/VBoxContainer/HBoxContainer3"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
text = "Quest 3"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Active" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer3"]
layout_mode = 2
size_flags_horizontal = 3
text = "Active"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer3/Active"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("6_ajsa7")
toStatus = 1
[node name="Done" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer3"]
layout_mode = 2
size_flags_horizontal = 3
text = "Done"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer3/Done"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("6_ajsa7")
toStatus = 2
[node name="Cancle" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer3"]
layout_mode = 2
size_flags_horizontal = 3
text = "Cancle"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer3/Cancle"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("6_ajsa7")
toStatus = 3
[node name="Hide" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer3"]
layout_mode = 2
size_flags_horizontal = 3
text = "Hide
"
[node name="QuestSetter" type="Node" parent="CanvasLayer2/VBoxContainer/HBoxContainer3/Hide"]
script = ExtResource("3_sx4ix")
questResource = ExtResource("6_ajsa7")
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer/Active" to="CanvasLayer2/VBoxContainer/HBoxContainer/Active/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer/Done" to="CanvasLayer2/VBoxContainer/HBoxContainer/Done/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer/Cancle" to="CanvasLayer2/VBoxContainer/HBoxContainer/Cancle/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer/Hide" to="CanvasLayer2/VBoxContainer/HBoxContainer/Hide/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer2/Active" to="CanvasLayer2/VBoxContainer/HBoxContainer2/Active/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer2/Done" to="CanvasLayer2/VBoxContainer/HBoxContainer2/Done/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer2/Cancle" to="CanvasLayer2/VBoxContainer/HBoxContainer2/Cancle/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer2/Hide" to="CanvasLayer2/VBoxContainer/HBoxContainer2/Hide/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer3/Active" to="CanvasLayer2/VBoxContainer/HBoxContainer3/Active/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer3/Done" to="CanvasLayer2/VBoxContainer/HBoxContainer3/Done/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer3/Cancle" to="CanvasLayer2/VBoxContainer/HBoxContainer3/Cancle/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer3/Hide" to="CanvasLayer2/VBoxContainer/HBoxContainer3/Hide/QuestSetter" method="Trigger"]
@@ -4,10 +4,13 @@ namespace Babushka.scripts.CSharp.Common.Camera;
public partial class CameraController : Camera2D
{
[Export] private float _multiplier = 1.0f;
[Export] private Node2D _followNode;
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
this.GlobalPosition = _followNode.GlobalPosition;
this.Position = _followNode.Transform.Origin * _multiplier;
}
}
@@ -79,6 +79,7 @@ public partial class FarmingControls2D : Node2D
{
if (!inputEvent.IsPressed())
{
GD.Print("Input Event is not pressed." );
return;
}
@@ -87,18 +88,23 @@ public partial class FarmingControls2D : Node2D
if (inputEvent is InputEventMouseButton inputEventMouseButton)
{
GD.Print("Input Event is InputEventMouseButton." );
if (!inputEventMouseButton.Pressed)
{
GD.Print("Input Event Mouse Button is not pressed." );
return;
}
}
else
{
GD.Print("Other Input Event registered." );
return;
}
GD.Print("Current tool id: " + _toolId );
if (_toolId == 0)
{
GD.Print("Trying to create field." );
Vector2I adjustedPosition = GetAdjustedMousePosition();
MakeField(adjustedPosition);
}
@@ -1,4 +1,3 @@
using System;
using Babushka.scripts.CSharp.Common.CharacterControls;
using Godot;
@@ -16,9 +15,6 @@ public enum FieldState
[GlobalClass]
public partial class FieldBehaviour2D : Sprite2D
{
[Export] private Sprite2D _fieldSprite;
[Export] private Sprite2D _maskSprite;
[Export] private Texture2D[] _maskTexture;
[Export] private Texture2D Tilled;
[Export] private Texture2D Watered;
[Export] public FieldState FieldState = FieldState.Tilled;
@@ -29,8 +25,6 @@ public partial class FieldBehaviour2D : Sprite2D
public override void _Ready()
{
UpdateFieldState(FieldState);
int randomIndex = new Random().Next(0, _maskTexture.Length);
_maskSprite.Texture = _maskTexture[randomIndex];
base._Ready();
}
@@ -43,12 +37,12 @@ public partial class FieldBehaviour2D : Sprite2D
break;
case FieldState.Tilled:
FieldState = FieldState.Tilled;
_fieldSprite.Texture = Tilled;
Texture = Tilled;
_growingCollider.Visible = false;
break;
case FieldState.Watered:
FieldState = FieldState.Watered;
_fieldSprite.Texture = Watered;
Texture = Watered;
_growingCollider.Visible = true;
break;
case FieldState.Planted:
@@ -64,7 +58,7 @@ public partial class FieldBehaviour2D : Sprite2D
public void Water()
{
FieldState = FieldState.Watered;
_fieldSprite.Texture = Watered;
Texture = Watered;
}
/// <summary>
@@ -75,7 +69,7 @@ public partial class FieldBehaviour2D : Sprite2D
switch (FieldState)
{
case FieldState.Empty:
_fieldSprite.Texture = Tilled;
Texture = Tilled;
FieldState = FieldState.Tilled;
break;
case FieldState.Watered:
@@ -1 +0,0 @@
uid://cew02ovj51m5d
@@ -0,0 +1,22 @@
using Godot;
using System;
using Babushka.scripts.CSharp.Common.Quest;
public partial class PopUpPostIt : Control
{
private Label Text => GetNode<Label>("Text");
private AnimationPlayer Animation => GetNode<AnimationPlayer>("AnimationPlayer");
QuestManager QM => QuestManager.Instance!;
public override void _EnterTree()
{
QM.QuestBecomesActive += NewQuestPostIt;
}
private void NewQuestPostIt(QuestResource questResource)
{
Text.Text = questResource.title;
Animation.Play("NewPostit");
}
}
@@ -0,0 +1 @@
uid://byar6yqrlph6k
@@ -0,0 +1,11 @@
using Godot;
using System;
using Babushka.scripts.CSharp.Common.Util;
public partial class QuestDescriptionUi : RichTextLabel
{
public void UpdateText(QuestLog questLog)
{
Text = questLog.currentDetailQuest?.description ?? "";
}
}
@@ -0,0 +1 @@
uid://b8mywolvj2yq7
@@ -0,0 +1,51 @@
#nullable enable
using System;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
namespace Babushka.scripts.CSharp.Common.Quest;
public partial class QuestListItemUi : Control
{
private Button TitleButton => GetNode<Button>("TitleButton");
private Label TitleLabel => GetNode<Label>("TitleButton/HBoxContainer/TitleText");
private TextureRect CircleTexture => GetNode<TextureRect>("TitleButton/Circled");
private QuestResource? _questResource;
public void UpdateButton(QuestResource questResource)
{
_questResource = questResource;
var questStatus = QuestManager.Instance!.GetQuestStatus(_questResource);
var name = questResource.title;
name += questStatus.status switch
{
QuestStatus.Status.Done => " \u2713", // Check
QuestStatus.Status.Canceled => " \u2715", // X
_ => ""
};
UpdateCircled(questResource == QuestManager.Instance.GetFollowQuest());
ShowName(name);
TitleButton.Pressed += ClickedTitleButton;
}
private void UpdateCircled(bool value)
{
CircleTexture.Visible = value;
}
private void ShowName(string questResourceTitle)
{
TitleLabel.Text = questResourceTitle;
}
public void ClickedTitleButton()
{
var questLog = this.FindParentByType<QuestLog>();
if (_questResource == null)
{
throw new ArgumentNullException(nameof(_questResource), "QuestResource is null");
}
questLog.currentDetailQuest = _questResource;
}
}
@@ -0,0 +1 @@
uid://dwhee40ksubke
@@ -0,0 +1,48 @@
using Godot;
using System;
using Babushka.scripts.CSharp.Common.Quest;
public partial class QuestListUi : VBoxContainer
{
[Export]
private PackedScene _questListItemPrefab;
public override void _EnterTree()
{
UpdateList();
QuestManager.Instance!.QuestsChanged += UpdateList;
}
public override void _ExitTree()
{
QuestManager.Instance!.QuestsChanged -= UpdateList;
}
public override void _Ready()
{
UpdateList();
}
public void UpdateList()
{
// delete children
foreach (Node child in GetChildren())
{
RemoveChild(child);
child.QueueFree();
}
// recreate children
var activeQuests = QuestManager.Instance.GetVisibleQuests();
foreach (var questPair in activeQuests)
{
var questResource = questPair.Key;
var questStatus = questPair.Value;
var questListItem = _questListItemPrefab.Instantiate<QuestListItemUi>();
questListItem.UpdateButton(questResource);
AddChild(questListItem);
}
}
}
@@ -0,0 +1 @@
uid://c7ilqe2fmjyvx
+53
View File
@@ -0,0 +1,53 @@
#nullable enable
using Godot;
using System;
using Babushka.scripts.CSharp.Common.Quest;
public partial class QuestLog : Control
{
[Signal]
public delegate void DetailQuestChangedEventHandler(QuestLog questLog);
[Export]
private Vector2 _closedPos;
[Export]
private Vector2 _openedPos;
private bool _isClosed = true;
private Tween? _closeOpenTween;
public QuestResource? currentDetailQuest
{
get => QuestManager.Instance!.GetFollowQuest();
set
{
QuestManager.Instance!.SetFollowQuest(value); // TODO: fix setup
EmitSignalDetailQuestChanged(this);
}
}
public override void _EnterTree()
{
QuestManager.Instance!.QuestsChanged += () => EmitSignalDetailQuestChanged(this);
}
public override void _Input(InputEvent inputEvent)
{
if (inputEvent.IsActionPressed("ui_inventory_journal_open_close"))
{
if(_closeOpenTween != null)
_closeOpenTween.Kill();
_isClosed = !_isClosed;
_closeOpenTween = GetTree().CreateTween();
_closeOpenTween
.TweenProperty(this, "position", _isClosed ? _closedPos : _openedPos, 0.5)
.SetEase(Tween.EaseType.Out)
.SetTrans(Tween.TransitionType.Cubic);
}
}
//private QuestResource? _currentDetailQuestBacking;
}
@@ -0,0 +1 @@
uid://o1qpo0wdqlw3
@@ -0,0 +1,76 @@
using Godot;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Babushka.scripts.CSharp.Common.Quest;
using QuestPair = KeyValuePair<QuestResource, QuestStatus>;
public partial class QuestManager : Node
{
public static QuestManager? Instance { get; private set; }
[Signal]
public delegate void QuestBecomesActiveEventHandler(QuestResource questResource);
[Signal]
public delegate void QuestsChangedEventHandler();
public override void _EnterTree()
{
Instance = this;
}
private Godot.Collections.Dictionary<QuestResource, QuestStatus> _questStatus = new();
private QuestResource? _followQuest;
public void ChangeQuestStatus(QuestResource questResource, QuestStatus.Status newStatus)
{
if (!_questStatus.TryGetValue(questResource, out var value))
{
value = new QuestStatus();
_questStatus.Add(questResource, value);
}
value.status = newStatus;
EmitSignalQuestsChanged();
if (newStatus == QuestStatus.Status.Active)
{
EmitSignalQuestBecomesActive(questResource);
}
}
public IEnumerable<QuestPair> GetVisibleQuests()
{
return _questStatus.Where(qs => qs.Value.status != QuestStatus.Status.Hidden);
}
public IEnumerable<QuestPair> GetActiveQuests()
{
return _questStatus.Where(qs => qs.Value.status == QuestStatus.Status.Active);
}
public QuestStatus GetQuestStatus(QuestResource questResource)
{
if (_questStatus.TryGetValue(questResource, out var status))
return status;
status = new QuestStatus();
_questStatus.Add(questResource, status);
return status;
}
public QuestResource? GetFollowQuest()
{
return _followQuest;
}
public void SetFollowQuest(QuestResource? questResource)
{
_followQuest = questResource;
EmitSignalQuestsChanged();
}
}
@@ -0,0 +1 @@
uid://dl2uhq12p3qks
@@ -0,0 +1,86 @@
using Godot;
using System;
using System.Net.Mime;
using Babushka.scripts.CSharp.Common.Quest;
public partial class QuestMessagePopup : Control
{
private Label Text => GetNode<Label>("Text");
private QuestResource? _currentlyShown;
private Tween? _activeTween = null;
[Export]
private Vector2 _showPosition;
[Export]
private Vector2 _hidePosition;
public override void _EnterTree()
{
QuestManager.Instance!.QuestsChanged += NewActiveQuest;
}
public override void _ExitTree()
{
QuestManager.Instance!.QuestsChanged -= NewActiveQuest;
}
private void NewActiveQuest()
{
var shownQuest = QuestManager.Instance!.GetFollowQuest();
if (_currentlyShown == shownQuest)
return;
if (_activeTween != null)
{
_activeTween.Kill();
}
if (shownQuest == null)
{
HideAnimate();
_currentlyShown = null;
return;
}
if (_currentlyShown == null)
{
Text.Text = shownQuest.title;
ShowAnimate();
_currentlyShown = shownQuest;
return;
}
// else (_currentlyShown != null)
_currentlyShown = shownQuest;
HideAnimate(() =>
{
Text.Text = shownQuest.title;
ShowAnimate();
});
}
private void HideAnimate(Action? then = null)
{
_activeTween = GetTree().CreateTween();
_activeTween.TweenProperty(this, "position", _hidePosition, 0.4)
.SetTrans(Tween.TransitionType.Cubic)
.SetEase(Tween.EaseType.Out);
if (then != null)
_activeTween.Finished += then;
}
private void ShowAnimate(Action? then = null)
{
_activeTween = GetTree().CreateTween();
_activeTween.TweenProperty(this, "position", _showPosition, 0.4)
.SetTrans(Tween.TransitionType.Cubic)
.SetEase(Tween.EaseType.Out);
if (then != null)
_activeTween.Finished += then;
}
}
@@ -0,0 +1 @@
uid://7wwid23tc8as
@@ -0,0 +1,13 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Quest;
[GlobalClass]
public partial class QuestResource : Resource
{
[Export]
public string id = "";
[Export]
public string title = "";
[Export(PropertyHint.MultilineText)]
public string description = "";
}
@@ -0,0 +1 @@
uid://vji5lp4qc8pp
@@ -0,0 +1,16 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Quest;
public partial class QuestStatus : GodotObject
{
public enum Status
{
Hidden,
Active,
Done,
Canceled,
}
public Status status = Status.Hidden;
}
@@ -0,0 +1 @@
uid://bpqgcchuubfiy
@@ -0,0 +1,20 @@
using Godot;
using System;
using System.Collections.Generic;
using Babushka.scripts.CSharp.Common.Quest;
using Godot.Collections;
public partial class QuestTestingScript : Node
{
[Export(PropertyHint.ArrayType)]
private Array<QuestResource> _questsToActivate;
public override void _EnterTree()
{
foreach (var questResource in _questsToActivate)
{
QuestManager.Instance.ChangeQuestStatus(questResource, QuestStatus.Status.Active);
}
}
}
@@ -0,0 +1 @@
uid://cg0oqug38c81n
@@ -0,0 +1,33 @@
using Godot;
using System;
using Babushka.scripts.CSharp.Common.Quest;
public partial class QuestTrigger : Node
{
[Export]
public QuestResource? questResource;
[Export]
public QuestStatus.Status toStatus;
[Export]
private bool makeCurrent = false;
public void Trigger()
{
GD.Print("trigger");
if(questResource== null)
throw new Exception("QuestResource is not set on QuestTrigger node.");
if(QuestManager.Instance == null)
throw new Exception("QuestManager instance is not available. Make sure it is initialized before calling Trigger.");
QuestManager.Instance.ChangeQuestStatus(questResource, toStatus);
if (makeCurrent)
{
QuestManager.Instance.SetFollowQuest(questResource);
}
}
}
@@ -0,0 +1 @@
uid://cldtt4atgymm5
@@ -0,0 +1,26 @@
using System;
using Godot;
namespace Babushka.scripts.CSharp.Common.Util;
public static class NodeExtension
{
/// <summary>
/// Searches for a parent node of the specified type.
/// </summary>
/// <typeparam name="T">The type of the parent node to search for. The search is successful, when <code>searchedNode is T</code></typeparam>
/// <param name="self">The node from which to start the search.</param>
/// <returns>The parent node of type T if found, otherwise throws an exception.</returns>
public static T FindParentByType<T>(this Node self)
{
var parent = self.GetParent();
while (parent != null)
{
if (parent is T tParent)
{
return tParent;
}
parent = parent.GetParent();
}
throw new Exception($"Parent of type {typeof(T)} not found for node {self.Name}");
}
}
@@ -0,0 +1 @@
uid://bwisbh2f2ci6l