Compare commits

...

6 Commits

Author SHA1 Message Date
jonathan 06a270e916 Renamed function to not sound like a unity signal 2025-08-14 23:27:15 +02:00
jonathan b621df5435 removed invisible character 2025-08-14 23:16:52 +02:00
jonathan 03dbc08293 quest status name refactoring 2025-08-14 21:54:18 +02:00
jonathan 8676bbb2f6 Fix spelling 2025-08-13 17:13:33 +02:00
jonathan 6e998810b6 Completed first demo quest line 2025-08-13 03:23:45 +02:00
jonathan c96be7467e Added Quest field 2025-08-11 19:15:12 +02:00
40 changed files with 243 additions and 124 deletions
+7 -1
View File
@@ -1,6 +1,12 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArea3D_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F8a54226fa2e1c9371a8091f24cfd744aef11fe6869527dc23b9b837623a29b9_003FArea3D_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAudioStreamPlayer2D_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F848324b1c23114c3f5e8bbb5a42c4ade394c59a7a7a133a66b76581ca571_003FAudioStreamPlayer2D_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EVesnaBehaviour2D_005FScriptProperties_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F4298b0f293f987511fc1b7956ee691fd778f8378_003FBabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EVesnaBehaviour2D_005FScriptProperties_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABabushka_002Escripts_002ECSharp_002ECommon_002EQuest_002EQuestListItemUi_005FScriptMethods_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F48fad7e7f3c9e292b3fdbddf9d363f0d1752aa_003FBabushka_002Escripts_002ECSharp_002ECommon_002EQuest_002EQuestListItemUi_005FScriptMethods_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACastHelpers_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F3c92637ae2e83da0a63791071c41eae291d594156062866d8621b7ed7245c_003FCastHelpers_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACastHelpers_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fd111abf504bf42b5968a609b168fd093b2e200_003Fbb_003F1c116fcd_003FCastHelpers_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACharacterBody2D_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fbba0bbd7a98ee58286e9484fbe86e01afff6232283f6efd3556eb7116453_003FCharacterBody2D_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Ff1d69ec2da76ccf9bc8a75c8e0fdca9a7ba1adf8c8c9d5047e2fa5991c02eca_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003Fhome_003Fjonathan_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe37dc1faf08a4d5ea030ad59bdf77522523400_003Fd4_003Fbd338aeb_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Ff1d69ec2da76ccf9bc8a75c8e0fdca9a7ba1adf8c8c9d5047e2fa5991c02eca_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AResourceLoader_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F9f4e8eb124d11f8219cb513a19bed22b2120ed29f9d6785ba56e3367b48d581_003FResourceLoader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fc7102cd0ffb8973777e61b1942c3fffac7e14016a511d055c3adf73ff91748_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
@@ -9,7 +9,7 @@ var quest_resource: String
func _execute() -> void:
var resource = ResourceLoader.load(quest_resource)
QuestManager.ChangeQuestStatus(resource,QuestEventUtils.QuestStatus.AVAILABLE)
QuestManager.SetFollowQuest(resource)
QuestManager.SetActiveQuest(resource)
finish() # called to continue with the next event
@@ -9,7 +9,7 @@ var quest_resource: String
func _execute() -> void:
var resource = ResourceLoader.load(quest_resource)
QuestManager.ChangeQuestStatus(resource,QuestEventUtils.QuestStatus.DONE)
QuestManager.SetFollowQuest(null)
QuestManager.SetActiveQuest(null)
finish() # called to continue with the next event
@@ -23,9 +23,9 @@ func _execute() -> void:
var result: bool
if compare_status == QuestEventUtils.QuestStatusOrActive.ACTIVE:
result = QuestManager.GetFollowQuest() == resource
result = QuestManager.GetActiveQuest() == resource
elif compare_status == QuestEventUtils.QuestStatusOrActive.NOT_ACTIVE:
result = QuestManager.GetFollowQuest() != resource
result = QuestManager.GetActiveQuest() != resource
else:
result = QuestManager.GetQuestStatus(resource).status == compare_status
@@ -1,6 +1,8 @@
[quest_complete quest_resource="res://resources/quests/demo/7_talk_yeli_inside_1.tres"]
join Yeli center
Yeli: Thank you for your help out there.
Yeli: You must be tired. Please rest. I prepared a bed for you. It's in the room to the left.
Yeli: There is nothing interesting to see here.
leave Yeli
[quest_activate quest_resource="res://resources/quests/demo/8_goto_bed.tres"]
[end_timeline]
@@ -1,3 +1,4 @@
[quest_complete quest_resource="res://resources/quests/demo/9_talk_to_chuga.tres"]
join vesna center
join Chuga center
Chuga: Look who it is!
@@ -19,4 +20,5 @@ Chuga: So, listen\: “I wear a crown, but Im no king.” Vesna, what am I?
- Soup
Chuga: Hate the player, not the game.
Chuga: Here you go!
[quest_activate quest_resource="res://resources/quests/demo/10_fight_the_monsters.tres"]
[end_timeline]
+1 -2
View File
@@ -1,7 +1,7 @@
[gd_scene load_steps=11 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="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="1_l3npx"]
[ext_resource type="Script" path="res://scripts/GdScript/dialogic_toggle.gd" id="1_l3npx"]
[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"]
@@ -458,7 +458,6 @@ expand_mode = 1
[node name="QuestLogRoot" parent="." instance=ExtResource("7_vvo7l")]
[node name="Control" type="Control" parent="."]
visible = false
layout_mode = 3
anchors_preset = 2
anchor_top = 1.0
+2 -2
View File
@@ -473,7 +473,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/tomato_field.tscn" id="818_16w6h"]
[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="819_4na52"]
[ext_resource type="Script" path="res://scripts/GdScript/dialogic_toggle.gd" id="819_4na52"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ssqtd"]
radius = 110.018
@@ -2071,7 +2071,7 @@ y_sort_enabled = true
script = ExtResource("1_yd5ep")
_farmingControls = NodePath("FarmingControls")
_player2d = NodePath("CharacterBody2D")
_vesnaAnimations = NodePath("CharacterBody2D/visuals/Animated Sprites")
_vesnaAnimations = NodePath("CharacterBody2D/visuals")
[node name="CharacterBody2D" type="CharacterBody2D" parent="." groups=["PlantGrowing"]]
position = Vector2(0, 374)
+4
View File
@@ -110,12 +110,16 @@ translation/locales=["de", "en"]
text/autopauses={}
glossary/glossary_files=["res://dialog/farming_equipment_glossary.tres"]
directories/tres_directory={
"10_fight_the_monsters": "res://resources/quests/demo/10_fight_the_monsters.tres",
"1_talk_yeli_1": "res://resources/quests/demo/1_talk_yeli_1.tres",
"2_collect_ducks": "res://resources/quests/demo/2_collect_ducks.tres",
"3_talk_yeli_2": "res://resources/quests/demo/3_talk_yeli_2.tres",
"4_collect_tools": "res://resources/quests/demo/4_collect_tools.tres",
"5_talk_yeli_3": "res://resources/quests/demo/5_talk_yeli_3.tres",
"6_till_and_water": "res://resources/quests/demo/6_till_and_water.tres",
"7_talk_yeli_inside_1": "res://resources/quests/demo/7_talk_yeli_inside_1.tres",
"8_goto_bed": "res://resources/quests/demo/8_goto_bed.tres",
"9_talk_to_chuga": "res://resources/quests/demo/9_talk_to_chuga.tres",
"Babushka_NPC_Namebox_background": "res://dialog/Babushka_NPC_Namebox_background.tres",
"InputFieldsStyle": "res://addons/dialogic/Editor/Events/styles/InputFieldsStyle.tres",
"MainTheme": "res://addons/dialogic/Editor/Theme/MainTheme.tres",
@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="QuestResource" load_steps=2 format=3 uid="uid://cv3wtnn0138ax"]
[ext_resource type="Script" uid="uid://vji5lp4qc8pp" path="res://scripts/CSharp/Common/Quest/QuestResource.cs" id="1_m0nkd"]
[resource]
script = ExtResource("1_m0nkd")
id = "10_fight_the_monsters"
title = "Fight the monsters"
description = "A dangerous path lies before you. Be brave and slay the monsters to reach the other side."
metadata/_custom_type_script = "uid://vji5lp4qc8pp"
@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="QuestResource" load_steps=2 format=3 uid="uid://byjqeukpibkvi"]
[ext_resource type="Script" uid="uid://vji5lp4qc8pp" path="res://scripts/CSharp/Common/Quest/QuestResource.cs" id="1_f2jsb"]
[resource]
script = ExtResource("1_f2jsb")
id = "7_talk_yeli_inside_1"
title = "Talk to Yeli in the house"
description = "Go inside the house and find yeli again"
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://csj15gnlx1jmx"]
[ext_resource type="Script" uid="uid://vji5lp4qc8pp" path="res://scripts/CSharp/Common/Quest/QuestResource.cs" id="1_y6h00"]
[resource]
script = ExtResource("1_y6h00")
id = "8_goto_bed"
title = "Go to sleep"
description = "Go into Vesnas room on the left of the house. Go to bed to unexaust you."
metadata/_custom_type_script = "uid://vji5lp4qc8pp"
@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="QuestResource" load_steps=2 format=3 uid="uid://c3mwhrvk12oml"]
[ext_resource type="Script" uid="uid://vji5lp4qc8pp" path="res://scripts/CSharp/Common/Quest/QuestResource.cs" id="1_hrrlk"]
[resource]
script = ExtResource("1_hrrlk")
id = "9_talk_to_chuga"
title = "Talk to Chuga"
description = "A strange creature is standing infront of you. Go talk to him. I promise, he won't hurt you... for now."
metadata/_custom_type_script = "uid://vji5lp4qc8pp"
+17 -6
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=113 format=3 uid="uid://gigb28qk8t12"]
[gd_scene load_steps=119 format=3 uid="uid://gigb28qk8t12"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Player2D.tscn" id="1_7wfwe"]
[ext_resource type="Texture2D" uid="uid://8sr11ex30n0m" path="res://art/mockups/Kenney_Backgrounds/Samples/uncolored_hills.png" id="2_7b2ri"]
@@ -73,6 +73,10 @@
[ext_resource type="Resource" uid="uid://d2swjixbnqkbw" path="res://resources/quests/demo/4_collect_tools.tres" id="68_lbnqo"]
[ext_resource type="Script" uid="uid://be54lnb6gg81f" path="res://scripts/CSharp/Common/Inventory/ItemInstance.cs" id="69_4rgbr"]
[ext_resource type="Resource" uid="uid://5t8g0firdif0" path="res://resources/quests/demo/5_talk_yeli_3.tres" id="69_l4wxt"]
[ext_resource type="Script" uid="uid://bhbldab74vmhy" path="res://scripts/CSharp/Common/QuestBehaviour/DetectFieldWork.cs" id="74_fv1t2"]
[ext_resource type="Resource" uid="uid://h05jgxqtq37m" path="res://resources/quests/demo/6_till_and_water.tres" id="75_l7ekk"]
[ext_resource type="Resource" uid="uid://byjqeukpibkvi" path="res://resources/quests/demo/7_talk_yeli_inside_1.tres" id="76_xcwle"]
[ext_resource type="Script" uid="uid://dih1b0opgc3f7" path="res://scripts/GdScript/dialogic_start_specific.gd" id="77_l7ekk"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wtdui"]
shader = ExtResource("13_7p0hq")
@@ -2328,9 +2332,6 @@ offset_top = 0.228533
offset_right = -456.339
offset_bottom = 30.2285
[node name="Control" parent="CanvasLayer" index="3"]
visible = true
[node name="Audio" type="Node" parent="."]
[node name="Background Music Ramp up" type="AudioStreamPlayer2D" parent="Audio"]
@@ -2380,14 +2381,23 @@ script = ExtResource("40_w3jkj")
script = ExtResource("66_2065p")
questResource = ExtResource("67_tm0yg")
toStatus = 1
makeCurrent = true
makeActive = true
[node name="ToolsCollectedTrigger" type="Node" parent="SpeicialQuestTrigger"]
script = ExtResource("68_hux6i")
_itemsToContain = Array[Resource]([SubResource("Resource_y820s"), SubResource("Resource_50loj")])
_onActiveQuest = ExtResource("68_lbnqo")
_onAvailableQuest = ExtResource("68_lbnqo")
_toNextQuest = ExtResource("69_l4wxt")
[node name="FieldWorkTrigger" type="Node" parent="SpeicialQuestTrigger"]
script = ExtResource("74_fv1t2")
_onAvailableQuest = ExtResource("75_l7ekk")
_toNextQuest = ExtResource("76_xcwle")
[node name="StartDialog" type="Node" parent="SpeicialQuestTrigger/FieldWorkTrigger"]
script = ExtResource("77_l7ekk")
timeline = "quest2_tomatoes_end"
[connection signal="FilledWateringCan" from="YSorted/Vesna" to="Audio/SFX/FillWater SFX2" method="PlayOneShot"]
[connection signal="WateringField" from="YSorted/Vesna/FarmingControls" to="Audio/SFX/Watering SFX" method="PlayOneShot"]
[connection signal="InteractedTool" from="YSorted/Brünnen/InteractionArea" to="YSorted/Vesna" method="TryFillWateringCan"]
@@ -2406,6 +2416,7 @@ _toNextQuest = ExtResource("69_l4wxt")
[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"]
[editable path="YSorted/Vesna"]
[editable path="YSorted/Brünnen/InteractionArea"]
+14 -3
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=70 format=3 uid="uid://bb6r385qvyoba"]
[gd_scene load_steps=72 format=3 uid="uid://bb6r385qvyoba"]
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_vl6d5"]
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="3_jrqoq"]
@@ -28,7 +28,7 @@
[ext_resource type="PackedScene" uid="uid://hk8ahyp6dgl6" path="res://prefabs/fight/fight_base_scene.tscn" id="27_55b52"]
[ext_resource type="PackedScene" uid="uid://bp64p6y72j71w" path="res://prefabs/fight/fighters/enemy_blob_fighter.tscn" id="27_hfhye"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Player2D.tscn" id="29_3jjxs"]
[ext_resource type="PackedScene" path="res://prefabs/characters/Chugar.tscn" id="29_26tkn"]
[ext_resource type="PackedScene" uid="uid://ddpl8cbck7e6s" path="res://prefabs/characters/Chugar.tscn" id="29_26tkn"]
[ext_resource type="PackedScene" uid="uid://cr66tpdr5rma5" path="res://prefabs/fight/fighters/enemy_mavkha_fighter.tscn" id="29_hfhye"]
[ext_resource type="Resource" uid="uid://dlcmqfjvgphqu" path="res://resources/items/rake.tres" id="30_l10vl"]
[ext_resource type="Resource" uid="uid://cndd64batns31" path="res://resources/items/wateringcan.tres" id="31_c2gvt"]
@@ -48,7 +48,9 @@
[ext_resource type="Script" uid="uid://clxb3n668oud3" path="res://scripts/CSharp/Common/Audio/AudioDebugger.cs" id="52_x1mmf"]
[ext_resource type="AudioStream" uid="uid://vcftvrpi6c7k" path="res://audio/sfx/Farming/SFX_Harke_03_Solo.wav" id="54_4l7ky"]
[ext_resource type="AudioStream" uid="uid://bxh5m04vdo0sr" path="res://audio/sfx/Farming/SFX_Harke_04_Solo.wav" id="55_dk5xw"]
[ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="55_ub0r7"]
[ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer.cs" id="56_bjj0f"]
[ext_resource type="Resource" uid="uid://c3mwhrvk12oml" path="res://resources/quests/demo/9_talk_to_chuga.tres" id="56_q833x"]
[ext_resource type="AudioStream" uid="uid://dapsknn486aee" path="res://audio/sfx/Farming/SFX_WateringPlants_01.wav" id="57_ehh6a"]
[ext_resource type="AudioStream" uid="uid://dnyne8wov50so" path="res://audio/sfx/Farming/SFX_WateringPlants_02.wav" id="58_mfld1"]
[ext_resource type="AudioStream" uid="uid://fsiypqhql67w" path="res://audio/sfx/Farming/SFX_GettingWater_01.wav" id="59_soiyx"]
@@ -2064,7 +2066,7 @@ region_rect = Rect2(1483.92, 1280.2, 1139.55, 367.598)
[node name="BorderCollisionBody" type="StaticBody2D" parent="YSorted/ForestVisuals"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="YSorted/ForestVisuals/BorderCollisionBody"]
polygon = PackedVector2Array(5543, 1787, 8663, 1938, 15008, 1914, 15121, 2882, 15601, 3074, 15636, 3574, 14122, 3569, 12930, 3737, 11502, 3599, 9887, 3658, 7936, 3924, 7712, 2967, 4629, 2917, 3880, 3351, 3891, 3646, 3919, 4843, 7970, 4459, 16532, 4289, 16365, 821, 1765, 1202, 1437, 4559, 3142, 4814, 3154, 4225, 2749, 3323, 2196, 2523, 2379, 1787)
polygon = PackedVector2Array(5543, 1787, 8663, 1938, 15008, 1914, 15121, 2882, 15601, 3074, 15636, 3574, 14122, 3569, 12930, 3737, 11502, 3599, 9887, 3658, 7936, 3924, 7712, 2967, 4629, 2917, 3880, 3351, 3891, 3646, 3919, 4843, 7970, 4459, 16532, 4289, 16365, 821, 1765, 1202, 1437, 4559, 3849, 4849, 3860, 4193, 3304, 4193, 2749, 3323, 2196, 2523, 2379, 1787)
[node name="Blocker" type="Node2D" parent="YSorted"]
@@ -2178,6 +2180,14 @@ max_distance = 2e+07
playback_type = 2
script = ExtResource("56_bjj0f")
[node name="SpecialQuestNodes" type="Node" parent="."]
[node name="InstantStartQuest" type="Node" parent="SpecialQuestNodes"]
script = ExtResource("55_ub0r7")
questResource = ExtResource("56_q833x")
toStatus = 1
makeActive = true
[connection signal="body_entered" from="Fight1/FightStarter/TriggerArea" to="Fight1/FightStarter" method="Start"]
[connection signal="FightEnded" from="Fight1/FightBaseScene" to="YSorted/Vesna" method="show"]
[connection signal="FightEnded" from="Fight1/FightBaseScene" to="YSorted/Vesna" method="EnableMovement"]
@@ -2194,6 +2204,7 @@ script = ExtResource("56_bjj0f")
[connection signal="FilledWateringCan" from="YSorted/Vesna" to="Audio/SFX/FillWater SFX2" method="PlayOneShot"]
[connection signal="WateringField" from="YSorted/Vesna/FarmingControls" to="Audio/SFX/Watering SFX" method="PlayOneShot"]
[connection signal="finished" from="Audio/Background Music Ramp up" to="Audio/Background Music loop" method="PlayFromOffset"]
[connection signal="ready" from="SpecialQuestNodes/InstantStartQuest" to="SpecialQuestNodes/InstantStartQuest" method="Trigger"]
[editable path="Fight1/FightBaseScene"]
[editable path="Fight2/FightBaseScene"]
@@ -563,7 +563,7 @@ script = ExtResource("17_k0k8c")
script = ExtResource("21_blyw3")
questResource = ExtResource("22_yd2gv")
toStatus = 1
makeCurrent = true
makeActive = true
[node name="Camera2D" type="Camera2D" parent="." node_paths=PackedStringArray("_followNode")]
position = Vector2(-1534, -26)
@@ -1,8 +1,10 @@
[gd_scene load_steps=11 format=3 uid="uid://ceaa2qj2bmw43"]
[gd_scene load_steps=13 format=3 uid="uid://ceaa2qj2bmw43"]
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_c6eln"]
[ext_resource type="Texture2D" uid="uid://cugtxcfuds31r" path="res://art/indoor/Babushka_bg_01.png" id="2_j25a2"]
[ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="8_j25a2"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="8_phqdf"]
[ext_resource type="Resource" uid="uid://csj15gnlx1jmx" path="res://resources/quests/demo/8_goto_bed.tres" id="9_heyef"]
[ext_resource type="Texture2D" uid="uid://cop1vjvhwlsec" path="res://art/indoor/room export/Room_01_shelf.png" id="13_11fdt"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Player2D.tscn" id="18_3gevq"]
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="23_408bg"]
@@ -100,6 +102,11 @@ _useOutline = false
_useSprite = false
_id = 1
[node name="QuestCompleter" type="Node" parent="BedInteraction"]
script = ExtResource("8_j25a2")
questResource = ExtResource("9_heyef")
toStatus = 2
[node name="DoorInteraction" parent="." instance=ExtResource("8_phqdf")]
position = Vector2(777, 201)
_useOutline = false
@@ -109,6 +116,7 @@ _id = 0
[node name="CollisionShape3D" parent="DoorInteraction/Area2D" index="0"]
shape = SubResource("CircleShape2D_2spkc")
[connection signal="Interacted" from="BedInteraction" to="BedInteraction/QuestCompleter" method="Trigger"]
[connection signal="InteractedTool" from="BedInteraction" to="." method="LoadSceneAtIndex"]
[connection signal="Interacted" from="DoorInteraction" to="." method="LoadScene"]
@@ -18,7 +18,7 @@ text = "Start Quest 1"
script = ExtResource("1_wnfrg")
questResource = ExtResource("2_nud5h")
toStatus = 1
makeCurrent = true
makeActive = true
[node name="Button2" type="Button" parent="."]
offset_left = 460.0
@@ -43,7 +43,7 @@ text = "Start Quest 2"
script = ExtResource("1_wnfrg")
questResource = ExtResource("3_tb5fn")
toStatus = 1
makeCurrent = true
makeActive = true
[node name="Button4" type="Button" parent="."]
offset_left = 460.0
+1 -1
View File
@@ -41,7 +41,7 @@ text = "Active"
script = ExtResource("3_sx4ix")
questResource = ExtResource("4_qyyck")
toStatus = 1
makeCurrent = true
makeActive = true
[node name="Done" type="Button" parent="CanvasLayer2/VBoxContainer/HBoxContainer"]
layout_mode = 2
@@ -1,3 +1,5 @@
using System;
namespace Babushka.scripts.CSharp.Common.Farming;
/// <summary>
@@ -26,6 +28,7 @@ public static class WateringCanState
public delegate void WateringCanDelegate(bool state);
public static event WateringCanDelegate WateringCanActiveStateChanged;
public static event Action? OnWater;
@@ -43,7 +46,10 @@ public static class WateringCanState
public static void Water()
{
if(_fillstate > 0)
{
_fillstate--;
OnWater?.Invoke();
}
}
/// <summary>
@@ -1,4 +1,4 @@
using Godot;
using Godot;
namespace Babushka.scripts.CSharp.Common.Inventory;
// Do not instantiate this resource
@@ -1,22 +0,0 @@
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");
}
}
@@ -1 +0,0 @@
uid://byar6yqrlph6k
@@ -1,6 +1,6 @@
using Godot;
using System;
using Babushka.scripts.CSharp.Common.Util;
namespace Babushka.scripts.CSharp.Common.Quest;
public partial class QuestDescriptionUi : RichTextLabel
{
@@ -24,11 +24,10 @@ public partial class QuestListItemUi : Control
_ => ""
};
UpdateCircled(questResource == QuestManager.Instance.GetFollowQuest());
UpdateCircled(questResource == QuestManager.Instance.GetActiveQuest());
ShowName(name);
TitleButton.Pressed += ClickedTitleButton;
}
private void UpdateCircled(bool value)
{
CircleTexture.Visible = value;
+17 -11
View File
@@ -1,35 +1,43 @@
#nullable enable
using Godot;
using System;
using Babushka.scripts.CSharp.Common.Quest;
namespace Babushka.scripts.CSharp.Common.Quest;
public partial class QuestLog : Control
{
[Signal]
public delegate void DetailQuestChangedEventHandler(QuestLog questLog);
[Export]
private Vector2 _closedPos;
[Export] private Vector2 _closedPos;
[Export]
private Vector2 _openedPos;
[Export] private Vector2 _openedPos;
private bool _isClosed = true;
private Tween? _closeOpenTween;
public QuestResource? currentDetailQuest
{
get => QuestManager.Instance!.GetFollowQuest();
get => QuestManager.Instance!.GetActiveQuest();
set
{
QuestManager.Instance!.SetFollowQuest(value); // TODO: fix setup
QuestManager.Instance!.SetActiveQuest(value); // TODO: fix setup
EmitSignalDetailQuestChanged(this);
}
}
public override void _EnterTree()
{
QuestManager.Instance!.QuestsChanged += () => EmitSignalDetailQuestChanged(this);
QuestManager.Instance!.QuestsChanged += OnQuestsChanged;
}
public override void _ExitTree()
{
QuestManager.Instance!.QuestsChanged -= OnQuestsChanged;
}
private void OnQuestsChanged()
{
EmitSignalDetailQuestChanged(this);
}
public override void _Input(InputEvent inputEvent)
@@ -48,6 +56,4 @@ public partial class QuestLog : Control
.SetTrans(Tween.TransitionType.Cubic);
}
}
//private QuestResource? _currentDetailQuestBacking;
}
+12 -12
View File
@@ -11,7 +11,7 @@ public partial class QuestManager : Node
public static QuestManager? Instance { get; private set; }
[Signal]
public delegate void QuestBecomesActiveEventHandler(QuestResource questResource);
public delegate void QuestBecomesAvailableEventHandler(QuestResource questResource);
[Signal]
public delegate void QuestsChangedEventHandler();
@@ -26,7 +26,7 @@ public partial class QuestManager : Node
private Godot.Collections.Dictionary<QuestResource, QuestStatus> _questStatus = new();
private QuestResource? _followQuest;
private QuestResource? _activeQuest;
public void ChangeQuestStatus(QuestResource questResource, QuestStatus.Status newStatus)
@@ -40,11 +40,11 @@ public partial class QuestManager : Node
value.status = newStatus;
EmitSignalQuestsChanged();
EmitSignalDialogicActiveQuest(_followQuest?.id ?? "none");
EmitSignalDialogicActiveQuest(_activeQuest?.id ?? "none");
if (newStatus == QuestStatus.Status.Active)
if (newStatus == QuestStatus.Status.Available)
{
EmitSignalQuestBecomesActive(questResource);
EmitSignalQuestBecomesAvailable(questResource);
}
}
@@ -53,9 +53,9 @@ public partial class QuestManager : Node
return _questStatus.Where(qs => qs.Value.status != QuestStatus.Status.Hidden);
}
public IEnumerable<QuestPair> GetActiveQuests()
public IEnumerable<QuestPair> GetAvailableQuests()
{
return _questStatus.Where(qs => qs.Value.status == QuestStatus.Status.Active);
return _questStatus.Where(qs => qs.Value.status == QuestStatus.Status.Available);
}
public QuestStatus GetQuestStatus(QuestResource questResource)
{
@@ -67,15 +67,15 @@ public partial class QuestManager : Node
return status;
}
public QuestResource? GetFollowQuest()
public QuestResource? GetActiveQuest()
{
return _followQuest;
return _activeQuest;
}
public void SetFollowQuest(QuestResource? questResource)
public void SetActiveQuest(QuestResource? questResource)
{
_followQuest = questResource;
_activeQuest = questResource;
EmitSignalQuestsChanged();
EmitSignalDialogicActiveQuest(_followQuest?.id ?? "none");
EmitSignalDialogicActiveQuest(_activeQuest?.id ?? "none");
}
}
@@ -20,6 +20,7 @@ public partial class QuestMessagePopup : Control
public override void _EnterTree()
{
QuestManager.Instance!.QuestsChanged += NewActiveQuest;
NewActiveQuest();
}
public override void _ExitTree()
@@ -29,7 +30,7 @@ public partial class QuestMessagePopup : Control
private void NewActiveQuest()
{
var shownQuest = QuestManager.Instance!.GetFollowQuest();
var shownQuest = QuestManager.Instance!.GetActiveQuest();
if (_currentlyShown == shownQuest)
return;
+1 -1
View File
@@ -6,7 +6,7 @@ public partial class QuestResource : Resource
{
[Export]
public string id = "";
[Export]
[Export(PropertyHint.MultilineText)]
public string title = "";
[Export(PropertyHint.MultilineText)]
public string description = "";
+1 -1
View File
@@ -7,7 +7,7 @@ public partial class QuestStatus : GodotObject
public enum Status
{
Hidden = 0,
Active = 1,
Available = 1,
Done = 2,
Canceled = 3,
}
@@ -8,15 +8,15 @@ using Godot.Collections;
public partial class QuestTestingScript : Node
{
[Export(PropertyHint.ArrayType)]
private Array<QuestResource>? _questsToActivate;
private Array<QuestResource>? _questsToMakeAvailable;
public override void _EnterTree()
{
Debug.Assert(_questsToActivate != null);
Debug.Assert(_questsToMakeAvailable != null);
foreach (var questResource in _questsToActivate)
foreach (var questResource in _questsToMakeAvailable)
{
QuestManager.Instance!.ChangeQuestStatus(questResource, QuestStatus.Status.Active);
QuestManager.Instance!.ChangeQuestStatus(questResource, QuestStatus.Status.Available);
}
}
}
+7 -9
View File
@@ -4,14 +4,11 @@ using Babushka.scripts.CSharp.Common.Quest;
public partial class QuestTrigger : Node
{
[Export]
public QuestResource? questResource;
[Export] public QuestResource? questResource;
[Export]
public QuestStatus.Status toStatus;
[Export] public QuestStatus.Status toStatus;
[Export]
private bool makeCurrent = false;
[Export] private bool makeActive = false;
public void Trigger()
{
@@ -21,13 +18,14 @@ public partial class QuestTrigger : Node
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.");
throw new Exception(
"QuestManager instance is not available. Make sure it is initialized before calling Trigger.");
QuestManager.Instance.ChangeQuestStatus(questResource, toStatus);
if (makeCurrent)
if (makeActive)
{
QuestManager.Instance.SetFollowQuest(questResource);
QuestManager.Instance.SetActiveQuest(questResource);
}
}
}
@@ -0,0 +1,37 @@
using Godot;
using System;
using Babushka.scripts.CSharp.Common.Farming;
using Babushka.scripts.CSharp.Common.Quest;
public partial class DetectFieldWork : QuestFulfillmentBase
{
private int wateredCounter = 0;
[Export] private int _wateringNeeded = 5;
public override void _EnterTree()
{
WateringCanState.OnWater += CountWater;
QuestManager.Instance!.QuestsChanged += CheckFieldWork;
}
public override void _ExitTree()
{
WateringCanState.OnWater -= CountWater;
QuestManager.Instance!.QuestsChanged -= CheckFieldWork;
}
public void CountWater()
{
wateredCounter++;
CheckFieldWork();
}
public void CheckFieldWork()
{
if (IsQuestActive() && wateredCounter >= _wateringNeeded)
{
Fulfill();
}
}
}
@@ -0,0 +1 @@
uid://bhbldab74vmhy
@@ -1,6 +0,0 @@
using Godot;
using System;
public partial class DetectToolCollection : Node
{
}
@@ -1 +0,0 @@
uid://caohn76m3n3nm
@@ -3,33 +3,43 @@ using System;
using System.Linq;
using Babushka.scripts.CSharp.Common.Quest;
/// <summary>
/// Acts as a base for scripts to check for conditions to complete quests.
///
/// The derived Class is responsible for triggering the Check.
/// It is recommended to always check on QuestManager.Instance!.QuestsChanged
/// </summary>
public abstract partial class QuestFulfillmentBase : Node
{
[Export] private QuestResource _onActiveQuest;
[Export] private QuestResource _toNextQuest;
[Export] private QuestResource _onAvailableQuest = null!;
[Export] private QuestResource _toNextQuest = null!;
[Export] private bool _whenFulfilledSetActiveQuestToDone = true;
[Export] private bool _whenFulfilledSetAvailableQuestToDone = true;
[Export] private bool _whenFulfilledSetNextQuestToAvailable = true;
[Export] private bool _whenFulfilledSetNextQuestToActive = true;
[Export] private bool _whenFulfilledSetNextQuestToFollow = true;
[Signal] private delegate void OnFulfilledEventHandler();
protected void Fulfill()
{
if (_whenFulfilledSetActiveQuestToDone)
if (_whenFulfilledSetAvailableQuestToDone)
{
QuestManager.Instance!.ChangeQuestStatus(_onActiveQuest, QuestStatus.Status.Done);
QuestManager.Instance!.ChangeQuestStatus(_onAvailableQuest, QuestStatus.Status.Done);
}
if (_whenFulfilledSetNextQuestToAvailable)
{
QuestManager.Instance!.ChangeQuestStatus(_toNextQuest, QuestStatus.Status.Available);
}
if (_whenFulfilledSetNextQuestToActive)
{
QuestManager.Instance!.ChangeQuestStatus(_toNextQuest, QuestStatus.Status.Active);
}
if (_whenFulfilledSetNextQuestToFollow)
{
QuestManager.Instance!.SetFollowQuest(_toNextQuest);
QuestManager.Instance!.SetActiveQuest(_toNextQuest);
}
EmitSignalOnFulfilled();
}
protected bool IsQuestActive()
{
return QuestManager.Instance!.GetActiveQuests().Any(q => q.Key == _onActiveQuest);
return QuestManager.Instance!.GetAvailableQuests().Any(q => q.Key == _onAvailableQuest);
}
}
+1 -1
View File
@@ -17,7 +17,7 @@ public partial class SceneTransition : Node
public void LoadSceneAtIndex(int index)
{
string sceneName = _sceneNamesToLoad[index];
SceneTransitionThreaded.Instance.ChangeSceneToFileThreaded(sceneName);
SceneTransitionThreaded.Instance.ChangeSceneToFile(sceneName);
UnloadAfterDelay();
}
@@ -0,0 +1,7 @@
extends Node
class_name DialogicStartSpecific
@export var timeline : String
func open():
Dialogic.start(timeline)
@@ -0,0 +1 @@
uid://dih1b0opgc3f7