diff --git a/art/ui/UI/Circle.png b/art/ui/UI/Circle.png new file mode 100644 index 0000000..881cfc1 Binary files /dev/null and b/art/ui/UI/Circle.png differ diff --git a/art/ui/UI/Circle.png.import b/art/ui/UI/Circle.png.import new file mode 100644 index 0000000..7418793 --- /dev/null +++ b/art/ui/UI/Circle.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cvu5dybw31uxn" +path="res://.godot/imported/Circle.png-1776eabbad99f201f3fa20f90655dedf.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/UI/Circle.png" +dest_files=["res://.godot/imported/Circle.png-1776eabbad99f201f3fa20f90655dedf.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 diff --git a/art/ui/UI/journal_note.png b/art/ui/UI/journal_note.png new file mode 100644 index 0000000..669a717 Binary files /dev/null and b/art/ui/UI/journal_note.png differ diff --git a/art/ui/UI/journal_note.png.import b/art/ui/UI/journal_note.png.import new file mode 100644 index 0000000..1c2c239 --- /dev/null +++ b/art/ui/UI/journal_note.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://70twb0i3e2wo" +path="res://.godot/imported/journal_note.png-456d095624ebf40e3c23543b3d0f829a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/UI/journal_note.png" +dest_files=["res://.godot/imported/journal_note.png-456d095624ebf40e3c23543b3d0f829a.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 diff --git a/art/ui/UI/journal_standard.png b/art/ui/UI/journal_standard.png new file mode 100644 index 0000000..dfac384 Binary files /dev/null and b/art/ui/UI/journal_standard.png differ diff --git a/art/ui/UI/journal_standard.png.import b/art/ui/UI/journal_standard.png.import new file mode 100644 index 0000000..ec357bd --- /dev/null +++ b/art/ui/UI/journal_standard.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d0anh3hdk0clc" +path="res://.godot/imported/journal_standard.png-09a8c39fc0e5420f9430aff7f945ae55.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/UI/journal_standard.png" +dest_files=["res://.godot/imported/journal_standard.png-09a8c39fc0e5420f9430aff7f945ae55.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 diff --git a/art/ui/UI/quest_note.png b/art/ui/UI/quest_note.png new file mode 100644 index 0000000..348030d Binary files /dev/null and b/art/ui/UI/quest_note.png differ diff --git a/art/ui/UI/quest_note.png.import b/art/ui/UI/quest_note.png.import new file mode 100644 index 0000000..4ada790 --- /dev/null +++ b/art/ui/UI/quest_note.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b2q3xgw8xj880" +path="res://.godot/imported/quest_note.png-857ff56cb8cdd8e4401bb6320261518e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/UI/quest_note.png" +dest_files=["res://.godot/imported/quest_note.png-857ff56cb8cdd8e4401bb6320261518e.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 diff --git a/prefabs/UI/Book/Book.tscn b/prefabs/UI/Book/Book.tscn new file mode 100644 index 0000000..c8fa1c5 --- /dev/null +++ b/prefabs/UI/Book/Book.tscn @@ -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 diff --git a/prefabs/UI/Inventory/Inventory.tscn b/prefabs/UI/Inventory/Inventory.tscn index 61c9286..339c98e 100644 --- a/prefabs/UI/Inventory/Inventory.tscn +++ b/prefabs/UI/Inventory/Inventory.tscn @@ -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 diff --git a/prefabs/UI/Quest/QuestListItem.tscn b/prefabs/UI/Quest/QuestListItem.tscn new file mode 100644 index 0000000..a69c45c --- /dev/null +++ b/prefabs/UI/Quest/QuestListItem.tscn @@ -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"] diff --git a/prefabs/UI/Quest/QuestLog.tscn b/prefabs/UI/Quest/QuestLog.tscn new file mode 100644 index 0000000..7766b71 --- /dev/null +++ b/prefabs/UI/Quest/QuestLog.tscn @@ -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"] diff --git a/project.godot b/project.godot index ec9601f..66020d1 100644 --- a/project.godot +++ b/project.godot @@ -26,6 +26,7 @@ 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] @@ -163,6 +164,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) diff --git a/resources/quests/test_01.tres b/resources/quests/test_01.tres new file mode 100644 index 0000000..ed1775e --- /dev/null +++ b/resources/quests/test_01.tres @@ -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" diff --git a/resources/quests/test_02.tres b/resources/quests/test_02.tres new file mode 100644 index 0000000..4d80320 --- /dev/null +++ b/resources/quests/test_02.tres @@ -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" diff --git a/resources/quests/test_03.tres b/resources/quests/test_03.tres new file mode 100644 index 0000000..9f2ae66 --- /dev/null +++ b/resources/quests/test_03.tres @@ -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" diff --git a/scenes/testing/babushka_tests_book.tscn b/scenes/testing/babushka_tests_book.tscn new file mode 100644 index 0000000..3a5a51e --- /dev/null +++ b/scenes/testing/babushka_tests_book.tscn @@ -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")]) diff --git a/scenes/testing/babushka_tests_quests.tscn b/scenes/testing/babushka_tests_quests.tscn new file mode 100644 index 0000000..c8c595f --- /dev/null +++ b/scenes/testing/babushka_tests_quests.tscn @@ -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"] diff --git a/scripts/CSharp/Common/Quest/PopUpPostIt.cs b/scripts/CSharp/Common/Quest/PopUpPostIt.cs new file mode 100644 index 0000000..34d0a9f --- /dev/null +++ b/scripts/CSharp/Common/Quest/PopUpPostIt.cs @@ -0,0 +1,22 @@ +using Godot; +using System; +using Babushka.scripts.CSharp.Common.Quest; + +public partial class PopUpPostIt : Control +{ + private Label Text => GetNode