Compare commits
2 Commits
Anna
...
b6373e6a2b
| Author | SHA1 | Date | |
|---|---|---|---|
| b6373e6a2b | |||
| 6050f3c297 |
@@ -95,6 +95,8 @@ func _make_visible(visible:bool) -> void:
|
|||||||
func _save_external_data() -> void:
|
func _save_external_data() -> void:
|
||||||
if _editor_view_and_manager_exist():
|
if _editor_view_and_manager_exist():
|
||||||
editor_view.editors_manager.save_current_resource()
|
editor_view.editors_manager.save_current_resource()
|
||||||
|
|
||||||
|
DialogicResourceUtil.update_directory('.tres')
|
||||||
|
|
||||||
|
|
||||||
func _get_unsaved_status(for_scene:String) -> String:
|
func _get_unsaved_status(for_scene:String) -> String:
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
@tool
|
||||||
|
extends DialogicEvent
|
||||||
|
class_name DialogicQuestActivateEvent
|
||||||
|
|
||||||
|
|
||||||
|
# Define properties of the event here
|
||||||
|
var quest_resource: String
|
||||||
|
|
||||||
|
func _execute() -> void:
|
||||||
|
var resource = ResourceLoader.load(quest_resource)
|
||||||
|
QuestManager.ChangeQuestStatus(resource,QuestEventUtils.QuestStatus.ACTIVE)
|
||||||
|
QuestManager.SetFollowQuest(resource)
|
||||||
|
finish() # called to continue with the next event
|
||||||
|
|
||||||
|
|
||||||
|
#region INITIALIZE
|
||||||
|
################################################################################
|
||||||
|
# Set fixed settings of this event
|
||||||
|
func _init() -> void:
|
||||||
|
event_name = "Activate Quest"
|
||||||
|
event_category = "Quest"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SAVING/LOADING
|
||||||
|
################################################################################
|
||||||
|
func get_shortcode() -> String:
|
||||||
|
return "quest_activate"
|
||||||
|
|
||||||
|
func get_shortcode_parameters() -> Dictionary:
|
||||||
|
return {
|
||||||
|
#param_name : property_info
|
||||||
|
"quest_resource" : {"property": "quest_resource", "default": ""},
|
||||||
|
}
|
||||||
|
|
||||||
|
# You can alternatively overwrite these 3 functions: to_text(), from_text(), is_valid_event()
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region EDITOR REPRESENTATION
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
func build_event_editor() -> void:
|
||||||
|
add_header_label("Activate Quest")
|
||||||
|
add_header_edit(
|
||||||
|
"quest_resource",
|
||||||
|
ValueType.DYNAMIC_OPTIONS,
|
||||||
|
{
|
||||||
|
"mode":2,
|
||||||
|
"suggestions_func":QuestEventUtils.quest_resource_suggestrions
|
||||||
|
})
|
||||||
|
|
||||||
|
#endregion
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://br3a7napsjmg3
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
@tool
|
||||||
|
extends DialogicEvent
|
||||||
|
class_name DialogicQuestCompleteEvent
|
||||||
|
|
||||||
|
|
||||||
|
# Define properties of the event here
|
||||||
|
var quest_resource: String
|
||||||
|
|
||||||
|
func _execute() -> void:
|
||||||
|
var resource = ResourceLoader.load(quest_resource)
|
||||||
|
QuestManager.ChangeQuestStatus(resource,QuestEventUtils.QuestStatus.DONE)
|
||||||
|
QuestManager.SetFollowQuest(null)
|
||||||
|
finish() # called to continue with the next event
|
||||||
|
|
||||||
|
|
||||||
|
#region INITIALIZE
|
||||||
|
################################################################################
|
||||||
|
# Set fixed settings of this event
|
||||||
|
func _init() -> void:
|
||||||
|
event_name = "Complete Quest"
|
||||||
|
event_category = "Quest"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SAVING/LOADING
|
||||||
|
################################################################################
|
||||||
|
func get_shortcode() -> String:
|
||||||
|
return "quest_complete"
|
||||||
|
|
||||||
|
func get_shortcode_parameters() -> Dictionary:
|
||||||
|
return {
|
||||||
|
#param_name : property_info
|
||||||
|
"quest_resource" : {"property": "quest_resource", "default": ""},
|
||||||
|
}
|
||||||
|
|
||||||
|
# You can alternatively overwrite these 3 functions: to_text(), from_text(), is_valid_event()
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region EDITOR REPRESENTATION
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
func build_event_editor() -> void:
|
||||||
|
add_header_label("Complete Quest")
|
||||||
|
add_header_edit(
|
||||||
|
"quest_resource",
|
||||||
|
ValueType.DYNAMIC_OPTIONS,
|
||||||
|
{
|
||||||
|
"mode":2,
|
||||||
|
"suggestions_func":QuestEventUtils.quest_resource_suggestrions
|
||||||
|
})
|
||||||
|
|
||||||
|
#endregion
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://c8mtjwpe7c0h
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
class_name QuestEventUtils
|
||||||
|
|
||||||
|
enum QuestStatus{
|
||||||
|
HIDDEN = 0,
|
||||||
|
ACTIVE = 1,
|
||||||
|
DONE = 2,
|
||||||
|
CANCLED = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static func quest_resource_suggestrions(search_text:String) -> Dictionary:
|
||||||
|
var ret_val = {}
|
||||||
|
var quest_paths = get_all_file_paths("res://resources/quests")
|
||||||
|
|
||||||
|
for path in quest_paths:
|
||||||
|
var res = ResourceLoader.load(path)
|
||||||
|
ret_val[res.id]= {"value":path, "tooltip":res.title + "\n\n" + res.description}
|
||||||
|
|
||||||
|
return ret_val
|
||||||
|
|
||||||
|
static func get_all_file_paths(path: String) -> Array[String]:
|
||||||
|
var file_paths: Array[String] = []
|
||||||
|
var dir = DirAccess.open(path)
|
||||||
|
dir.list_dir_begin()
|
||||||
|
var file_name = dir.get_next()
|
||||||
|
while file_name != "":
|
||||||
|
var file_path = path + "/" + file_name
|
||||||
|
if dir.current_is_dir():
|
||||||
|
file_paths += get_all_file_paths(file_path)
|
||||||
|
else:
|
||||||
|
file_paths.append(file_path)
|
||||||
|
file_name = dir.get_next()
|
||||||
|
return file_paths
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://d1x2343wpkdku
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
@tool
|
||||||
|
extends DialogicIndexer
|
||||||
|
|
||||||
|
func _get_events() -> Array:
|
||||||
|
return [
|
||||||
|
this_folder.path_join('event_quest_activate.gd'),
|
||||||
|
this_folder.path_join('event_quest_complete.gd')
|
||||||
|
]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://wup1fvm05rqv
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
join vesna center
|
join vesna center
|
||||||
|
[quest_complete quest_resource="res://resources/quests/demo/2_collect_ducks.tres"]
|
||||||
That’s the last one. I should get back to Yeli.
|
That’s the last one. I should get back to Yeli.
|
||||||
|
[quest_activate quest_resource="res://resources/quests/demo/3_talk_yeli_2.tres"]
|
||||||
[end_timeline]
|
[end_timeline]
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
join Yeli right
|
join Yeli right
|
||||||
join vesna left
|
join vesna left
|
||||||
|
[quest_complete quest_resource="res://resources/quests/demo/1_talk_yeli_1.tres"]
|
||||||
Yeli (_part_side): Come here, you little quacking beast!
|
Yeli (_part_side): Come here, you little quacking beast!
|
||||||
- What a mess!
|
- What a mess!
|
||||||
- You haven’t called me that way yet.
|
- You haven’t called me that way yet.
|
||||||
Yeli (_part_side): Vesna, oh, thank goodness!
|
Yeli (_part_side): Vesna, oh, thank goodness!
|
||||||
Yeli (_part_side): Please could you get the runner ducks back into their coop?
|
Yeli (_part_side): Please could you get the runner ducks back into their coop?
|
||||||
|
[quest_activate quest_resource="res://resources/quests/demo/2_collect_ducks.tres"]
|
||||||
[end_timeline]
|
[end_timeline]
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
if {ACTIVEQUEST} == "1_talk_yeli_1":
|
||||||
|
jump quest1_ducks_start/
|
||||||
|
else:
|
||||||
|
No Dialog for active quest {ACTIVEQUEST}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://do3c5uofv5m7b
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://bworek1jcmq0e"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dl2uhq12p3qks" path="res://scripts/CSharp/Common/Quest/QuestManager.cs" id="1_anowe"]
|
||||||
|
[ext_resource type="Script" uid="uid://bukwr1h3hn8sx" path="res://scripts/GdScript/dialogic_var_setter.gd" id="4_v86gc"]
|
||||||
|
|
||||||
|
[node name="QuestManager" type="Node"]
|
||||||
|
script = ExtResource("1_anowe")
|
||||||
|
|
||||||
|
[node name="DialogicRelay" type="Node" parent="."]
|
||||||
|
script = ExtResource("4_v86gc")
|
||||||
|
|
||||||
|
[connection signal="DialogicActiveQuest" from="." to="DialogicRelay" method="_SetActiveQuestVar"]
|
||||||
+53
-2
@@ -28,8 +28,8 @@ SceneTransition="*res://scenes/SceneTransition.tscn"
|
|||||||
Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd"
|
Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd"
|
||||||
InventoryManager="*res://scripts/CSharp/Common/Inventory/InventoryManager.cs"
|
InventoryManager="*res://scripts/CSharp/Common/Inventory/InventoryManager.cs"
|
||||||
Signal_Debugger="*res://addons/SignalVisualizer/Debugger/SignalDebugger.gd"
|
Signal_Debugger="*res://addons/SignalVisualizer/Debugger/SignalDebugger.gd"
|
||||||
QuestManager="*res://scripts/CSharp/Common/Quest/QuestManager.cs"
|
|
||||||
FightManagerAutoload="*res://prefabs/fight/fight_manager_autoload.tscn"
|
FightManagerAutoload="*res://prefabs/fight/fight_manager_autoload.tscn"
|
||||||
|
QuestManager="*res://prefabs/quests/quest_manager_autoload.tscn"
|
||||||
|
|
||||||
[dialogic]
|
[dialogic]
|
||||||
|
|
||||||
@@ -63,9 +63,11 @@ directories/dtl_directory={
|
|||||||
"yeli_intro_02": "res://dialog/yeli_intro_02.dtl",
|
"yeli_intro_02": "res://dialog/yeli_intro_02.dtl",
|
||||||
"yeli_intro_03": "res://dialog/yeli_intro_03.dtl",
|
"yeli_intro_03": "res://dialog/yeli_intro_03.dtl",
|
||||||
"yeli_intro_04": "res://dialog/yeli_intro_04.dtl",
|
"yeli_intro_04": "res://dialog/yeli_intro_04.dtl",
|
||||||
"yeli_intro_05": "res://dialog/yeli_intro_05.dtl"
|
"yeli_intro_05": "res://dialog/yeli_intro_05.dtl",
|
||||||
|
"yeli_quest_select": "res://dialog/yeli_quest_select.dtl"
|
||||||
}
|
}
|
||||||
variables={
|
variables={
|
||||||
|
"ACTIVEQUEST": "none",
|
||||||
"MAGICWORD": "Hokus Pokus!s",
|
"MAGICWORD": "Hokus Pokus!s",
|
||||||
"PLAYERMOOD": "Good",
|
"PLAYERMOOD": "Good",
|
||||||
"SHOW": "IGF"
|
"SHOW": "IGF"
|
||||||
@@ -105,6 +107,55 @@ translation/id_counter=22
|
|||||||
translation/locales=["de", "en"]
|
translation/locales=["de", "en"]
|
||||||
text/autopauses={}
|
text/autopauses={}
|
||||||
glossary/glossary_files=["res://dialog/farming_equipment_glossary.tres"]
|
glossary/glossary_files=["res://dialog/farming_equipment_glossary.tres"]
|
||||||
|
directories/tres_directory={
|
||||||
|
"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",
|
||||||
|
"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",
|
||||||
|
"NPC_narrative": "res://dialog/NPC_narrative.tres",
|
||||||
|
"New_File": "res://addons/dialogic/New_File.tres",
|
||||||
|
"PickerTheme": "res://addons/dialogic/Editor/Theme/PickerTheme.tres",
|
||||||
|
"ResourceMenuHover": "res://addons/dialogic/Editor/Events/styles/ResourceMenuHover.tres",
|
||||||
|
"ResourceMenuNormal": "res://addons/dialogic/Editor/Events/styles/ResourceMenuNormal.tres",
|
||||||
|
"ResourceMenuPanelBackground": "res://addons/dialogic/Editor/Events/styles/ResourceMenuPanelBackground.tres",
|
||||||
|
"SectionPanel": "res://addons/dialogic/Editor/Events/styles/SectionPanel.tres",
|
||||||
|
"SimpleButtonHover": "res://addons/dialogic/Editor/Events/styles/SimpleButtonHover.tres",
|
||||||
|
"SimpleButtonNormal": "res://addons/dialogic/Editor/Events/styles/SimpleButtonNormal.tres",
|
||||||
|
"TextBackground": "res://addons/dialogic/Editor/Events/styles/TextBackground.tres",
|
||||||
|
"TitleBgStylebox": "res://addons/dialogic/Editor/Common/TitleBgStylebox.tres",
|
||||||
|
"beet": "res://resources/items/beet.tres",
|
||||||
|
"beetRoot": "res://resources/quests/beetRoot.tres",
|
||||||
|
"choice_panel_focus": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Choices/choice_panel_focus.tres",
|
||||||
|
"choice_panel_hover": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Choices/choice_panel_hover.tres",
|
||||||
|
"choice_panel_normal": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Choices/choice_panel_normal.tres",
|
||||||
|
"default_bus_layout": "res://audio/default_bus_layout.tres",
|
||||||
|
"default_stylebox": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_SpeakerPortraitTextbox/default_stylebox.tres",
|
||||||
|
"default_vn_style": "res://addons/dialogic/Modules/DefaultLayoutParts/Style_VN_Default/default_vn_style.tres",
|
||||||
|
"farming_equipment_glossary": "res://dialog/farming_equipment_glossary.tres",
|
||||||
|
"hoe": "res://resources/items/hoe.tres",
|
||||||
|
"preview_character": "res://addons/dialogic/Modules/Character/preview_character.tres",
|
||||||
|
"rake": "res://resources/items/rake.tres",
|
||||||
|
"scythe": "res://resources/items/scythe.tres",
|
||||||
|
"selected_styleboxflat": "res://addons/dialogic/Editor/Events/styles/selected_styleboxflat.tres",
|
||||||
|
"shovel": "res://resources/items/shovel.tres",
|
||||||
|
"simple_fade": "res://addons/dialogic/Modules/Background/Transitions/Defaults/simple_fade.tres",
|
||||||
|
"simple_swipe_gradient": "res://addons/dialogic/Modules/Background/Transitions/simple_swipe_gradient.tres",
|
||||||
|
"speaker_textbox_style": "res://addons/dialogic/Modules/DefaultLayoutParts/Style_SpeakerTextbox/speaker_textbox_style.tres",
|
||||||
|
"speechbubble": "res://dialog/speechbubble.tres",
|
||||||
|
"test": "res://resources/items/test.tres",
|
||||||
|
"test_01": "res://resources/quests/test_01.tres",
|
||||||
|
"test_02": "res://resources/quests/test_02.tres",
|
||||||
|
"test_03": "res://resources/quests/test_03.tres",
|
||||||
|
"textbubble_style": "res://addons/dialogic/Modules/DefaultLayoutParts/Style_TextBubbles/textbubble_style.tres",
|
||||||
|
"tomato": "res://resources/items/tomato.tres",
|
||||||
|
"tomato_seed": "res://resources/items/tomato_seed.tres",
|
||||||
|
"unselected_stylebox": "res://addons/dialogic/Editor/Events/styles/unselected_stylebox.tres",
|
||||||
|
"vn_textbox_default_panel": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_default_panel.tres",
|
||||||
|
"vn_textbox_name_label_panel": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_name_label_panel.tres",
|
||||||
|
"wateringcan": "res://resources/items/wateringcan.tres"
|
||||||
|
}
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[gd_resource type="Resource" script_class="QuestResource" load_steps=2 format=3 uid="uid://cm8kftow8br00"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://vji5lp4qc8pp" path="res://scripts/CSharp/Common/Quest/QuestResource.cs" id="1_xjwrv"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_xjwrv")
|
||||||
|
id = "1_talk_yeli_1"
|
||||||
|
title = "Talk to Yeli"
|
||||||
|
description = ""
|
||||||
|
metadata/_custom_type_script = "uid://vji5lp4qc8pp"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[gd_resource type="Resource" script_class="QuestResource" load_steps=2 format=3 uid="uid://cy0na3ukvpoou"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://vji5lp4qc8pp" path="res://scripts/CSharp/Common/Quest/QuestResource.cs" id="1_wactd"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_wactd")
|
||||||
|
id = "2_collect_ducks"
|
||||||
|
title = "Collect the Ducks"
|
||||||
|
description = "Collect all 6 ducks running around the farm by aporaching them and pressing [E]"
|
||||||
|
metadata/_custom_type_script = "uid://vji5lp4qc8pp"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[gd_resource type="Resource" script_class="QuestResource" load_steps=2 format=3 uid="uid://mf0rdejw8fuk"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://vji5lp4qc8pp" path="res://scripts/CSharp/Common/Quest/QuestResource.cs" id="1_70pjl"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_70pjl")
|
||||||
|
id = "3_talk_yeil_2"
|
||||||
|
title = "Talk to Yeli again"
|
||||||
|
description = "All ducks are collected. Head back to yeli."
|
||||||
|
metadata/_custom_type_script = "uid://vji5lp4qc8pp"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=105 format=3 uid="uid://gigb28qk8t12"]
|
[gd_scene load_steps=107 format=3 uid="uid://gigb28qk8t12"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Player2D.tscn" id="1_7wfwe"]
|
[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"]
|
[ext_resource type="Texture2D" uid="uid://8sr11ex30n0m" path="res://art/mockups/Kenney_Backgrounds/Samples/uncolored_hills.png" id="2_7b2ri"]
|
||||||
@@ -65,6 +65,8 @@
|
|||||||
[ext_resource type="Script" uid="uid://d2486x6upmwqq" path="res://scripts/GdScript/dialogic_starter.gd" id="52_lwk6t"]
|
[ext_resource type="Script" uid="uid://d2486x6upmwqq" path="res://scripts/GdScript/dialogic_starter.gd" id="52_lwk6t"]
|
||||||
[ext_resource type="PackedScene" uid="uid://sbf12hin4kes" path="res://prefabs/Interactables/trash_object.tscn" id="53_ycj14"]
|
[ext_resource type="PackedScene" uid="uid://sbf12hin4kes" path="res://prefabs/Interactables/trash_object.tscn" id="53_ycj14"]
|
||||||
[ext_resource type="PackedScene" uid="uid://muuxxgvx33fp" path="res://prefabs/farm/duck.tscn" id="62_i36hd"]
|
[ext_resource type="PackedScene" uid="uid://muuxxgvx33fp" path="res://prefabs/farm/duck.tscn" id="62_i36hd"]
|
||||||
|
[ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="66_2065p"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cm8kftow8br00" path="res://resources/quests/demo/1_talk_yeli_1.tres" id="67_tm0yg"]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wtdui"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wtdui"]
|
||||||
shader = ExtResource("13_7p0hq")
|
shader = ExtResource("13_7p0hq")
|
||||||
@@ -1019,7 +1021,8 @@ y_sort_enabled = true
|
|||||||
|
|
||||||
[node name="Yeli" parent="YSorted" instance=ExtResource("24_wtdui")]
|
[node name="Yeli" parent="YSorted" instance=ExtResource("24_wtdui")]
|
||||||
position = Vector2(6403, 3362)
|
position = Vector2(6403, 3362)
|
||||||
_timelinesToPlay = PackedStringArray("quest1_ducks_start", "quest2_tomatoes_start", "quest2_tomatoes_interim", "quest2_tomatoes_end")
|
_timelinesToPlay = PackedStringArray("yeli_quest_select")
|
||||||
|
_retriggerSameTimeline = true
|
||||||
|
|
||||||
[node name="Vesna" parent="YSorted" node_paths=PackedStringArray("_fieldParent") instance=ExtResource("1_7wfwe")]
|
[node name="Vesna" parent="YSorted" node_paths=PackedStringArray("_fieldParent") instance=ExtResource("1_7wfwe")]
|
||||||
z_index = 1
|
z_index = 1
|
||||||
@@ -2253,6 +2256,9 @@ offset_top = 0.228533
|
|||||||
offset_right = -456.339
|
offset_right = -456.339
|
||||||
offset_bottom = 30.2285
|
offset_bottom = 30.2285
|
||||||
|
|
||||||
|
[node name="Control" parent="CanvasLayer" index="3"]
|
||||||
|
visible = true
|
||||||
|
|
||||||
[node name="Audio" type="Node" parent="."]
|
[node name="Audio" type="Node" parent="."]
|
||||||
|
|
||||||
[node name="Background Music Ramp up" type="AudioStreamPlayer2D" parent="Audio"]
|
[node name="Background Music Ramp up" type="AudioStreamPlayer2D" parent="Audio"]
|
||||||
@@ -2294,6 +2300,14 @@ max_distance = 2e+07
|
|||||||
playback_type = 2
|
playback_type = 2
|
||||||
script = ExtResource("40_w3jkj")
|
script = ExtResource("40_w3jkj")
|
||||||
|
|
||||||
|
[node name="QuestInstantStart" type="Node" parent="."]
|
||||||
|
|
||||||
|
[node name="QuestTrigger" type="Node" parent="QuestInstantStart"]
|
||||||
|
script = ExtResource("66_2065p")
|
||||||
|
questResource = ExtResource("67_tm0yg")
|
||||||
|
toStatus = 1
|
||||||
|
makeCurrent = true
|
||||||
|
|
||||||
[connection signal="FilledWateringCan" from="YSorted/Vesna" to="Audio/SFX/FillWater SFX2" method="PlayOneShot"]
|
[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="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"]
|
[connection signal="InteractedTool" from="YSorted/Brünnen/InteractionArea" to="YSorted/Vesna" method="TryFillWateringCan"]
|
||||||
@@ -2303,14 +2317,9 @@ script = ExtResource("40_w3jkj")
|
|||||||
[connection signal="FieldCreated" from="YSorted/Farm visuals/FieldParent" to="Audio/SFX/Farming SFX" method="PlayOneShot"]
|
[connection signal="FieldCreated" from="YSorted/Farm visuals/FieldParent" to="Audio/SFX/Farming SFX" method="PlayOneShot"]
|
||||||
[connection signal="input_event" from="YSorted/Farm visuals/FieldParent/Area2D" to="YSorted/Vesna/FarmingControls" method="InputEventPressedOn"]
|
[connection signal="input_event" from="YSorted/Farm visuals/FieldParent/Area2D" to="YSorted/Vesna/FarmingControls" method="InputEventPressedOn"]
|
||||||
[connection signal="GoalReached" from="YSorted/ducks" to="YSorted/ducks/DialogicToggle" method="ToggleDialogue"]
|
[connection signal="GoalReached" from="YSorted/ducks" to="YSorted/ducks/DialogicToggle" method="ToggleDialogue"]
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck2" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck3" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck4" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck5" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck6" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck7" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="Dialogue" from="YSorted/ducks/DialogicToggle" to="YSorted/ducks/dialogic starter" method="open"]
|
[connection signal="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="finished" from="Audio/Background Music Ramp up" to="Audio/Background Music loop" method="PlayFromOffset"]
|
||||||
|
[connection signal="ready" from="QuestInstantStart" to="QuestInstantStart/QuestTrigger" method="Trigger"]
|
||||||
|
|
||||||
[editable path="YSorted/Vesna"]
|
[editable path="YSorted/Vesna"]
|
||||||
[editable path="YSorted/Brünnen/InteractionArea"]
|
[editable path="YSorted/Brünnen/InteractionArea"]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=100 format=3 uid="uid://cic8y0mdk3vd2"]
|
[gd_scene load_steps=103 format=3 uid="uid://cic8y0mdk3vd2"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_gwe0p"]
|
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_gwe0p"]
|
||||||
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="2_1kqg8"]
|
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="2_1kqg8"]
|
||||||
@@ -151,11 +151,23 @@ size = Vector2(1041, 368)
|
|||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
radius = 371.058
|
radius = 371.058
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2nee2"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_tkk2w"]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
radius = 300.0
|
radius = 300.0
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ipqaa"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_gwe0p"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
radius = 300.0
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_1kqg8"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
radius = 300.0
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_6nf5r"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
radius = 300.0
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_2532c"]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
radius = 300.0
|
radius = 300.0
|
||||||
|
|
||||||
@@ -1044,8 +1056,8 @@ position = Vector2(6095, 2087)
|
|||||||
[node name="SpawnWithItem" parent="YSorted/HoeGenericPickup" index="0"]
|
[node name="SpawnWithItem" parent="YSorted/HoeGenericPickup" index="0"]
|
||||||
_blueprint = ExtResource("34_n176s")
|
_blueprint = ExtResource("34_n176s")
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/HoeGenericPickup/InteractionArea2/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="YSorted/HoeGenericPickup/PickupInteractionArea/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_2nee2")
|
shape = SubResource("CircleShape2D_tkk2w")
|
||||||
|
|
||||||
[node name="CanGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
[node name="CanGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
||||||
position = Vector2(8192, 3507)
|
position = Vector2(8192, 3507)
|
||||||
@@ -1053,11 +1065,8 @@ position = Vector2(8192, 3507)
|
|||||||
[node name="SpawnWithItem" parent="YSorted/CanGenericPickup" index="0"]
|
[node name="SpawnWithItem" parent="YSorted/CanGenericPickup" index="0"]
|
||||||
_blueprint = ExtResource("30_te7n5")
|
_blueprint = ExtResource("30_te7n5")
|
||||||
|
|
||||||
[node name="InteractionArea2" parent="YSorted/CanGenericPickup" index="3"]
|
[node name="CollisionShape3D" parent="YSorted/CanGenericPickup/PickupInteractionArea/Area2D" index="0"]
|
||||||
position = Vector2(0, -159)
|
shape = SubResource("CircleShape2D_gwe0p")
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/CanGenericPickup/InteractionArea2/Area2D" index="0"]
|
|
||||||
shape = SubResource("CircleShape2D_ipqaa")
|
|
||||||
|
|
||||||
[node name="RakeGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
[node name="RakeGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
||||||
position = Vector2(8391, 2060)
|
position = Vector2(8391, 2060)
|
||||||
@@ -1065,8 +1074,8 @@ position = Vector2(8391, 2060)
|
|||||||
[node name="SpawnWithItem" parent="YSorted/RakeGenericPickup" index="0"]
|
[node name="SpawnWithItem" parent="YSorted/RakeGenericPickup" index="0"]
|
||||||
_blueprint = ExtResource("29_36k8l")
|
_blueprint = ExtResource("29_36k8l")
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/RakeGenericPickup/InteractionArea2/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="YSorted/RakeGenericPickup/PickupInteractionArea/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_ipqaa")
|
shape = SubResource("CircleShape2D_1kqg8")
|
||||||
|
|
||||||
[node name="ScytheGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
[node name="ScytheGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -1075,8 +1084,8 @@ position = Vector2(15642, 2158)
|
|||||||
[node name="SpawnWithItem" parent="YSorted/ScytheGenericPickup" index="0"]
|
[node name="SpawnWithItem" parent="YSorted/ScytheGenericPickup" index="0"]
|
||||||
_blueprint = ExtResource("35_p4sr7")
|
_blueprint = ExtResource("35_p4sr7")
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/ScytheGenericPickup/InteractionArea2/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="YSorted/ScytheGenericPickup/PickupInteractionArea/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_ipqaa")
|
shape = SubResource("CircleShape2D_6nf5r")
|
||||||
|
|
||||||
[node name="ShovelGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
[node name="ShovelGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -1085,8 +1094,8 @@ position = Vector2(5454, 2049)
|
|||||||
[node name="SpawnWithItem" parent="YSorted/ShovelGenericPickup" index="0"]
|
[node name="SpawnWithItem" parent="YSorted/ShovelGenericPickup" index="0"]
|
||||||
_blueprint = ExtResource("36_vri5g")
|
_blueprint = ExtResource("36_vri5g")
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/ShovelGenericPickup/InteractionArea2/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="YSorted/ShovelGenericPickup/PickupInteractionArea/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_ipqaa")
|
shape = SubResource("CircleShape2D_2532c")
|
||||||
|
|
||||||
[node name="Farm visuals" type="Node2D" parent="YSorted"]
|
[node name="Farm visuals" type="Node2D" parent="YSorted"]
|
||||||
position = Vector2(-60, 122)
|
position = Vector2(-60, 122)
|
||||||
@@ -2247,25 +2256,19 @@ script = ExtResource("59_0knno")
|
|||||||
[connection signal="FieldCreated" from="YSorted/Farm visuals/FieldParent" to="Audio/SFX/Farming SFX" method="PlayOneShot"]
|
[connection signal="FieldCreated" from="YSorted/Farm visuals/FieldParent" to="Audio/SFX/Farming SFX" method="PlayOneShot"]
|
||||||
[connection signal="input_event" from="YSorted/Farm visuals/FieldParent/Area2D" to="YSorted/Vesna/FarmingControls" method="InputEventPressedOn"]
|
[connection signal="input_event" from="YSorted/Farm visuals/FieldParent/Area2D" to="YSorted/Vesna/FarmingControls" method="InputEventPressedOn"]
|
||||||
[connection signal="GoalReached" from="YSorted/ducks" to="YSorted/ducks/DialogicToggle" method="ToggleDialogue"]
|
[connection signal="GoalReached" from="YSorted/ducks" to="YSorted/ducks/DialogicToggle" method="ToggleDialogue"]
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck2" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck3" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck4" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck5" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck6" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck7" to="YSorted/ducks" method="Increment"]
|
|
||||||
[connection signal="Dialogue" from="YSorted/ducks/DialogicToggle" to="YSorted/ducks/dialogic starter" method="open"]
|
[connection signal="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="finished" from="Audio/Background Music Ramp up" to="Audio/Background Music loop" method="PlayFromOffset"]
|
||||||
|
|
||||||
[editable path="YSorted/Vesna"]
|
[editable path="YSorted/Vesna"]
|
||||||
[editable path="YSorted/Brünnen/InteractionArea"]
|
[editable path="YSorted/Brünnen/InteractionArea"]
|
||||||
[editable path="YSorted/HoeGenericPickup"]
|
[editable path="YSorted/HoeGenericPickup"]
|
||||||
[editable path="YSorted/HoeGenericPickup/InteractionArea2"]
|
[editable path="YSorted/HoeGenericPickup/PickupInteractionArea"]
|
||||||
[editable path="YSorted/CanGenericPickup"]
|
[editable path="YSorted/CanGenericPickup"]
|
||||||
[editable path="YSorted/CanGenericPickup/InteractionArea2"]
|
[editable path="YSorted/CanGenericPickup/PickupInteractionArea"]
|
||||||
[editable path="YSorted/RakeGenericPickup"]
|
[editable path="YSorted/RakeGenericPickup"]
|
||||||
[editable path="YSorted/RakeGenericPickup/InteractionArea2"]
|
[editable path="YSorted/RakeGenericPickup/PickupInteractionArea"]
|
||||||
[editable path="YSorted/ScytheGenericPickup"]
|
[editable path="YSorted/ScytheGenericPickup"]
|
||||||
[editable path="YSorted/ScytheGenericPickup/InteractionArea2"]
|
[editable path="YSorted/ScytheGenericPickup/PickupInteractionArea"]
|
||||||
[editable path="YSorted/ShovelGenericPickup"]
|
[editable path="YSorted/ShovelGenericPickup"]
|
||||||
[editable path="YSorted/ShovelGenericPickup/InteractionArea2"]
|
[editable path="YSorted/ShovelGenericPickup/PickupInteractionArea"]
|
||||||
[editable path="CanvasLayer"]
|
[editable path="CanvasLayer"]
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
[ext_resource type="AudioStream" uid="uid://cohyenfo1rtxh" path="res://audio/sfx/Animals/SFX_Cat_Meow_01.wav" id="16_d7yky"]
|
[ext_resource type="AudioStream" uid="uid://cohyenfo1rtxh" path="res://audio/sfx/Animals/SFX_Cat_Meow_01.wav" id="16_d7yky"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dfvgp1my5rydh" path="res://prefabs/characters/Yeli.tscn" id="16_dhsxs"]
|
[ext_resource type="PackedScene" uid="uid://dfvgp1my5rydh" path="res://prefabs/characters/Yeli.tscn" id="16_dhsxs"]
|
||||||
[ext_resource type="AudioStream" uid="uid://b2cmf5ie7cwka" path="res://audio/sfx/Animals/SFX_Cat_Meow_02.wav" id="17_7a68a"]
|
[ext_resource type="AudioStream" uid="uid://b2cmf5ie7cwka" path="res://audio/sfx/Animals/SFX_Cat_Meow_02.wav" id="17_7a68a"]
|
||||||
[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="17_k0k8c"]
|
[ext_resource type="Script" path="res://scripts/GdScript/dialogic_toggle.gd" id="17_k0k8c"]
|
||||||
[ext_resource type="AudioStream" uid="uid://cttisejnt2l8f" path="res://audio/sfx/Animals/SFX_Cat_Meow_03.wav" id="18_dhsxs"]
|
[ext_resource type="AudioStream" uid="uid://cttisejnt2l8f" path="res://audio/sfx/Animals/SFX_Cat_Meow_03.wav" id="18_dhsxs"]
|
||||||
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="18_dw4nn"]
|
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="18_dw4nn"]
|
||||||
[ext_resource type="AudioStream" uid="uid://cbmagiou0n0t3" path="res://audio/sfx/Animals/SFX_Cat_Meow_04.wav" id="19_k0k8c"]
|
[ext_resource type="AudioStream" uid="uid://cbmagiou0n0t3" path="res://audio/sfx/Animals/SFX_Cat_Meow_04.wav" id="19_k0k8c"]
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
[ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="21_blyw3"]
|
[ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="21_blyw3"]
|
||||||
[ext_resource type="AudioStream" uid="uid://r2f6xmjvyyjv" path="res://audio/sfx/Animals/SFX_Cat_Purr_01.wav" id="21_ytap8"]
|
[ext_resource type="AudioStream" uid="uid://r2f6xmjvyyjv" path="res://audio/sfx/Animals/SFX_Cat_Purr_01.wav" id="21_ytap8"]
|
||||||
[ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer.cs" id="22_tggq2"]
|
[ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer.cs" id="22_tggq2"]
|
||||||
[ext_resource type="Resource" uid="uid://cbpurnewhyefa" path="res://resources/quests/beetRoot.tres" id="22_yd2gv"]
|
[ext_resource type="Resource" path="res://resources/quests/beetRoot.tres" id="22_yd2gv"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="24_yd2gv"]
|
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="24_yd2gv"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_a2ood"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_a2ood"]
|
||||||
@@ -539,7 +539,6 @@ position = Vector2(-565, 464)
|
|||||||
|
|
||||||
[node name="dialogic_toggle" type="Node2D" parent="Yeli"]
|
[node name="dialogic_toggle" type="Node2D" parent="Yeli"]
|
||||||
script = ExtResource("17_k0k8c")
|
script = ExtResource("17_k0k8c")
|
||||||
metadata/_custom_type_script = "uid://cvkw4qd2hxksi"
|
|
||||||
|
|
||||||
[node name="Beetroot Quest trigger" type="Node2D" parent="Yeli"]
|
[node name="Beetroot Quest trigger" type="Node2D" parent="Yeli"]
|
||||||
script = ExtResource("21_blyw3")
|
script = ExtResource("21_blyw3")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
[node name="BabushkaSceneStartMenu" type="Node2D"]
|
[node name="BabushkaSceneStartMenu" type="Node2D"]
|
||||||
script = ExtResource("1_fj2fh")
|
script = ExtResource("1_fj2fh")
|
||||||
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_disclaimer.tscn")
|
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_farm_outside_2d.tscn")
|
||||||
|
|
||||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ public partial class TalkingCharacter : Node2D
|
|||||||
{
|
{
|
||||||
[Export] private AnimatedSprite2D? _sprite;
|
[Export] private AnimatedSprite2D? _sprite;
|
||||||
[Export] private string[] _timelinesToPlay;
|
[Export] private string[] _timelinesToPlay;
|
||||||
|
[Export] private bool _retriggerSameTimeline = false;
|
||||||
|
|
||||||
private bool _isTalking = true;
|
private bool _isTalking = true;
|
||||||
private int _timelineIndex = 0;
|
private int _timelineIndex = 0;
|
||||||
@@ -32,7 +32,8 @@ public partial class TalkingCharacter : Node2D
|
|||||||
_sprite.Animation = "talk";
|
_sprite.Animation = "talk";
|
||||||
_isTalking = true;
|
_isTalking = true;
|
||||||
EmitSignal(SignalName.Talking, _timelinesToPlay[_timelineIndex]);
|
EmitSignal(SignalName.Talking, _timelinesToPlay[_timelineIndex]);
|
||||||
_timelineIndex++;
|
if (!_retriggerSameTimeline)
|
||||||
|
_timelineIndex++;
|
||||||
}
|
}
|
||||||
if (_sprite != null)
|
if (_sprite != null)
|
||||||
_sprite.Play();
|
_sprite.Play();
|
||||||
|
|||||||
@@ -16,13 +16,19 @@ public partial class QuestManager : Node
|
|||||||
[Signal]
|
[Signal]
|
||||||
public delegate void QuestsChangedEventHandler();
|
public delegate void QuestsChangedEventHandler();
|
||||||
|
|
||||||
|
[Signal]
|
||||||
|
public delegate void DialogicActiveQuestEventHandler(string value);
|
||||||
|
|
||||||
|
[Export(PropertyHint.ArrayType)]
|
||||||
|
public QuestResource[] questsAccessibleFromDialogic;
|
||||||
|
|
||||||
public override void _EnterTree()
|
public override void _EnterTree()
|
||||||
{
|
{
|
||||||
Instance = this;
|
Instance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Godot.Collections.Dictionary<QuestResource, QuestStatus> _questStatus = new();
|
private Godot.Collections.Dictionary<QuestResource, QuestStatus> _questStatus = new();
|
||||||
|
|
||||||
private QuestResource? _followQuest;
|
private QuestResource? _followQuest;
|
||||||
|
|
||||||
|
|
||||||
@@ -37,6 +43,7 @@ public partial class QuestManager : Node
|
|||||||
value.status = newStatus;
|
value.status = newStatus;
|
||||||
|
|
||||||
EmitSignalQuestsChanged();
|
EmitSignalQuestsChanged();
|
||||||
|
EmitSignalDialogicActiveQuest(_followQuest?.id ?? "none");
|
||||||
|
|
||||||
if (newStatus == QuestStatus.Status.Active)
|
if (newStatus == QuestStatus.Status.Active)
|
||||||
{
|
{
|
||||||
@@ -57,7 +64,7 @@ public partial class QuestManager : Node
|
|||||||
{
|
{
|
||||||
if (_questStatus.TryGetValue(questResource, out var status))
|
if (_questStatus.TryGetValue(questResource, out var status))
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
status = new QuestStatus();
|
status = new QuestStatus();
|
||||||
_questStatus.Add(questResource, status);
|
_questStatus.Add(questResource, status);
|
||||||
return status;
|
return status;
|
||||||
@@ -72,5 +79,14 @@ public partial class QuestManager : Node
|
|||||||
{
|
{
|
||||||
_followQuest = questResource;
|
_followQuest = questResource;
|
||||||
EmitSignalQuestsChanged();
|
EmitSignalQuestsChanged();
|
||||||
|
EmitSignalDialogicActiveQuest(_followQuest?.id ?? "none");
|
||||||
|
}
|
||||||
|
|
||||||
|
// functions to call from Dialogic
|
||||||
|
public void DlSetQuestActiveAndFollow(string questId)
|
||||||
|
{
|
||||||
|
var resource = questsAccessibleFromDialogic.First(qr => qr.id == questId);
|
||||||
|
ChangeQuestStatus(resource, QuestStatus.Status.Active);
|
||||||
|
SetFollowQuest(resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ public partial class QuestStatus : GodotObject
|
|||||||
{
|
{
|
||||||
public enum Status
|
public enum Status
|
||||||
{
|
{
|
||||||
Hidden,
|
Hidden = 0,
|
||||||
Active,
|
Active = 1,
|
||||||
Done,
|
Done = 2,
|
||||||
Canceled,
|
Canceled = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
public Status status = Status.Hidden;
|
public Status status = Status.Hidden;
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
func _SetActiveQuestVar(value:String):
|
||||||
|
Dialogic.VAR.ACTIVEQUEST = value
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://bukwr1h3hn8sx
|
||||||
Reference in New Issue
Block a user