Refactoring crap
This commit is contained in:
		@@ -11,26 +11,15 @@ config_version=5
 | 
			
		||||
[application]
 | 
			
		||||
 | 
			
		||||
config/name="Dawn Godot"
 | 
			
		||||
run/main_scene="uid://w1q5eoiejmy3"
 | 
			
		||||
run/main_scene="uid://b16ysbx7ah03u"
 | 
			
		||||
config/features=PackedStringArray("4.4", "GL Compatibility")
 | 
			
		||||
config/icon="res://icon.svg"
 | 
			
		||||
 | 
			
		||||
[autoload]
 | 
			
		||||
 | 
			
		||||
BATTLE="*res://scripts/Singleton/BattleSystem.gd"
 | 
			
		||||
COOKING="*res://scripts/Singleton/CookingSystem.gd"
 | 
			
		||||
OVERWORLD="*res://scripts/Singleton/OverworldSystem.gd"
 | 
			
		||||
ITEM="*res://scenes/Singletons/Item.tscn"
 | 
			
		||||
PAUSE="*res://scripts/Singleton/PauseSystem.gd"
 | 
			
		||||
QUEST="*res://scenes/Singletons/Quest.tscn"
 | 
			
		||||
SCENE_MANAGER="*res://scripts/Singleton/SceneSystem.gd"
 | 
			
		||||
UI="*res://scenes/Singletons/UI.tscn"
 | 
			
		||||
VN="*res://scripts/Singleton/VNSystem.gd"
 | 
			
		||||
LOAD="*res://scenes/Singletons/Load.tscn"
 | 
			
		||||
RECIPE="*res://scenes/Singletons/Recipe.tscn"
 | 
			
		||||
LOCALE="*res://scripts/Singleton/LocaleSystem.gd"
 | 
			
		||||
ControllerIcons="*res://addons/controller_icons/ControllerIcons.gd"
 | 
			
		||||
EVENT="*res://scenes/Singletons/Event.tscn"
 | 
			
		||||
PHYSICS="*res://scripts/singletons/GamePhysics.gd"
 | 
			
		||||
UI="*res://scenes/singletons/UI.tscn"
 | 
			
		||||
PAUSE="*res://scripts/singletons/Pause.gd"
 | 
			
		||||
 | 
			
		||||
[debug]
 | 
			
		||||
 | 
			
		||||
@@ -41,6 +30,8 @@ gdscript/warnings/shadowed_variable=0
 | 
			
		||||
 | 
			
		||||
window/size/viewport_width=480
 | 
			
		||||
window/size/viewport_height=270
 | 
			
		||||
window/size/window_width_override=960
 | 
			
		||||
window/size/window_height_override=540
 | 
			
		||||
window/stretch/mode="viewport"
 | 
			
		||||
window/stretch/scale_mode="integer"
 | 
			
		||||
 | 
			
		||||
@@ -64,7 +55,7 @@ theme/custom_font="uid://ck4rsg0nvvxtq"
 | 
			
		||||
 | 
			
		||||
[input]
 | 
			
		||||
 | 
			
		||||
left={
 | 
			
		||||
move_left={
 | 
			
		||||
"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":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
 | 
			
		||||
, 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":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
 | 
			
		||||
@@ -72,7 +63,7 @@ left={
 | 
			
		||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
 | 
			
		||||
]
 | 
			
		||||
}
 | 
			
		||||
right={
 | 
			
		||||
move_right={
 | 
			
		||||
"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":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
 | 
			
		||||
, 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":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
 | 
			
		||||
@@ -80,7 +71,7 @@ right={
 | 
			
		||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
 | 
			
		||||
]
 | 
			
		||||
}
 | 
			
		||||
up={
 | 
			
		||||
move_forward={
 | 
			
		||||
"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":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
 | 
			
		||||
, 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":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
 | 
			
		||||
@@ -88,7 +79,7 @@ up={
 | 
			
		||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
 | 
			
		||||
]
 | 
			
		||||
}
 | 
			
		||||
down={
 | 
			
		||||
move_back={
 | 
			
		||||
"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":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
 | 
			
		||||
, 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":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,41 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=9 format=3 uid="uid://bes5p6ckw6d58"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://d2jqsiapy07ii" path="res://scripts/Entity/ItemOnGround.gd" id="1_pnyp6"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dtjjqp2atjyhr" path="res://scripts/Entity/Entity.gd" id="2_crfvs"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://03dqknw7v4mr" path="res://scripts/Entity/Component/EntityInteractable.gd" id="3_7clu1"]
 | 
			
		||||
[ext_resource type="Shader" uid="uid://7h2axb2tsh17" path="res://shaders/NPC Shader.gdshader" id="4_w0eam"]
 | 
			
		||||
[ext_resource type="Texture2D" uid="uid://cofrgefp8e617" path="res://textures/human.png" id="5_5uma8"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape3D" id="BoxShape3D_cpa1u"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="QuadMesh" id="QuadMesh_dyaax"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fegux"]
 | 
			
		||||
render_priority = 0
 | 
			
		||||
shader = ExtResource("4_w0eam")
 | 
			
		||||
shader_parameter/npcTexture = ExtResource("5_5uma8")
 | 
			
		||||
shader_parameter/color = Color(0.77816, 0.965494, 0.746061, 1)
 | 
			
		||||
shader_parameter/frame = 0
 | 
			
		||||
shader_parameter/direction = 2
 | 
			
		||||
 | 
			
		||||
[node name="ItemOnGround" type="StaticBody3D"]
 | 
			
		||||
collision_layer = 2
 | 
			
		||||
collision_mask = 258
 | 
			
		||||
script = ExtResource("1_pnyp6")
 | 
			
		||||
 | 
			
		||||
[node name="Entity" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("2_crfvs")
 | 
			
		||||
metadata/_custom_type_script = "uid://dtjjqp2atjyhr"
 | 
			
		||||
 | 
			
		||||
[node name="EntityInteractable" type="Node" parent="Entity" node_paths=PackedStringArray("entity")]
 | 
			
		||||
script = ExtResource("3_7clu1")
 | 
			
		||||
entity = NodePath("..")
 | 
			
		||||
metadata/_custom_type_script = "uid://03dqknw7v4mr"
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
shape = SubResource("BoxShape3D_cpa1u")
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 0.173648, 0.984808, 0, -0.984808, 0.173648, 0, 0, 0)
 | 
			
		||||
mesh = SubResource("QuadMesh_dyaax")
 | 
			
		||||
surface_material_override/0 = SubResource("ShaderMaterial_fegux")
 | 
			
		||||
@@ -1,71 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=12 format=3 uid="uid://yhtpoum3eek7"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://ixwikdguyhf0" path="res://scripts/Entity/Rosa.gd" id="1_r5ufg"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dtjjqp2atjyhr" path="res://scripts/Entity/Entity.gd" id="1_rvn3n"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://jd50n00bo05y" path="res://scripts/Entity/RosaCamera.gd" id="2_tr66j"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://cjfcpi7sxentf" path="res://scripts/Entity/Component/EntityDirection.gd" id="2_vcxxc"]
 | 
			
		||||
[ext_resource type="Shader" uid="uid://7h2axb2tsh17" path="res://shaders/NPC Shader.gdshader" id="3_j5vis"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://c5nfs0m6ua4eb" path="res://scripts/Entity/Component/EntityMovement.gd" id="4_7s3uq"]
 | 
			
		||||
[ext_resource type="Texture2D" uid="uid://cofrgefp8e617" path="res://textures/human.png" id="4_rvn3n"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dfh2rh8idx267" path="res://scripts/Entity/Component/EntityInteractor.gd" id="5_ug24t"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ls7r8"]
 | 
			
		||||
radius = 0.437175
 | 
			
		||||
height = 0.945346
 | 
			
		||||
 | 
			
		||||
[sub_resource type="QuadMesh" id="QuadMesh_dyaax"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fegux"]
 | 
			
		||||
render_priority = 0
 | 
			
		||||
shader = ExtResource("3_j5vis")
 | 
			
		||||
shader_parameter/npcTexture = ExtResource("4_rvn3n")
 | 
			
		||||
shader_parameter/color = Color(1, 1, 1, 1)
 | 
			
		||||
shader_parameter/frame = 0
 | 
			
		||||
shader_parameter/direction = 2
 | 
			
		||||
 | 
			
		||||
[node name="Rosa" type="CharacterBody3D"]
 | 
			
		||||
collision_layer = 2
 | 
			
		||||
collision_mask = 258
 | 
			
		||||
script = ExtResource("1_r5ufg")
 | 
			
		||||
metadata/_custom_type_script = "uid://ixwikdguyhf0"
 | 
			
		||||
 | 
			
		||||
[node name="Entity" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("1_rvn3n")
 | 
			
		||||
metadata/_custom_type_script = "uid://dtjjqp2atjyhr"
 | 
			
		||||
 | 
			
		||||
[node name="EntityDirection" type="Node" parent="Entity" node_paths=PackedStringArray("meshInstance", "characterBody")]
 | 
			
		||||
script = ExtResource("2_vcxxc")
 | 
			
		||||
meshInstance = NodePath("../../MeshInstance3D")
 | 
			
		||||
direction = 2
 | 
			
		||||
characterBody = NodePath("../..")
 | 
			
		||||
metadata/_custom_type_script = "uid://cjfcpi7sxentf"
 | 
			
		||||
 | 
			
		||||
[node name="EntityMoving" type="Node" parent="Entity" node_paths=PackedStringArray("characterBody", "entity", "entityDirection")]
 | 
			
		||||
script = ExtResource("4_7s3uq")
 | 
			
		||||
characterBody = NodePath("../..")
 | 
			
		||||
entity = NodePath("..")
 | 
			
		||||
entityDirection = NodePath("../EntityDirection")
 | 
			
		||||
movementType = 0
 | 
			
		||||
 | 
			
		||||
[node name="EntityInteractor" type="Node" parent="Entity" node_paths=PackedStringArray("entityDirection", "characterBody", "entity")]
 | 
			
		||||
script = ExtResource("5_ug24t")
 | 
			
		||||
interactorType = 0
 | 
			
		||||
entityDirection = NodePath("../EntityDirection")
 | 
			
		||||
characterBody = NodePath("../..")
 | 
			
		||||
entity = NodePath("..")
 | 
			
		||||
metadata/_custom_type_script = "uid://dfh2rh8idx267"
 | 
			
		||||
 | 
			
		||||
[node name="Rosa Camera" type="Camera3D" parent="." node_paths=PackedStringArray("follow")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 0.130388, 0.991463, 0, -0.991463, 0.130388, 0, 3.14994, 0.404846)
 | 
			
		||||
current = true
 | 
			
		||||
fov = 30.0
 | 
			
		||||
script = ExtResource("2_tr66j")
 | 
			
		||||
follow = NodePath("..")
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
shape = SubResource("CapsuleShape3D_ls7r8")
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 0.173648, 0.984808, 0, -0.984808, 0.173648, 0, 0, 0)
 | 
			
		||||
mesh = SubResource("QuadMesh_dyaax")
 | 
			
		||||
surface_material_override/0 = SubResource("ShaderMaterial_fegux")
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=9 format=3 uid="uid://bkj630bhmnvsi"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://bitykguiignfu" path="res://scripts/Entity/Sign.gd" id="1_cpa1u"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dtjjqp2atjyhr" path="res://scripts/Entity/Entity.gd" id="2_obj4d"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://03dqknw7v4mr" path="res://scripts/Entity/Component/EntityInteractable.gd" id="3_cpa1u"]
 | 
			
		||||
[ext_resource type="Shader" uid="uid://7h2axb2tsh17" path="res://shaders/NPC Shader.gdshader" id="7_vqvna"]
 | 
			
		||||
[ext_resource type="Texture2D" uid="uid://cofrgefp8e617" path="res://textures/human.png" id="8_on2eh"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape3D" id="BoxShape3D_cpa1u"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="QuadMesh" id="QuadMesh_dyaax"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fegux"]
 | 
			
		||||
render_priority = 0
 | 
			
		||||
shader = ExtResource("7_vqvna")
 | 
			
		||||
shader_parameter/npcTexture = ExtResource("8_on2eh")
 | 
			
		||||
shader_parameter/color = Color(1, 1, 0, 1)
 | 
			
		||||
shader_parameter/frame = 0
 | 
			
		||||
shader_parameter/direction = 2
 | 
			
		||||
 | 
			
		||||
[node name="Sign" type="StaticBody3D"]
 | 
			
		||||
collision_layer = 2
 | 
			
		||||
collision_mask = 258
 | 
			
		||||
script = ExtResource("1_cpa1u")
 | 
			
		||||
metadata/_custom_type_script = "uid://bitykguiignfu"
 | 
			
		||||
 | 
			
		||||
[node name="Entity" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("2_obj4d")
 | 
			
		||||
metadata/_custom_type_script = "uid://dtjjqp2atjyhr"
 | 
			
		||||
 | 
			
		||||
[node name="EntityInteractable" type="Node" parent="Entity" node_paths=PackedStringArray("entity")]
 | 
			
		||||
script = ExtResource("3_cpa1u")
 | 
			
		||||
entity = NodePath("..")
 | 
			
		||||
metadata/_custom_type_script = "uid://03dqknw7v4mr"
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
shape = SubResource("BoxShape3D_cpa1u")
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 0.173648, 0.984808, 0, -0.984808, 0.173648, 0, 0, 0)
 | 
			
		||||
mesh = SubResource("QuadMesh_dyaax")
 | 
			
		||||
surface_material_override/0 = SubResource("ShaderMaterial_fegux")
 | 
			
		||||
@@ -1,60 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=11 format=3 uid="uid://dr4b2pmsknuhc"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://d23qg1ovkbxst" path="res://scripts/Entity/BasicNPCEntity.gd" id="1_1muh7"]
 | 
			
		||||
[ext_resource type="Shader" uid="uid://7h2axb2tsh17" path="res://shaders/NPC Shader.gdshader" id="1_xgcv1"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dtjjqp2atjyhr" path="res://scripts/Entity/Entity.gd" id="2_ehu3x"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://cjfcpi7sxentf" path="res://scripts/Entity/Component/EntityDirection.gd" id="3_gyi1p"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://c5nfs0m6ua4eb" path="res://scripts/Entity/Component/EntityMovement.gd" id="4_3wesq"]
 | 
			
		||||
[ext_resource type="Texture2D" uid="uid://cofrgefp8e617" path="res://textures/human.png" id="4_vo0ku"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://03dqknw7v4mr" path="res://scripts/Entity/Component/EntityInteractable.gd" id="5_gyi1p"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_dw1sy"]
 | 
			
		||||
radius = 0.420979
 | 
			
		||||
height = 0.919425
 | 
			
		||||
 | 
			
		||||
[sub_resource type="QuadMesh" id="QuadMesh_xhkdv"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_l4utx"]
 | 
			
		||||
render_priority = 0
 | 
			
		||||
shader = ExtResource("1_xgcv1")
 | 
			
		||||
shader_parameter/npcTexture = ExtResource("4_vo0ku")
 | 
			
		||||
shader_parameter/color = Color(0, 0.563816, 0, 1)
 | 
			
		||||
shader_parameter/frame = 0
 | 
			
		||||
shader_parameter/direction = 0
 | 
			
		||||
 | 
			
		||||
[node name="TestNpc" type="CharacterBody3D"]
 | 
			
		||||
collision_layer = 2
 | 
			
		||||
collision_mask = 258
 | 
			
		||||
script = ExtResource("1_1muh7")
 | 
			
		||||
metadata/_custom_type_script = "uid://d23qg1ovkbxst"
 | 
			
		||||
 | 
			
		||||
[node name="Entity" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("2_ehu3x")
 | 
			
		||||
metadata/_custom_type_script = "uid://dtjjqp2atjyhr"
 | 
			
		||||
 | 
			
		||||
[node name="EntityDirection" type="Node" parent="Entity" node_paths=PackedStringArray("meshInstance", "characterBody")]
 | 
			
		||||
script = ExtResource("3_gyi1p")
 | 
			
		||||
meshInstance = NodePath("../../MeshInstance3D")
 | 
			
		||||
characterBody = NodePath("../..")
 | 
			
		||||
metadata/_custom_type_script = "uid://cjfcpi7sxentf"
 | 
			
		||||
 | 
			
		||||
[node name="EntityMoving" type="Node" parent="Entity" node_paths=PackedStringArray("characterBody", "entity", "entityDirection")]
 | 
			
		||||
script = ExtResource("4_3wesq")
 | 
			
		||||
characterBody = NodePath("../..")
 | 
			
		||||
entity = NodePath("..")
 | 
			
		||||
entityDirection = NodePath("../EntityDirection")
 | 
			
		||||
movementType = 2
 | 
			
		||||
 | 
			
		||||
[node name="EntityInteractable" type="Node" parent="Entity" node_paths=PackedStringArray("entityDirection", "entity")]
 | 
			
		||||
script = ExtResource("5_gyi1p")
 | 
			
		||||
entityDirection = NodePath("../EntityDirection")
 | 
			
		||||
entity = NodePath("..")
 | 
			
		||||
metadata/_custom_type_script = "uid://03dqknw7v4mr"
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
shape = SubResource("CapsuleShape3D_dw1sy")
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 0.173648, 0.984808, 0, -0.984808, 0.173648, 0.00989294, 0, 0)
 | 
			
		||||
mesh = SubResource("QuadMesh_xhkdv")
 | 
			
		||||
surface_material_override/0 = SubResource("ShaderMaterial_l4utx")
 | 
			
		||||
@@ -1,35 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=3 format=3 uid="uid://w1q5eoiejmy3"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://cak4lch21nq30" path="res://scripts/Scene/MainMenuScene.gd" id="1_yqorp"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://cq6bvma0kk6tg" path="res://scripts/UI/AdvancedRichText.gd" id="2_0ykhv"]
 | 
			
		||||
 | 
			
		||||
[node name="MainMenu" type="Node"]
 | 
			
		||||
script = ExtResource("1_yqorp")
 | 
			
		||||
 | 
			
		||||
[node name="Control" type="Control" parent="."]
 | 
			
		||||
layout_mode = 3
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
 | 
			
		||||
[node name="Label" type="RichTextLabel" parent="Control"]
 | 
			
		||||
auto_translate_mode = 2
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
anchors_preset = 8
 | 
			
		||||
anchor_left = 0.5
 | 
			
		||||
anchor_top = 0.5
 | 
			
		||||
anchor_right = 0.5
 | 
			
		||||
anchor_bottom = 0.5
 | 
			
		||||
offset_left = -133.5
 | 
			
		||||
offset_top = -37.5
 | 
			
		||||
offset_right = 133.5
 | 
			
		||||
offset_bottom = 37.5
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
bbcode_enabled = true
 | 
			
		||||
text = "main_menu.label"
 | 
			
		||||
horizontal_alignment = 1
 | 
			
		||||
script = ExtResource("2_0ykhv")
 | 
			
		||||
advancedText = "main_menu.label"
 | 
			
		||||
@@ -1,156 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=17 format=3 uid="uid://dx6fv8n4jl5ku"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://yhtpoum3eek7" path="res://scenes/Entities/Rosa.tscn" id="1_7b7hx"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://c37crdel0m5mw" path="res://scripts/Map/Map.gd" id="1_ru75d"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://dr4b2pmsknuhc" path="res://scenes/Entities/TestNPC.tscn" id="2_cg1ph"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://lh713g04d3bg" path="res://scenes/Maps/TestMap/TestMapGround.tscn" id="3_gxq5o"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://boj5o4fx41rv8" path="res://scenes/Maps/TestMap/TestMapBuilding.tscn" id="4_brp0k"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://bes5p6ckw6d58" path="res://scenes/Entities/ItemOnGround.tscn" id="4_ejcqv"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://tkfc88q8m86f" path="res://scripts/Event/EventConversation.gd" id="5_cg1ph"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://y7ckj1tn5cro" path="res://scripts/Event/EventTextbox.gd" id="6_gxq5o"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://c4d7nithqnx5y" path="res://scripts/Event/Quest/EventStartQuest.gd" id="7_brp0k"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://bkj630bhmnvsi" path="res://scenes/Entities/Sign.tscn" id="9_xfqoe"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://b41umpbgqfuc2" path="res://scripts/Event/Item/EventGetItem.gd" id="10_avybc"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://0ev1l0bf85gj" path="res://scripts/Event/Quest/EventIfQuest.gd" id="10_i48p6"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://cs7voh47aoca8" path="res://scripts/Event/EventTrigger.gd" id="13_60ixl"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_e1h75"]
 | 
			
		||||
sky_horizon_color = Color(0.59625, 0.6135, 0.6375, 1)
 | 
			
		||||
sky_energy_multiplier = 0.0
 | 
			
		||||
ground_bottom_color = Color(0, 0, 0, 1)
 | 
			
		||||
ground_horizon_color = Color(0.59625, 0.6135, 0.6375, 1)
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Sky" id="Sky_weucl"]
 | 
			
		||||
sky_material = SubResource("ProceduralSkyMaterial_e1h75")
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Environment" id="Environment_nyivo"]
 | 
			
		||||
sky = SubResource("Sky_weucl")
 | 
			
		||||
ambient_light_source = 1
 | 
			
		||||
 | 
			
		||||
[node name="TestMap" type="Node3D"]
 | 
			
		||||
script = ExtResource("1_ru75d")
 | 
			
		||||
title = "map.test_map.title"
 | 
			
		||||
 | 
			
		||||
[node name="Entities" type="Node3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.19857, 0.684572, 0.968477)
 | 
			
		||||
 | 
			
		||||
[node name="Rosa" parent="Entities" instance=ExtResource("1_7b7hx")]
 | 
			
		||||
 | 
			
		||||
[node name="Green" parent="Entities" node_paths=PackedStringArray("interactEvent") instance=ExtResource("2_cg1ph")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.88604, -0.224994, -1.36774)
 | 
			
		||||
interactEvent = NodePath("../../Events/TestConversation")
 | 
			
		||||
 | 
			
		||||
[node name="Sign" parent="Entities" node_paths=PackedStringArray("interactEvent") instance=ExtResource("9_xfqoe")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.56382, -0.547748, 1.61289)
 | 
			
		||||
interactEvent = NodePath("../../Events/TestConversation")
 | 
			
		||||
 | 
			
		||||
[node name="Onion0" parent="Entities" instance=ExtResource("4_ejcqv")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.546944, -0.547748, -3.46628)
 | 
			
		||||
itemType = 2
 | 
			
		||||
quantity = 2
 | 
			
		||||
 | 
			
		||||
[node name="Onion1" parent="Entities" instance=ExtResource("4_ejcqv")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.25922, -0.547748, -4.61426)
 | 
			
		||||
itemType = 2
 | 
			
		||||
quantity = 2
 | 
			
		||||
 | 
			
		||||
[node name="Onion2" parent="Entities" instance=ExtResource("4_ejcqv")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.83853, -0.547748, -3.29584)
 | 
			
		||||
itemType = 2
 | 
			
		||||
quantity = 2
 | 
			
		||||
 | 
			
		||||
[node name="SweetPotato0" parent="Entities" instance=ExtResource("4_ejcqv")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.31019, -0.547748, 3.74619)
 | 
			
		||||
itemType = 3
 | 
			
		||||
 | 
			
		||||
[node name="SweetPotato1" parent="Entities" instance=ExtResource("4_ejcqv")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0143311, -0.547748, 4.4158)
 | 
			
		||||
itemType = 3
 | 
			
		||||
 | 
			
		||||
[node name="SweetPotato2" parent="Entities" instance=ExtResource("4_ejcqv")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.05915, -0.547748, 5.04958)
 | 
			
		||||
itemType = 3
 | 
			
		||||
 | 
			
		||||
[node name="Map" type="Node3D" parent="."]
 | 
			
		||||
metadata/_edit_lock_ = true
 | 
			
		||||
 | 
			
		||||
[node name="Ground" parent="Map" instance=ExtResource("3_gxq5o")]
 | 
			
		||||
 | 
			
		||||
[node name="Building2" parent="Map" instance=ExtResource("4_brp0k")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.13514, 2.62692, -0.0984068)
 | 
			
		||||
collision_layer = 256
 | 
			
		||||
collision_mask = 2
 | 
			
		||||
 | 
			
		||||
[node name="Building" parent="Map" instance=ExtResource("4_brp0k")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.92766, 2.37929, -4.38178)
 | 
			
		||||
collision_layer = 256
 | 
			
		||||
collision_mask = 2
 | 
			
		||||
 | 
			
		||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="Map"]
 | 
			
		||||
environment = SubResource("Environment_nyivo")
 | 
			
		||||
 | 
			
		||||
[node name="OmniLight3D" type="OmniLight3D" parent="Map"]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7.20244, 3.80554)
 | 
			
		||||
light_energy = 3.375
 | 
			
		||||
shadow_bias = 0.0
 | 
			
		||||
shadow_normal_bias = 0.9
 | 
			
		||||
omni_range = 281.646
 | 
			
		||||
 | 
			
		||||
[node name="Events" type="Node" parent="."]
 | 
			
		||||
 | 
			
		||||
[node name="TestConversation" type="Node" parent="Events"]
 | 
			
		||||
script = ExtResource("5_cg1ph")
 | 
			
		||||
 | 
			
		||||
[node name="After Quest Started" type="Node" parent="Events/TestConversation"]
 | 
			
		||||
script = ExtResource("10_i48p6")
 | 
			
		||||
type = 6
 | 
			
		||||
metadata/_custom_type_script = "uid://0ev1l0bf85gj"
 | 
			
		||||
 | 
			
		||||
[node name="EventIfQuest" type="Node" parent="Events/TestConversation/After Quest Started"]
 | 
			
		||||
script = ExtResource("10_i48p6")
 | 
			
		||||
 | 
			
		||||
[node name="Text 2" type="Node" parent="Events/TestConversation/After Quest Started/EventIfQuest"]
 | 
			
		||||
script = ExtResource("6_gxq5o")
 | 
			
		||||
text = "You are reading the words fo god"
 | 
			
		||||
 | 
			
		||||
[node name="EventIfQuest2" type="Node" parent="Events/TestConversation/After Quest Started"]
 | 
			
		||||
script = ExtResource("10_i48p6")
 | 
			
		||||
type = 2
 | 
			
		||||
 | 
			
		||||
[node name="Text 2" type="Node" parent="Events/TestConversation/After Quest Started/EventIfQuest2"]
 | 
			
		||||
script = ExtResource("6_gxq5o")
 | 
			
		||||
text = "map.test_map.event.gather_onion.text2"
 | 
			
		||||
 | 
			
		||||
[node name="Before Quest Started" type="Node" parent="Events/TestConversation"]
 | 
			
		||||
script = ExtResource("10_i48p6")
 | 
			
		||||
type = 7
 | 
			
		||||
metadata/_custom_type_script = "uid://0ev1l0bf85gj"
 | 
			
		||||
 | 
			
		||||
[node name="Text 0" type="Node" parent="Events/TestConversation/Before Quest Started"]
 | 
			
		||||
script = ExtResource("6_gxq5o")
 | 
			
		||||
text = "map.test_map.event.gather_onion.text0"
 | 
			
		||||
 | 
			
		||||
[node name="Quest" type="Node" parent="Events/TestConversation/Before Quest Started"]
 | 
			
		||||
script = ExtResource("7_brp0k")
 | 
			
		||||
metadata/_custom_type_script = "uid://c4d7nithqnx5y"
 | 
			
		||||
 | 
			
		||||
[node name="Text 1" type="Node" parent="Events/TestConversation/Before Quest Started"]
 | 
			
		||||
script = ExtResource("6_gxq5o")
 | 
			
		||||
text = "map.test_map.event.gather_onion.text1"
 | 
			
		||||
 | 
			
		||||
[node name="Get Item" type="Node" parent="Events/TestConversation/Before Quest Started"]
 | 
			
		||||
script = ExtResource("10_avybc")
 | 
			
		||||
getType = 1
 | 
			
		||||
metadata/_custom_type_script = "uid://b41umpbgqfuc2"
 | 
			
		||||
 | 
			
		||||
[node name="EventTrigger" type="Node" parent="Events"]
 | 
			
		||||
script = ExtResource("13_60ixl")
 | 
			
		||||
 | 
			
		||||
[node name="EventIf" type="Node" parent="Events/EventTrigger"]
 | 
			
		||||
script = ExtResource("10_i48p6")
 | 
			
		||||
type = 6
 | 
			
		||||
metadata/_custom_type_script = "uid://0ev1l0bf85gj"
 | 
			
		||||
 | 
			
		||||
[node name="Text 0" type="Node" parent="Events/EventTrigger/EventIf"]
 | 
			
		||||
script = ExtResource("6_gxq5o")
 | 
			
		||||
text = "Triggered"
 | 
			
		||||
@@ -1,15 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=3 format=3 uid="uid://boj5o4fx41rv8"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxMesh" id="BoxMesh_22rim"]
 | 
			
		||||
size = Vector3(5, 5, 5)
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape3D" id="BoxShape3D_jh0ui"]
 | 
			
		||||
size = Vector3(5, 5, 5)
 | 
			
		||||
 | 
			
		||||
[node name="Building" type="StaticBody3D"]
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
 | 
			
		||||
mesh = SubResource("BoxMesh_22rim")
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
shape = SubResource("BoxShape3D_jh0ui")
 | 
			
		||||
@@ -1,31 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=6 format=3 uid="uid://lh713g04d3bg"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Shader" uid="uid://67hsyo0qqlfm" path="res://shaders/Map Shader.gdshader" id="1_knx2j"]
 | 
			
		||||
[ext_resource type="Texture2D" uid="uid://cu1hvpqmqn31n" path="res://icon.svg" id="2_3bnhs"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxMesh" id="BoxMesh_s8iqe"]
 | 
			
		||||
lightmap_size_hint = Vector2i(504, 257)
 | 
			
		||||
uv2_padding = 0.0
 | 
			
		||||
size = Vector3(50, 0.1, 50)
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_s8iqe"]
 | 
			
		||||
render_priority = 0
 | 
			
		||||
shader = ExtResource("1_knx2j")
 | 
			
		||||
shader_parameter/tileset = ExtResource("2_3bnhs")
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape3D" id="BoxShape3D_s8iqe"]
 | 
			
		||||
size = Vector3(50, 0.1, 50)
 | 
			
		||||
 | 
			
		||||
[node name="Ground" type="StaticBody3D"]
 | 
			
		||||
collision_layer = 256
 | 
			
		||||
collision_mask = 2
 | 
			
		||||
metadata/_edit_lock_ = true
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
 | 
			
		||||
mesh = SubResource("BoxMesh_s8iqe")
 | 
			
		||||
surface_material_override/0 = SubResource("ShaderMaterial_s8iqe")
 | 
			
		||||
metadata/_edit_lock_ = true
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
shape = SubResource("BoxShape3D_s8iqe")
 | 
			
		||||
metadata/_edit_lock_ = true
 | 
			
		||||
@@ -1,8 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=2 format=3 uid="uid://tmbx2kit0jyq"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://pcncoc6wum4q" path="res://scripts/Scene/OverworldScene.gd" id="1_rfscu"]
 | 
			
		||||
 | 
			
		||||
[node name="Overworld" type="Node3D"]
 | 
			
		||||
script = ExtResource("1_rfscu")
 | 
			
		||||
 | 
			
		||||
[node name="Map" type="Node3D" parent="."]
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=2 format=3 uid="uid://dqde5pj14u71"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://dy8gbmwddma3b" path="res://scripts/Singleton/EventSystem.gd" id="1_pu13l"]
 | 
			
		||||
 | 
			
		||||
[node name="EventSystem" type="Node"]
 | 
			
		||||
script = ExtResource("1_pu13l")
 | 
			
		||||
metadata/_custom_type_script = "uid://dy8gbmwddma3b"
 | 
			
		||||
 | 
			
		||||
[node name="StartedEvents" type="Node" parent="."]
 | 
			
		||||
@@ -1,44 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=5 format=3 uid="uid://mfxht4d8pvjj"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://bc4c4eqfrnegb" path="res://scripts/Singleton/ItemSystem.gd" id="1_sv510"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dipe47ljyvycv" path="res://scripts/Item/ingredients/ItemOnion.gd" id="2_w2ka5"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://b6v2o563casay" path="res://scripts/Item/medicine/ItemPotion.gd" id="3_q4yin"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://c6t5tprnd23t0" path="res://scripts/Item/Item.gd" id="3_v1lpn"]
 | 
			
		||||
 | 
			
		||||
[node name="Item" type="Node"]
 | 
			
		||||
script = ExtResource("1_sv510")
 | 
			
		||||
 | 
			
		||||
[node name="Ingredients" type="Node" parent="."]
 | 
			
		||||
 | 
			
		||||
[node name="Onion" type="Node" parent="Ingredients"]
 | 
			
		||||
script = ExtResource("2_w2ka5")
 | 
			
		||||
title = "item.onion.title"
 | 
			
		||||
description_text = "item.onion.description"
 | 
			
		||||
type = 2
 | 
			
		||||
metadata/_custom_type_script = "uid://b6v2o563casay"
 | 
			
		||||
 | 
			
		||||
[node name="Item" type="Node" parent="Ingredients"]
 | 
			
		||||
script = ExtResource("3_v1lpn")
 | 
			
		||||
title = "item.sweet_potato.name"
 | 
			
		||||
description_text = "item.sweet_potato.description"
 | 
			
		||||
type = 3
 | 
			
		||||
metadata/_custom_type_script = "uid://c6t5tprnd23t0"
 | 
			
		||||
 | 
			
		||||
[node name="Medicine" type="Node" parent="."]
 | 
			
		||||
 | 
			
		||||
[node name="Item" type="Node" parent="Medicine"]
 | 
			
		||||
script = ExtResource("3_q4yin")
 | 
			
		||||
title = "item.potion.name"
 | 
			
		||||
description_text = "item.potion.description"
 | 
			
		||||
category = 0
 | 
			
		||||
metadata/_custom_type_script = "uid://b6v2o563casay"
 | 
			
		||||
 | 
			
		||||
[node name="Food" type="Node" parent="."]
 | 
			
		||||
 | 
			
		||||
[node name="Item" type="Node" parent="Food"]
 | 
			
		||||
script = ExtResource("3_v1lpn")
 | 
			
		||||
title = "item.baked_sweet_potato.name"
 | 
			
		||||
description_text = "item.baked_sweet_potato.description"
 | 
			
		||||
type = 4
 | 
			
		||||
category = 3
 | 
			
		||||
metadata/_custom_type_script = "uid://c6t5tprnd23t0"
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
[gd_scene format=3 uid="uid://dr2o6ymwbwxm1"]
 | 
			
		||||
 | 
			
		||||
[node name="Load" type="Node"]
 | 
			
		||||
@@ -1,23 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=4 format=3 uid="uid://cs3kmmd0rfm8w"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://dnlg1e8une55l" path="res://scripts/Singleton/QuestSystem.gd" id="1_v2h4q"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dn0kxbe85n40f" path="res://scripts/Quest/Quest.gd" id="2_n4ii1"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://de1ao4huhy0hm" path="res://scripts/Quest/QuestObjective.gd" id="3_l8p7p"]
 | 
			
		||||
 | 
			
		||||
[node name="QuestSystem" type="Node"]
 | 
			
		||||
script = ExtResource("1_v2h4q")
 | 
			
		||||
 | 
			
		||||
[node name="Quests" type="Node" parent="."]
 | 
			
		||||
 | 
			
		||||
[node name="Test Quest" type="Node" parent="Quests"]
 | 
			
		||||
script = ExtResource("2_n4ii1")
 | 
			
		||||
title = "quest.test_quest.title"
 | 
			
		||||
metadata/_custom_type_script = "uid://dn0kxbe85n40f"
 | 
			
		||||
 | 
			
		||||
[node name="Find Sweet Potato" type="Node" parent="Quests/Test Quest"]
 | 
			
		||||
script = ExtResource("3_l8p7p")
 | 
			
		||||
title = "quest.test_quest.sweet_potato.title"
 | 
			
		||||
description = "quest.test_quest.sweet_potato.description"
 | 
			
		||||
itemType = 3
 | 
			
		||||
quantity = 2
 | 
			
		||||
metadata/_custom_type_script = "uid://de1ao4huhy0hm"
 | 
			
		||||
@@ -1,27 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=6 format=3 uid="uid://1l0tymk8cfxu"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://b83k8ksk1dpu2" path="res://scripts/Singleton/RecipeSystem.gd" id="1_o4nv4"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dipvg4uwjv6p2" path="res://scripts/Cooking/Recipe.gd" id="2_f5akq"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://c26aptwsjs044" path="res://scripts/Item/ItemResource.gd" id="3_b8y03"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Resource" id="Resource_3dxl6"]
 | 
			
		||||
script = ExtResource("3_b8y03")
 | 
			
		||||
itemType = 3
 | 
			
		||||
quantity = 1
 | 
			
		||||
metadata/_custom_type_script = "uid://c26aptwsjs044"
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Resource" id="Resource_b8y03"]
 | 
			
		||||
script = ExtResource("3_b8y03")
 | 
			
		||||
itemType = 4
 | 
			
		||||
quantity = 1
 | 
			
		||||
metadata/_custom_type_script = "uid://c26aptwsjs044"
 | 
			
		||||
 | 
			
		||||
[node name="RecipeSystem" type="Node"]
 | 
			
		||||
script = ExtResource("1_o4nv4")
 | 
			
		||||
 | 
			
		||||
[node name="Baked Sweet Potato" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("2_f5akq")
 | 
			
		||||
title = "recipe.baked_sweet_potato.title"
 | 
			
		||||
ingredients = Array[ExtResource("3_b8y03")]([SubResource("Resource_3dxl6")])
 | 
			
		||||
outputs = Array[ExtResource("3_b8y03")]([SubResource("Resource_b8y03")])
 | 
			
		||||
metadata/_custom_type_script = "uid://dipvg4uwjv6p2"
 | 
			
		||||
@@ -1,45 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=7 format=3 uid="uid://b5bwpsh0gcicf"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://kvdgrmutu6hl" path="res://scripts/Singleton/UISystem.gd" id="1_g3au4"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://verg13jtqwvh" path="res://scenes/UI/DebugMenu.tscn" id="2_is0g4"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://bfioi52hjn2kf" path="res://scenes/UI/QuestMenu.tscn" id="2_mpokx"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://bkx3l0kckf4a8" path="res://scenes/UI/VNTextbox.tscn" id="3_btpxp"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://dl8iqhrpsplmk" path="res://scenes/UI/Inventory/FullInventoryMenu.tscn" id="5_6dyff"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://b6s1xdcfcp0xx" path="res://scenes/UI/EventFlagMenu.tscn" id="5_12prj"]
 | 
			
		||||
 | 
			
		||||
[node name="UI" type="Control"]
 | 
			
		||||
layout_mode = 3
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
mouse_filter = 2
 | 
			
		||||
script = ExtResource("1_g3au4")
 | 
			
		||||
 | 
			
		||||
[node name="QuestMenu" parent="." instance=ExtResource("2_mpokx")]
 | 
			
		||||
visible = false
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
 | 
			
		||||
[node name="FullInventory" parent="." instance=ExtResource("5_6dyff")]
 | 
			
		||||
visible = false
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
anchors_preset = 0
 | 
			
		||||
 | 
			
		||||
[node name="EventFlagMenu" parent="." instance=ExtResource("5_12prj")]
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
 | 
			
		||||
[node name="VNTextbox" parent="." instance=ExtResource("3_btpxp")]
 | 
			
		||||
visible = false
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
 | 
			
		||||
[node name="DebugMenu" parent="." instance=ExtResource("2_is0g4")]
 | 
			
		||||
visible = false
 | 
			
		||||
layout_mode = 0
 | 
			
		||||
anchors_preset = 0
 | 
			
		||||
anchor_right = 0.0
 | 
			
		||||
anchor_bottom = 0.0
 | 
			
		||||
offset_right = 207.0
 | 
			
		||||
offset_bottom = 206.0
 | 
			
		||||
grow_horizontal = 1
 | 
			
		||||
grow_vertical = 1
 | 
			
		||||
@@ -1,8 +0,0 @@
 | 
			
		||||
# Material for Barrel
 | 
			
		||||
newmtl BarrelTexture
 | 
			
		||||
Ka 1.000 1.000 1.000
 | 
			
		||||
Kd 1.000 1.000 1.000
 | 
			
		||||
Ks 0.000 0.000 0.000
 | 
			
		||||
d 1.0
 | 
			
		||||
illum 1
 | 
			
		||||
map_Kd barrel.png
 | 
			
		||||
							
								
								
									
										71
									
								
								scenes/TestScene.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								scenes/TestScene.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,71 @@
 | 
			
		||||
[gd_scene load_steps=11 format=3 uid="uid://b16ysbx7ah03u"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://d3rtd0ln7l2gr" path="res://scenes/maps/tundra/MapTundra.tscn" id="1_2gju5"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://2ch34sio36nv" path="res://scenes/entities/Player.tscn" id="2_rlkm5"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://csb0i132lcu0w" path="res://scripts/entities/MapCamera.gd" id="3_n77mx"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://bng2mc7fu5aik" path="res://scenes/entities/NPC.tscn" id="4_nb1wl"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://chxpes3546yoj" path="res://scripts/cutscene/Cutscene.gd" id="5_m5dm6"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_n77mx"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Sky" id="Sky_nb1wl"]
 | 
			
		||||
sky_material = SubResource("ProceduralSkyMaterial_n77mx")
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Environment" id="Environment_m5dm6"]
 | 
			
		||||
background_mode = 2
 | 
			
		||||
sky = SubResource("Sky_nb1wl")
 | 
			
		||||
ambient_light_source = 3
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Curve3D" id="Curve3D_n77mx"]
 | 
			
		||||
_data = {
 | 
			
		||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -11.0524, 3.4238, 4.18537, -19.268, 11.502, 10.843, 2.59274, -0.402428, -8.58782, 16.504, 3.012, 2.882),
 | 
			
		||||
"tilts": PackedFloat32Array(0, 0)
 | 
			
		||||
}
 | 
			
		||||
point_count = 2
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Curve3D" id="Curve3D_nb1wl"]
 | 
			
		||||
_data = {
 | 
			
		||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -12.26, 1.86, -3.89, 0, 0, 0, 0, 0, 0, 19.103, 1.11, -3.531),
 | 
			
		||||
"tilts": PackedFloat32Array(0, 0)
 | 
			
		||||
}
 | 
			
		||||
point_count = 2
 | 
			
		||||
 | 
			
		||||
[node name="TestScene" type="Node3D"]
 | 
			
		||||
 | 
			
		||||
[node name="MapTundra" parent="." instance=ExtResource("1_2gju5")]
 | 
			
		||||
 | 
			
		||||
[node name="Player" parent="." instance=ExtResource("2_rlkm5")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.06402, 1.54702, -2.35884)
 | 
			
		||||
 | 
			
		||||
[node name="NPC" parent="." instance=ExtResource("4_nb1wl")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.20455, 1.94676, -3.51349)
 | 
			
		||||
interactType = 1
 | 
			
		||||
interactTexts = Array[String](["Hello interact 1", "test interact 2"])
 | 
			
		||||
 | 
			
		||||
[node name="Camera3D" type="Camera3D" parent="." node_paths=PackedStringArray("targetFollow", "pathFollow", "pathMap")]
 | 
			
		||||
transform = Transform3D(0.996991, 0.0418507, -0.0652558, 0, 0.841762, 0.539849, 0.0775229, -0.538225, 0.839228, 1.25757, 8.21861, 8.01254)
 | 
			
		||||
fov = 57.5
 | 
			
		||||
script = ExtResource("3_n77mx")
 | 
			
		||||
targetFollow = NodePath("../Player")
 | 
			
		||||
pathFollow = NodePath("../PathCamera/PathFollow3D")
 | 
			
		||||
pathMap = NodePath("../PathWorld")
 | 
			
		||||
metadata/_custom_type_script = "uid://csb0i132lcu0w"
 | 
			
		||||
 | 
			
		||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
 | 
			
		||||
environment = SubResource("Environment_m5dm6")
 | 
			
		||||
 | 
			
		||||
[node name="PathCamera" type="Path3D" parent="."]
 | 
			
		||||
curve = SubResource("Curve3D_n77mx")
 | 
			
		||||
 | 
			
		||||
[node name="PathFollow3D" type="PathFollow3D" parent="PathCamera"]
 | 
			
		||||
transform = Transform3D(0.0672435, 0.0374997, -0.996973, -0.000525827, 0.999215, 0.0375501, 0.99767, -0.00200086, 0.0672163, 1.25757, 8.21861, 8.01254)
 | 
			
		||||
progress = 14.4593
 | 
			
		||||
loop = false
 | 
			
		||||
 | 
			
		||||
[node name="PathWorld" type="Path3D" parent="."]
 | 
			
		||||
curve = SubResource("Curve3D_nb1wl")
 | 
			
		||||
 | 
			
		||||
[node name="Cutscenes" type="Node" parent="."]
 | 
			
		||||
 | 
			
		||||
[node name="TestCutscene" type="Node" parent="Cutscenes"]
 | 
			
		||||
script = ExtResource("5_m5dm6")
 | 
			
		||||
@@ -1,64 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=2 format=3 uid="uid://verg13jtqwvh"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://bn2kdjf586e5p" path="res://scripts/UI/DebugMenu.gd" id="1_pcsq6"]
 | 
			
		||||
 | 
			
		||||
[node name="DebugMenu" type="VBoxContainer"]
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
script = ExtResource("1_pcsq6")
 | 
			
		||||
 | 
			
		||||
[node name="MainMenu" type="Button" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "ui.debug_menu.main_menu"
 | 
			
		||||
 | 
			
		||||
[node name="OverworldOption" type="HBoxContainer" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_vertical = 0
 | 
			
		||||
 | 
			
		||||
[node name="Overworld" type="Button" parent="OverworldOption"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "ui.debug_menu.overworld"
 | 
			
		||||
 | 
			
		||||
[node name="MapDropdown" type="OptionButton" parent="OverworldOption"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
 | 
			
		||||
[node name="Quest" type="Button" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "ui.debug_menu.quest"
 | 
			
		||||
 | 
			
		||||
[node name="Inventory" type="Button" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "ui.debug_menu.inventory"
 | 
			
		||||
 | 
			
		||||
[node name="Event" type="Button" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "ui.debug_menu.event"
 | 
			
		||||
 | 
			
		||||
[node name="Cutscene" type="Button" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "ui.debug_menu.cutscene"
 | 
			
		||||
 | 
			
		||||
[node name="Cooking" type="Button" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "ui.debug_menu.cooking"
 | 
			
		||||
 | 
			
		||||
[node name="Battle" type="Button" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
disabled = true
 | 
			
		||||
text = "ui.debug_menu.battle"
 | 
			
		||||
 | 
			
		||||
[node name="LanguageOption" type="HBoxContainer" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_vertical = 0
 | 
			
		||||
 | 
			
		||||
[node name="LangDropdown" type="OptionButton" parent="LanguageOption"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
 | 
			
		||||
[node name="RegDropdown" type="OptionButton" parent="LanguageOption"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
@@ -1,89 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=2 format=3 uid="uid://b6s1xdcfcp0xx"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://b4a3ne2vn36mt" path="res://scripts/UI/EventFlagMenu.gd" id="1_nnw5f"]
 | 
			
		||||
 | 
			
		||||
[node name="EventFlagsMenu" type="Panel" node_paths=PackedStringArray("flagList", "grid", "btnClose")]
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
size_flags_vertical = 3
 | 
			
		||||
script = ExtResource("1_nnw5f")
 | 
			
		||||
flagList = NodePath("HBoxContainer/FlagList")
 | 
			
		||||
grid = NodePath("HBoxContainer/VBoxContainer/Control")
 | 
			
		||||
btnClose = NodePath("HBoxContainer/VBoxContainer/HBoxContainer/Button")
 | 
			
		||||
metadata/_custom_type_script = "uid://b4a3ne2vn36mt"
 | 
			
		||||
 | 
			
		||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
 | 
			
		||||
[node name="FlagList" type="ItemList" parent="HBoxContainer"]
 | 
			
		||||
clip_contents = false
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 0
 | 
			
		||||
size_flags_vertical = 3
 | 
			
		||||
auto_width = true
 | 
			
		||||
item_count = 2
 | 
			
		||||
item_0/text = "Item 0"
 | 
			
		||||
item_1/text = "Item 1"
 | 
			
		||||
 | 
			
		||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
 | 
			
		||||
clip_contents = true
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
 | 
			
		||||
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
alignment = 2
 | 
			
		||||
 | 
			
		||||
[node name="Button" type="Button" parent="HBoxContainer/VBoxContainer/HBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "close"
 | 
			
		||||
 | 
			
		||||
[node name="Control" type="GridContainer" parent="HBoxContainer/VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
columns = 5
 | 
			
		||||
 | 
			
		||||
[node name="Flag0" type="CheckBox" parent="HBoxContainer/VBoxContainer/Control"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Flag 0"
 | 
			
		||||
 | 
			
		||||
[node name="Flag1" type="CheckBox" parent="HBoxContainer/VBoxContainer/Control"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Flag 0"
 | 
			
		||||
 | 
			
		||||
[node name="Flag2" type="CheckBox" parent="HBoxContainer/VBoxContainer/Control"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Flag 0"
 | 
			
		||||
 | 
			
		||||
[node name="Flag3" type="CheckBox" parent="HBoxContainer/VBoxContainer/Control"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Flag 0"
 | 
			
		||||
 | 
			
		||||
[node name="Flag4" type="CheckBox" parent="HBoxContainer/VBoxContainer/Control"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Flag 0"
 | 
			
		||||
 | 
			
		||||
[node name="Flag5" type="CheckBox" parent="HBoxContainer/VBoxContainer/Control"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Flag 0"
 | 
			
		||||
 | 
			
		||||
[node name="Flag6" type="CheckBox" parent="HBoxContainer/VBoxContainer/Control"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Flag 0"
 | 
			
		||||
 | 
			
		||||
[node name="Flag7" type="CheckBox" parent="HBoxContainer/VBoxContainer/Control"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Flag 0"
 | 
			
		||||
 | 
			
		||||
[node name="Flag8" type="CheckBox" parent="HBoxContainer/VBoxContainer/Control"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Flag 0"
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=3 format=3 uid="uid://dl8iqhrpsplmk"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://cla3ph1j2ligp" path="res://scripts/UI/Inventory/FullInventoryMenu.gd" id="1_m5r8e"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://dmu8i175kp35q" path="res://scenes/UI/Inventory/ItemLine.tscn" id="1_mmy80"]
 | 
			
		||||
 | 
			
		||||
[node name="FullInventory" type="Panel" node_paths=PackedStringArray("itemList")]
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
script = ExtResource("1_m5r8e")
 | 
			
		||||
itemLine = ExtResource("1_mmy80")
 | 
			
		||||
itemList = NodePath("VBoxContainer/ScrollContainer/ItemList")
 | 
			
		||||
metadata/_custom_type_script = "uid://cla3ph1j2ligp"
 | 
			
		||||
 | 
			
		||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
 | 
			
		||||
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_vertical = 3
 | 
			
		||||
 | 
			
		||||
[node name="ItemList" type="VBoxContainer" parent="VBoxContainer/ScrollContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
size_flags_vertical = 3
 | 
			
		||||
 | 
			
		||||
[node name="ItemLine" parent="VBoxContainer/ScrollContainer/ItemList" instance=ExtResource("1_mmy80")]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
 | 
			
		||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
 | 
			
		||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Add Item"
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=2 format=3 uid="uid://dmu8i175kp35q"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://dgblia2ukssbe" path="res://scripts/UI/Inventory/ItemLine.gd" id="1_mcq7n"]
 | 
			
		||||
 | 
			
		||||
[node name="ItemLine" type="HBoxContainer"]
 | 
			
		||||
anchors_preset = 10
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
offset_bottom = 12.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
script = ExtResource("1_mcq7n")
 | 
			
		||||
metadata/_custom_type_script = "uid://dgblia2ukssbe"
 | 
			
		||||
 | 
			
		||||
[node name="ItemName" type="Label" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
text = "Potion"
 | 
			
		||||
 | 
			
		||||
[node name="ItemQuantity" type="Label" parent="."]
 | 
			
		||||
custom_minimum_size = Vector2(24, 0)
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "255"
 | 
			
		||||
horizontal_alignment = 2
 | 
			
		||||
@@ -1,84 +0,0 @@
 | 
			
		||||
[gd_scene load_steps=2 format=3 uid="uid://bfioi52hjn2kf"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://cbsrw36kkucje" path="res://scripts/UI/QuestMenu.gd" id="1_a7vj2"]
 | 
			
		||||
 | 
			
		||||
[node name="QuestMenu" type="Panel" node_paths=PackedStringArray("questList", "questName", "closeButton", "questObjectiveList", "questObjectiveInfo")]
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
script = ExtResource("1_a7vj2")
 | 
			
		||||
questList = NodePath("VBoxContainer/HBoxContainer/QuestList")
 | 
			
		||||
questName = NodePath("VBoxContainer/HBoxContainer/Control/VBoxContainer/QuestName")
 | 
			
		||||
closeButton = NodePath("VBoxContainer/HBoxContainer2/Close")
 | 
			
		||||
questObjectiveList = NodePath("VBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/QuestObjectiveList")
 | 
			
		||||
questObjectiveInfo = NodePath("VBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/QuestObjectiveInfo")
 | 
			
		||||
metadata/_custom_type_script = "uid://cbsrw36kkucje"
 | 
			
		||||
 | 
			
		||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
 | 
			
		||||
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
 | 
			
		||||
[node name="Quests" type="Label" parent="VBoxContainer/HBoxContainer2"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
text = "Quests"
 | 
			
		||||
 | 
			
		||||
[node name="Close" type="Button" parent="VBoxContainer/HBoxContainer2"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Close"
 | 
			
		||||
 | 
			
		||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_vertical = 3
 | 
			
		||||
 | 
			
		||||
[node name="QuestList" type="ItemList" parent="VBoxContainer/HBoxContainer"]
 | 
			
		||||
custom_minimum_size = Vector2(100, 0)
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 0
 | 
			
		||||
size_flags_vertical = 3
 | 
			
		||||
item_count = 2
 | 
			
		||||
item_0/text = "Quest Name 1"
 | 
			
		||||
item_1/text = "Quest Name 2"
 | 
			
		||||
 | 
			
		||||
[node name="Control" type="Control" parent="VBoxContainer/HBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
 | 
			
		||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer/Control"]
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
 | 
			
		||||
[node name="QuestName" type="Label" parent="VBoxContainer/HBoxContainer/Control/VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "QuestName"
 | 
			
		||||
 | 
			
		||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer/Control/VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_vertical = 3
 | 
			
		||||
 | 
			
		||||
[node name="QuestObjectiveList" type="ItemList" parent="VBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
 | 
			
		||||
custom_minimum_size = Vector2(110, 0)
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
item_count = 2
 | 
			
		||||
item_0/text = "Quest Objective 1"
 | 
			
		||||
item_1/text = "Quest Objective 2"
 | 
			
		||||
 | 
			
		||||
[node name="QuestObjectiveInfo" type="Label" parent="VBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
size_flags_vertical = 1
 | 
			
		||||
text = "Quest Objective Information"
 | 
			
		||||
autowrap_mode = 2
 | 
			
		||||
							
								
								
									
										9
									
								
								scenes/cutscenes/CutsceneTest.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								scenes/cutscenes/CutsceneTest.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
[gd_scene load_steps=2 format=3 uid="uid://bhvoo48bpbkf3"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://d3rtd0ln7l2gr" path="res://scenes/maps/tundra/MapTundra.tscn" id="1_fsb0j"]
 | 
			
		||||
 | 
			
		||||
[node name="CutsceneTest" type="Node3D"]
 | 
			
		||||
 | 
			
		||||
[node name="MapTundra" parent="." instance=ExtResource("1_fsb0j")]
 | 
			
		||||
 | 
			
		||||
[node name="Camera3D" type="Camera3D" parent="."]
 | 
			
		||||
							
								
								
									
										44
									
								
								scenes/entities/NPC.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								scenes/entities/NPC.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
[gd_scene load_steps=9 format=3 uid="uid://bng2mc7fu5aik"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://jbarxyoib5a7" path="res://scripts/entities/NPC.gd" id="1_nnu5p"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://b00rxpveu3v4m" path="res://scripts/InteractableArea.gd" id="2_mm6je"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_2m2ha"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_g13of"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nnu5p"]
 | 
			
		||||
albedo_color = Color(0.389287, 0.389287, 0.389287, 1)
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxMesh" id="BoxMesh_g13of"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_g13of"]
 | 
			
		||||
albedo_color = Color(0.596173, 0.00177814, 0.790136, 1)
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape3D" id="BoxShape3D_mm6je"]
 | 
			
		||||
size = Vector3(0.958008, 0.97168, 0.767578)
 | 
			
		||||
 | 
			
		||||
[node name="NPC" type="CharacterBody3D"]
 | 
			
		||||
script = ExtResource("1_nnu5p")
 | 
			
		||||
metadata/_custom_type_script = "uid://jbarxyoib5a7"
 | 
			
		||||
 | 
			
		||||
[node name="Scripts" type="Node" parent="."]
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
shape = SubResource("CapsuleShape3D_2m2ha")
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
 | 
			
		||||
mesh = SubResource("CapsuleMesh_g13of")
 | 
			
		||||
surface_material_override/0 = SubResource("StandardMaterial3D_nnu5p")
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
 | 
			
		||||
transform = Transform3D(0.598863, 0, 0, 0, 0.598863, 0, 0, 0, 0.598863, 0, 0.441532, 0.539694)
 | 
			
		||||
mesh = SubResource("BoxMesh_g13of")
 | 
			
		||||
surface_material_override/0 = SubResource("StandardMaterial3D_g13of")
 | 
			
		||||
 | 
			
		||||
[node name="InteractableArea" type="Area3D" parent="."]
 | 
			
		||||
script = ExtResource("2_mm6je")
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractableArea"]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0152938, 0.00782323, 0.0022831)
 | 
			
		||||
shape = SubResource("BoxShape3D_mm6je")
 | 
			
		||||
							
								
								
									
										49
									
								
								scenes/entities/Player.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								scenes/entities/Player.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
[gd_scene load_steps=9 format=3 uid="uid://2ch34sio36nv"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://ylmy3nvpirgr" path="res://scripts/entities/player/Player.gd" id="1_24gqh"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://bwxdv3kxrs4oj" path="res://scripts/entities/player/PlayerMovement.gd" id="2_o7et6"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://b3nty7pvbo58d" path="res://scripts/entities/player/PlayerInteraction.gd" id="3_24gqh"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_2m2ha"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_g13of"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxMesh" id="BoxMesh_g13of"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_g13of"]
 | 
			
		||||
albedo_color = Color(0.0156863, 0.282353, 1, 1)
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape3D" id="BoxShape3D_g13of"]
 | 
			
		||||
size = Vector3(0.705444, 0.680542, 1.17688)
 | 
			
		||||
 | 
			
		||||
[node name="Player" type="CharacterBody3D"]
 | 
			
		||||
script = ExtResource("1_24gqh")
 | 
			
		||||
metadata/_custom_type_script = "uid://c0by5m1upv57h"
 | 
			
		||||
 | 
			
		||||
[node name="Scripts" type="Node" parent="."]
 | 
			
		||||
 | 
			
		||||
[node name="PlayerMovement" type="Node" parent="Scripts" node_paths=PackedStringArray("player")]
 | 
			
		||||
script = ExtResource("2_o7et6")
 | 
			
		||||
player = NodePath("../..")
 | 
			
		||||
 | 
			
		||||
[node name="PlayerInteraction" type="Node" parent="Scripts" node_paths=PackedStringArray("interactableArea")]
 | 
			
		||||
script = ExtResource("3_24gqh")
 | 
			
		||||
interactableArea = NodePath("../../InteractableArea")
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
shape = SubResource("CapsuleShape3D_2m2ha")
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
 | 
			
		||||
mesh = SubResource("CapsuleMesh_g13of")
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
 | 
			
		||||
transform = Transform3D(0.598863, 0, 0, 0, 0.598863, 0, 0, 0, 0.598863, 0, 0.441532, 0.539694)
 | 
			
		||||
mesh = SubResource("BoxMesh_g13of")
 | 
			
		||||
surface_material_override/0 = SubResource("StandardMaterial3D_g13of")
 | 
			
		||||
 | 
			
		||||
[node name="InteractableArea" type="Area3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.185831, 0.817421)
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractableArea"]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0123757, 0.0497631, 0.0865124)
 | 
			
		||||
shape = SubResource("BoxShape3D_g13of")
 | 
			
		||||
							
								
								
									
										26
									
								
								scenes/maps/tundra/MapTundra.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								scenes/maps/tundra/MapTundra.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
[gd_scene load_steps=5 format=3 uid="uid://d3rtd0ln7l2gr"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Texture2D" uid="uid://cu1hvpqmqn31n" path="res://icon.svg" id="1_gnws2"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ee568"]
 | 
			
		||||
size = Vector3(100, 0.1, 100)
 | 
			
		||||
 | 
			
		||||
[sub_resource type="PlaneMesh" id="PlaneMesh_gnws2"]
 | 
			
		||||
size = Vector2(100, 100)
 | 
			
		||||
 | 
			
		||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2wcmd"]
 | 
			
		||||
albedo_texture = ExtResource("1_gnws2")
 | 
			
		||||
 | 
			
		||||
[node name="MapTundra" type="Node3D"]
 | 
			
		||||
 | 
			
		||||
[node name="Ground" type="Node3D" parent="."]
 | 
			
		||||
 | 
			
		||||
[node name="RigidBody3D" type="StaticBody3D" parent="Ground"]
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground/RigidBody3D"]
 | 
			
		||||
shape = SubResource("BoxShape3D_ee568")
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ground"]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.037714, 0, -0.0143986)
 | 
			
		||||
mesh = SubResource("PlaneMesh_gnws2")
 | 
			
		||||
surface_material_override/0 = SubResource("StandardMaterial3D_2wcmd")
 | 
			
		||||
							
								
								
									
										17
									
								
								scenes/singletons/UI.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								scenes/singletons/UI.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
[gd_scene load_steps=3 format=3 uid="uid://baos0arpiskbp"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://bkx3l0kckf4a8" path="res://scenes/ui/VNTextbox.tscn" id="1_1mtk3"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dq3qyyayugt5l" path="res://scripts/singletons/UI.gd" id="1_son71"]
 | 
			
		||||
 | 
			
		||||
[node name="UI" type="Control" node_paths=PackedStringArray("TEXTBOX")]
 | 
			
		||||
layout_mode = 3
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
script = ExtResource("1_son71")
 | 
			
		||||
TEXTBOX = NodePath("VNTextbox")
 | 
			
		||||
 | 
			
		||||
[node name="VNTextbox" parent="." instance=ExtResource("1_1mtk3")]
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
[gd_scene load_steps=4 format=3 uid="uid://bkx3l0kckf4a8"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Theme" uid="uid://dm7ee4aqjr2dl" path="res://ui/UI Theme.tres" id="1_wx4lp"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://ck62jug2gl4wk" path="res://scripts/UI/VNTextbox.gd" id="2_uo1gm"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://cq6bvma0kk6tg" path="res://scripts/UI/AdvancedRichText.gd" id="3_j0315"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://h8lw23ypcfty" path="res://scripts/ui/VNTextbox.gd" id="2_uo1gm"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://bjj6upgk1uvxd" path="res://scripts/ui/AdvancedRichText.gd" id="3_m60k3"]
 | 
			
		||||
 | 
			
		||||
[node name="VNTextbox" type="PanelContainer"]
 | 
			
		||||
anchors_preset = 12
 | 
			
		||||
@@ -27,13 +27,12 @@ theme_override_constants/margin_bottom = 4
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
theme = ExtResource("1_wx4lp")
 | 
			
		||||
bbcode_enabled = true
 | 
			
		||||
text = "Text
 | 
			
		||||
Text
 | 
			
		||||
Text
 | 
			
		||||
Text"
 | 
			
		||||
script = ExtResource("3_j0315")
 | 
			
		||||
advancedText = "Text
 | 
			
		||||
Text
 | 
			
		||||
Text
 | 
			
		||||
Text"
 | 
			
		||||
metadata/_custom_type_script = "uid://cq6bvma0kk6tg"
 | 
			
		||||
text = "TEST
 | 
			
		||||
TEST
 | 
			
		||||
TEST
 | 
			
		||||
TEST"
 | 
			
		||||
script = ExtResource("3_m60k3")
 | 
			
		||||
advancedText = "TEST
 | 
			
		||||
TEST
 | 
			
		||||
TEST
 | 
			
		||||
TEST"
 | 
			
		||||
@@ -1,39 +0,0 @@
 | 
			
		||||
class_name Recipe extends Node
 | 
			
		||||
 | 
			
		||||
enum Type {
 | 
			
		||||
	BAKED_SWEET_POTATO,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@export_multiline var title:String = ""
 | 
			
		||||
@export var type:Type = Type.BAKED_SWEET_POTATO
 | 
			
		||||
@export var ingredients:Array[ItemResource] = []
 | 
			
		||||
@export var outputs:Array[ItemResource] = []
 | 
			
		||||
 | 
			
		||||
var learned:bool = false
 | 
			
		||||
var timesMade:int = 0
 | 
			
		||||
 | 
			
		||||
func hasIngredients(inventory:Inventory = null) -> bool:
 | 
			
		||||
	if inventory == null:
 | 
			
		||||
		inventory = ITEM.PLAYER_INVENTORY
 | 
			
		||||
	
 | 
			
		||||
	for ingredient in ingredients:
 | 
			
		||||
		if !inventory.hasItem(ingredient.type, ingredient.quantity):
 | 
			
		||||
			return false
 | 
			
		||||
	return true
 | 
			
		||||
 | 
			
		||||
func make(inventory:Inventory = null) -> void:
 | 
			
		||||
	if inventory == null:
 | 
			
		||||
		inventory = ITEM.PLAYER_INVENTORY
 | 
			
		||||
	
 | 
			
		||||
	for ingredient in ingredients:
 | 
			
		||||
		inventory.removeItem(ingredient.type, ingredient.quantity)
 | 
			
		||||
 | 
			
		||||
	for output in outputs:
 | 
			
		||||
		inventory.addItem(output.type, output.quantity)
 | 
			
		||||
 | 
			
		||||
	timesMade += 1
 | 
			
		||||
 | 
			
		||||
func getTransContext() -> TransContext:
 | 
			
		||||
	var ctx = TransContext.new()
 | 
			
		||||
	ctx.addTrans("title", title)
 | 
			
		||||
	return ctx
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://dipvg4uwjv6p2
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://cy01crjsvohfc
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
class_name BasicNPCEntity extends CharacterBody3D
 | 
			
		||||
 | 
			
		||||
@export var interactEvent:Event = null
 | 
			
		||||
 | 
			
		||||
func _ready() -> void:
 | 
			
		||||
	$Entity/EntityInteractable.onInteract.connect(
 | 
			
		||||
		self.onEntityInteract
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
func _exit_tree() -> void:
 | 
			
		||||
	$Entity/EntityInteractable.onInteract.disconnect(
 | 
			
		||||
		self.onEntityInteract
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
func onEntityInteract(
 | 
			
		||||
	interactor:EntityInteractor,
 | 
			
		||||
	interactee:EntityInteractable
 | 
			
		||||
) -> void:
 | 
			
		||||
	if interactEvent == null || (interactEvent.started && !interactEvent.isDone()):
 | 
			
		||||
		return
 | 
			
		||||
	
 | 
			
		||||
	interactEvent.onEntityInteract(interactor, $Entity/EntityInteractable)
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://d23qg1ovkbxst
 | 
			
		||||
@@ -1,83 +0,0 @@
 | 
			
		||||
@tool
 | 
			
		||||
class_name EntityDirection extends Node
 | 
			
		||||
 | 
			
		||||
enum Direction {
 | 
			
		||||
	SOUTH,
 | 
			
		||||
	WEST,
 | 
			
		||||
	NORTH,
 | 
			
		||||
	EAST,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@export var meshInstance:MeshInstance3D = null:
 | 
			
		||||
	set(newInstance):
 | 
			
		||||
		meshInstance = newInstance;
 | 
			
		||||
		_updateMaterial();
 | 
			
		||||
 | 
			
		||||
@export var direction = Direction.SOUTH: 
 | 
			
		||||
	set(newDirection):
 | 
			
		||||
		direction = newDirection;
 | 
			
		||||
		_updateMaterial();
 | 
			
		||||
 | 
			
		||||
@export var characterBody:CharacterBody3D = null
 | 
			
		||||
 | 
			
		||||
func _ready() -> void:
 | 
			
		||||
	_updateMaterial();
 | 
			
		||||
 | 
			
		||||
func _updateMaterial() -> void:
 | 
			
		||||
	if !meshInstance:
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	for i in range(meshInstance.get_surface_override_material_count()):
 | 
			
		||||
		var material:ShaderMaterial = meshInstance.get_surface_override_material(i)
 | 
			
		||||
		if !material:
 | 
			
		||||
			continue
 | 
			
		||||
		material.set_shader_parameter("direction", direction)
 | 
			
		||||
	
 | 
			
		||||
func getDirectionVector() -> Vector3:
 | 
			
		||||
	match direction:
 | 
			
		||||
		Direction.NORTH:
 | 
			
		||||
			return Vector3(0, 0, -1);
 | 
			
		||||
		Direction.SOUTH:
 | 
			
		||||
			return Vector3(0, 0, 1);
 | 
			
		||||
		Direction.WEST:
 | 
			
		||||
			return Vector3(-1, 0, 0);
 | 
			
		||||
		Direction.EAST:
 | 
			
		||||
			return Vector3(1, 0, 0);
 | 
			
		||||
		_:
 | 
			
		||||
			assert(false, "Invalid direction");
 | 
			
		||||
	return Vector3(0, 0, 0);
 | 
			
		||||
 | 
			
		||||
func updateDirectionFromMovement(movement:Vector2) -> void:
 | 
			
		||||
	if movement.x >= abs(movement.y) and(
 | 
			
		||||
		movement.y == 0 or
 | 
			
		||||
		(movement.y > 0 and direction != Direction.SOUTH) or
 | 
			
		||||
		(movement.y < 0 and direction != Direction.NORTH)
 | 
			
		||||
	):
 | 
			
		||||
		direction = Direction.EAST;
 | 
			
		||||
	elif (movement.x <= -abs(movement.y) and (
 | 
			
		||||
		movement.y == 0 or
 | 
			
		||||
		(movement.y > 0 and direction != Direction.SOUTH) or
 | 
			
		||||
		(movement.y < 0 and direction != Direction.NORTH)
 | 
			
		||||
	)):
 | 
			
		||||
		direction = Direction.WEST;
 | 
			
		||||
	elif (movement.y > 0):
 | 
			
		||||
		direction = Direction.SOUTH;
 | 
			
		||||
	elif (movement.y < 0):
 | 
			
		||||
		direction = Direction.NORTH;
 | 
			
		||||
 | 
			
		||||
func getDirectionToFace(position:Vector3) -> Direction:
 | 
			
		||||
	if !characterBody:
 | 
			
		||||
		return Direction.SOUTH;
 | 
			
		||||
 | 
			
		||||
	var diff = position - characterBody.global_position;
 | 
			
		||||
	if abs(diff.x) > abs(diff.z):
 | 
			
		||||
		if diff.x > 0:
 | 
			
		||||
			return Direction.EAST;
 | 
			
		||||
		else:
 | 
			
		||||
			return Direction.WEST;
 | 
			
		||||
	else:
 | 
			
		||||
		if diff.z > 0:
 | 
			
		||||
			return Direction.SOUTH;
 | 
			
		||||
		else:
 | 
			
		||||
			return Direction.NORTH;
 | 
			
		||||
	return Direction.SOUTH;
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://cjfcpi7sxentf
 | 
			
		||||
@@ -1,10 +0,0 @@
 | 
			
		||||
class_name EntityInteractable extends Node
 | 
			
		||||
 | 
			
		||||
@export var entityDirection:EntityDirection = null
 | 
			
		||||
@export var entity:Entity = null
 | 
			
		||||
@export var characterBody:CharacterBody3D = null;
 | 
			
		||||
 | 
			
		||||
signal onInteract(interactor:EntityInteractor, interactable:EntityInteractable)
 | 
			
		||||
 | 
			
		||||
func interact(interactor:EntityInteractor) -> void:
 | 
			
		||||
	onInteract.emit(interactor, self)
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://03dqknw7v4mr
 | 
			
		||||
@@ -1,65 +0,0 @@
 | 
			
		||||
class_name EntityInteractor extends Node
 | 
			
		||||
 | 
			
		||||
enum InteractorType {
 | 
			
		||||
	PLAYER_INPUT,
 | 
			
		||||
	UNDECIDED
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@export var interactorType:InteractorType = InteractorType.UNDECIDED;
 | 
			
		||||
@export var entityDirection:EntityDirection = null;
 | 
			
		||||
@export var characterBody:CharacterBody3D = null;
 | 
			
		||||
@export var interactRange = 0.7;
 | 
			
		||||
@export var entity:Entity = null
 | 
			
		||||
@export_flags_3d_physics() var interactLayers = 2;
 | 
			
		||||
 | 
			
		||||
func interactWith(interactable:EntityInteractable) -> void:
 | 
			
		||||
	interactable.interact(self)
 | 
			
		||||
 | 
			
		||||
func getRaycastInteractable() -> EntityInteractable:
 | 
			
		||||
	if !entityDirection or !characterBody:
 | 
			
		||||
		return null
 | 
			
		||||
	
 | 
			
		||||
	var rayDirection = entityDirection.getDirectionVector()
 | 
			
		||||
	var query = PhysicsRayQueryParameters3D.create(
 | 
			
		||||
		characterBody.global_position,
 | 
			
		||||
		characterBody.global_position + (rayDirection * interactRange)
 | 
			
		||||
	)
 | 
			
		||||
	query.collide_with_bodies = true;
 | 
			
		||||
	query.collide_with_areas = true;
 | 
			
		||||
	query.collision_mask = interactLayers;
 | 
			
		||||
	query.exclude = [ characterBody ];
 | 
			
		||||
 | 
			
		||||
	var result = characterBody.get_world_3d().direct_space_state.intersect_ray(query)
 | 
			
		||||
	if !result or !result.collider:
 | 
			
		||||
		return null
 | 
			
		||||
 | 
			
		||||
	var coll:Node3D = result.collider;
 | 
			
		||||
	var interactable:EntityInteractable = coll.find_child("EntityInteractable")
 | 
			
		||||
	return interactable
 | 
			
		||||
 | 
			
		||||
func _process(delta: float) -> void:
 | 
			
		||||
	if !entity or entity.isPaused():
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	match interactorType:
 | 
			
		||||
		InteractorType.PLAYER_INPUT:
 | 
			
		||||
			_processPlayerInput()
 | 
			
		||||
		InteractorType.UNDECIDED:
 | 
			
		||||
			_processUndecided()
 | 
			
		||||
		_:
 | 
			
		||||
			assert(false, "Invalid interactor type")
 | 
			
		||||
 | 
			
		||||
func _processPlayerInput() -> void:
 | 
			
		||||
	if !Input.is_action_just_pressed("interact"):
 | 
			
		||||
		return
 | 
			
		||||
	
 | 
			
		||||
	# Conditions where player cannot interact.
 | 
			
		||||
	if UI.hasInteractionFocus():
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	var interactable:EntityInteractable = getRaycastInteractable()
 | 
			
		||||
	if interactable:
 | 
			
		||||
		self.interactWith(interactable)
 | 
			
		||||
 | 
			
		||||
func _processUndecided() -> void:
 | 
			
		||||
	pass
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://dfh2rh8idx267
 | 
			
		||||
@@ -1,77 +0,0 @@
 | 
			
		||||
class_name EntityMovement extends Node
 | 
			
		||||
 | 
			
		||||
enum MovementType {
 | 
			
		||||
	PLAYER_INPUT,
 | 
			
		||||
	STILL,
 | 
			
		||||
	NPC_RANDOM_LOOK
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@export var characterBody:CharacterBody3D = null;
 | 
			
		||||
@export var entity:Entity = null;
 | 
			
		||||
@export var entityDirection:EntityDirection = null;
 | 
			
		||||
 | 
			
		||||
@export var speed:float = 200;
 | 
			
		||||
@export var runSpeed:float = 400;
 | 
			
		||||
@export var friction:float = 8.5;
 | 
			
		||||
@export var gravity:float = 30;
 | 
			
		||||
 | 
			
		||||
@export var movementType:MovementType = MovementType.STILL;
 | 
			
		||||
 | 
			
		||||
@export var randomLookMinTime:float = 1.5;
 | 
			
		||||
@export var randomLookMaxTime:float = 4.0;
 | 
			
		||||
var randomLookTimer:float = 0.0;
 | 
			
		||||
 | 
			
		||||
func _physics_process(delta:float) -> void:
 | 
			
		||||
	if !entity || entity.isPaused() || !characterBody:
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	# Update movement
 | 
			
		||||
	_updateVelocity(delta)
 | 
			
		||||
 | 
			
		||||
	# Gravity and friction
 | 
			
		||||
	if !characterBody.is_on_floor():
 | 
			
		||||
		characterBody.velocity.y -= gravity * delta;
 | 
			
		||||
	else:
 | 
			
		||||
		characterBody.velocity += -(characterBody.velocity * friction * delta);
 | 
			
		||||
		# if velocity.length() != 0:
 | 
			
		||||
			# _updateTileData();
 | 
			
		||||
	
 | 
			
		||||
	# Update character controller.
 | 
			
		||||
	characterBody.move_and_slide();
 | 
			
		||||
 | 
			
		||||
func _updateVelocity(delta:float):
 | 
			
		||||
	match movementType:
 | 
			
		||||
		MovementType.PLAYER_INPUT:
 | 
			
		||||
			_updatePlayerInput(delta);
 | 
			
		||||
		MovementType.STILL:
 | 
			
		||||
			_updateStill(delta);
 | 
			
		||||
		MovementType.NPC_RANDOM_LOOK:
 | 
			
		||||
			_updateNPCRandomLook(delta);
 | 
			
		||||
 | 
			
		||||
func _updatePlayerInput(delta:float) -> void:
 | 
			
		||||
	var dir:Vector2 = Input.get_vector("left", "right", "up", "down");
 | 
			
		||||
 | 
			
		||||
	var moveSpeed:float;
 | 
			
		||||
	if Input.is_action_pressed("run"):
 | 
			
		||||
		moveSpeed = runSpeed;
 | 
			
		||||
	else:
 | 
			
		||||
		moveSpeed = speed;
 | 
			
		||||
		
 | 
			
		||||
	if dir.x != 0 or dir.y != 0:
 | 
			
		||||
		characterBody.velocity.x = dir.x * moveSpeed * delta;
 | 
			
		||||
		characterBody.velocity.z = dir.y * moveSpeed * delta;
 | 
			
		||||
 | 
			
		||||
		if entityDirection:
 | 
			
		||||
			entityDirection.updateDirectionFromMovement(dir);
 | 
			
		||||
 | 
			
		||||
func _updateStill(delta:float):
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func _updateNPCRandomLook(delta:float):
 | 
			
		||||
	if !entityDirection:
 | 
			
		||||
		return
 | 
			
		||||
	randomLookTimer -= delta;
 | 
			
		||||
 | 
			
		||||
	if randomLookTimer <= 0:
 | 
			
		||||
		randomLookTimer = randf_range(randomLookMinTime, randomLookMaxTime);
 | 
			
		||||
		entityDirection.direction = randi_range(0, 3);
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://c5nfs0m6ua4eb
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://dp6itsmbl0ucn
 | 
			
		||||
@@ -1,88 +0,0 @@
 | 
			
		||||
class_name Entity extends Node
 | 
			
		||||
 | 
			
		||||
# var meshInstance:MeshInstance3D;
 | 
			
		||||
# var underFootTile:int = -1;
 | 
			
		||||
# var underFootPosition:Vector3;
 | 
			
		||||
# var material:ShaderMaterial;
 | 
			
		||||
 | 
			
		||||
# func updateMaterial() -> bool:
 | 
			
		||||
# 	if !meshInstance:
 | 
			
		||||
# 		return false
 | 
			
		||||
# 	if !material:
 | 
			
		||||
# 		return false
 | 
			
		||||
# 	return true
 | 
			
		||||
 | 
			
		||||
# # Virtual Methods
 | 
			
		||||
# func updateMovement(delta) -> void:
 | 
			
		||||
# 	pass
 | 
			
		||||
	
 | 
			
		||||
# func updateOverworldLogic(delta) -> void:
 | 
			
		||||
# 	pass
 | 
			
		||||
 | 
			
		||||
func isPaused() -> bool:
 | 
			
		||||
	var ps = PAUSE.getPauseState();
 | 
			
		||||
	match ps:
 | 
			
		||||
		PauseSystem.PauseType.NOT_PAUSED:
 | 
			
		||||
			return false;
 | 
			
		||||
		PauseSystem.PauseType.FULLY_PAUSED:
 | 
			
		||||
			return true;
 | 
			
		||||
		PauseSystem.PauseType.ENTITY_PAUSED:
 | 
			
		||||
			if PAUSE.entities.find(self) != -1:
 | 
			
		||||
				return true;
 | 
			
		||||
			return false;
 | 
			
		||||
		PauseSystem.PauseType.CUTSCENE_PAUSED:
 | 
			
		||||
			if PAUSE.entities.find(self) != -1:
 | 
			
		||||
				return false;
 | 
			
		||||
			return true;
 | 
			
		||||
		_:
 | 
			
		||||
			assert(false, "Invalid pause state");
 | 
			
		||||
 | 
			
		||||
	return false;
 | 
			
		||||
 | 
			
		||||
# Private methods
 | 
			
		||||
# func _updateTileData() -> void:
 | 
			
		||||
# 	# ray cast down
 | 
			
		||||
# 	var offset = Vector3(0, 0, 0.426);
 | 
			
		||||
# 	var query = PhysicsRayQueryParameters3D.create(
 | 
			
		||||
# 		position + offset,
 | 
			
		||||
# 		position + Vector3(0, -1, 0) + offset
 | 
			
		||||
# 	)
 | 
			
		||||
# 	query.collide_with_areas = true
 | 
			
		||||
# 	query.exclude = [self]
 | 
			
		||||
 | 
			
		||||
# 	var result = get_world_3d().direct_space_state.intersect_ray(query)
 | 
			
		||||
# 	if !result or !result.collider:
 | 
			
		||||
# 		return;
 | 
			
		||||
 | 
			
		||||
# 	var collider = result.collider;
 | 
			
		||||
# 	var colliderMesh = collider.get_node("../");
 | 
			
		||||
# 	if !colliderMesh or !(colliderMesh is ArrayMesh) or !colliderMesh.mesh or colliderMesh.mesh.get_surface_count() == 0:
 | 
			
		||||
# 		return;
 | 
			
		||||
 | 
			
		||||
# 	# Get the face index (triangle)
 | 
			
		||||
# 	var arrays = colliderMesh.mesh.surface_get_arrays(0);
 | 
			
		||||
# 	var indiceIdx = result.face_index * 3;
 | 
			
		||||
	
 | 
			
		||||
# 	# Get each indice of the triangle
 | 
			
		||||
# 	var index0 = arrays[Mesh.ARRAY_INDEX][indiceIdx+0];
 | 
			
		||||
# 	var index1 = arrays[Mesh.ARRAY_INDEX][indiceIdx+1];
 | 
			
		||||
# 	var index2 = arrays[Mesh.ARRAY_INDEX][indiceIdx+2];
 | 
			
		||||
	
 | 
			
		||||
# 	# Get each uv of each indice
 | 
			
		||||
# 	var uv0:Vector2 = arrays[Mesh.ARRAY_TEX_UV][index0];
 | 
			
		||||
# 	var uv1:Vector2 = arrays[Mesh.ARRAY_TEX_UV][index1];
 | 
			
		||||
# 	var uv2:Vector2 = arrays[Mesh.ARRAY_TEX_UV][index2];
 | 
			
		||||
	
 | 
			
		||||
# 	# Determine the lowest texture coordinate
 | 
			
		||||
# 	var min = Vector2(min(uv0.x, uv1.x, uv2.x), min(uv0.y, uv1.y, uv2.y));
 | 
			
		||||
	
 | 
			
		||||
# 	# Convert to column/row
 | 
			
		||||
# 	var w = 256;
 | 
			
		||||
# 	var h = w;
 | 
			
		||||
# 	var tw = 48;
 | 
			
		||||
# 	var th = tw;
 | 
			
		||||
# 	var column = int(roundf(min.x * w)) / tw;
 | 
			
		||||
# 	var row = int(roundf(min.y * h)) / th;
 | 
			
		||||
# 	var columns = 768 / tw;
 | 
			
		||||
# 	underFootPosition = result.position;
 | 
			
		||||
# 	underFootTile = column % columns + row * columns;
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://dtjjqp2atjyhr
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
class_name ItemOnGround extends StaticBody3D
 | 
			
		||||
 | 
			
		||||
enum Type {
 | 
			
		||||
	SPAWNS_WITH_MAP,
 | 
			
		||||
	AQUIRED_ONCE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@export var itemType:Item.Type = Item.Type.POTION;
 | 
			
		||||
@export var quantity:int = 1;
 | 
			
		||||
 | 
			
		||||
func _ready() -> void:
 | 
			
		||||
	$Entity/EntityInteractable.onInteract.connect(
 | 
			
		||||
		self.onEntityInteract
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
func _exit_tree() -> void:
 | 
			
		||||
	$Entity/EntityInteractable.onInteract.disconnect(
 | 
			
		||||
		self.onEntityInteract
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
func onEntityInteract(
 | 
			
		||||
	interactor:EntityInteractor,
 | 
			
		||||
	interactee:EntityInteractable
 | 
			
		||||
) -> void:
 | 
			
		||||
	var event = EventGetItem.new()
 | 
			
		||||
	event.itemType = itemType;
 | 
			
		||||
	event.quantity = quantity;
 | 
			
		||||
	event.removeNode = self
 | 
			
		||||
	EVENT.addEvent(event)
 | 
			
		||||
	event.onEntityInteract(interactor, interactee)
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://d2jqsiapy07ii
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://bcei5b2x3gu8y
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://0nn3ix2nwk3f
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://bpwbaptqu4bm5
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
class_name Rosa extends CharacterBody3D
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://ixwikdguyhf0
 | 
			
		||||
@@ -1,29 +0,0 @@
 | 
			
		||||
extends Camera3D
 | 
			
		||||
 | 
			
		||||
@export var pixelScale:float = 1.0;
 | 
			
		||||
@export var follow:Node3D;
 | 
			
		||||
 | 
			
		||||
const WORLD_UNITS:float = 32.0;
 | 
			
		||||
 | 
			
		||||
func _ready() -> void:
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
func _process(delta: float) -> void:
 | 
			
		||||
	# I tried a few things but this is most consistent for both backbuffer and
 | 
			
		||||
	# framebuffer viewports.
 | 
			
		||||
	var viewportHeight = get_viewport().get_visible_rect().size.y;
 | 
			
		||||
	var unitScale = pixelScale * WORLD_UNITS;
 | 
			
		||||
 | 
			
		||||
	var z:float = (
 | 
			
		||||
		tan((deg_to_rad(180) - deg_to_rad(fov)) / 2.0) *
 | 
			
		||||
		(viewportHeight / 2.0)
 | 
			
		||||
	) / unitScale;
 | 
			
		||||
	
 | 
			
		||||
	var look = follow.global_position;
 | 
			
		||||
	var position = Vector3(0, 0, 2) + look;
 | 
			
		||||
 | 
			
		||||
	look_at_from_position(
 | 
			
		||||
		Vector3(position.x, position.y + z, position.z),
 | 
			
		||||
		look
 | 
			
		||||
	);
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://jd50n00bo05y
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
class_name Sign extends StaticBody3D
 | 
			
		||||
 | 
			
		||||
@export var interactEvent:Event = null
 | 
			
		||||
 | 
			
		||||
func _ready() -> void:
 | 
			
		||||
	$Entity/EntityInteractable.onInteract.connect(
 | 
			
		||||
		self.onEntityInteract
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
func _exit_tree() -> void:
 | 
			
		||||
	$Entity/EntityInteractable.onInteract.disconnect(
 | 
			
		||||
		self.onEntityInteract
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
func onEntityInteract(
 | 
			
		||||
	interactor:EntityInteractor,
 | 
			
		||||
	interactee:EntityInteractable
 | 
			
		||||
) -> void:
 | 
			
		||||
	if interactEvent == null || (interactEvent.started && !interactEvent.isDone()):
 | 
			
		||||
		return
 | 
			
		||||
	
 | 
			
		||||
	interactEvent.onEntityInteract(interactor, $Entity/EntityInteractable)
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://bitykguiignfu
 | 
			
		||||
@@ -1,34 +0,0 @@
 | 
			
		||||
class_name EventIf extends "res://scripts/Event/Flow/EventGroup.gd"
 | 
			
		||||
 | 
			
		||||
signal eventConditionMet
 | 
			
		||||
 | 
			
		||||
func ifCondition() -> bool:
 | 
			
		||||
	return false
 | 
			
		||||
 | 
			
		||||
func subscribeEvents() -> void:
 | 
			
		||||
	# Override this method to subscribe to any events needed for the condition check
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func unsubscribeEvents() -> void:
 | 
			
		||||
	# Override this method to unsubscribe from any events when the condition is no longer needed
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func shouldAutoStart() -> bool:
 | 
			
		||||
	return false
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	super.start()
 | 
			
		||||
	
 | 
			
		||||
	if ifCondition():
 | 
			
		||||
		startEventGroup()
 | 
			
		||||
 | 
			
		||||
func onEventTrigger() -> void:
 | 
			
		||||
	if !ifCondition():
 | 
			
		||||
		return
 | 
			
		||||
	eventConditionMet.emit()
 | 
			
		||||
 | 
			
		||||
func onTriggerListening(_trigger:EventTrigger) -> void:
 | 
			
		||||
	subscribeEvents()
 | 
			
		||||
 | 
			
		||||
func onTriggerNotListening(_trigger:EventTrigger) -> void:
 | 
			
		||||
	unsubscribeEvents()
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://bn2nw17cf11wp
 | 
			
		||||
@@ -1,58 +0,0 @@
 | 
			
		||||
class_name EventIfFlag extends "res://scripts/Event/Condition/EventIf.gd"
 | 
			
		||||
 | 
			
		||||
enum Type {
 | 
			
		||||
	ANY_OF_FLAGS_ON,
 | 
			
		||||
	ALL_OF_FLAGS_ON,
 | 
			
		||||
	ANY_OF_FLAGS_OFF,
 | 
			
		||||
	ALL_OF_FLAGS_OFF,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@export var event:EventSystem.SpecialEvent;
 | 
			
		||||
@export var type:Type = Type.ANY_OF_FLAGS_ON;
 | 
			
		||||
@export_flags(
 | 
			
		||||
	"1:1",
 | 
			
		||||
	"2:2",
 | 
			
		||||
	"3:4",
 | 
			
		||||
	"4:8",
 | 
			
		||||
	"5:16",
 | 
			
		||||
	"6:32",
 | 
			
		||||
	"7:64",
 | 
			
		||||
	"8:128",
 | 
			
		||||
	"9:256",
 | 
			
		||||
	"10:512",
 | 
			
		||||
	"11:1024",
 | 
			
		||||
	"12:2048",
 | 
			
		||||
	"13:4096",
 | 
			
		||||
	"14:8192",
 | 
			
		||||
	"15:16384",
 | 
			
		||||
	"16:32768",
 | 
			
		||||
	"17:65536",
 | 
			
		||||
	"18:131072",
 | 
			
		||||
	"19:262144",
 | 
			
		||||
	"20:524288",
 | 
			
		||||
	"21:1048576",
 | 
			
		||||
	"22:2097152",
 | 
			
		||||
	"23:4194304",
 | 
			
		||||
	"24:8388608",
 | 
			
		||||
	"25:16777216",
 | 
			
		||||
	"26:33554432",
 | 
			
		||||
	"27:67108864",
 | 
			
		||||
	"28:134217728",
 | 
			
		||||
	"29:268435456",
 | 
			
		||||
	"30:536870912",
 | 
			
		||||
	"31:1073741824",
 | 
			
		||||
	"32:2147483648"
 | 
			
		||||
)
 | 
			
		||||
var eventFlag:int = 0;
 | 
			
		||||
 | 
			
		||||
func ifCondition() -> bool:
 | 
			
		||||
	match type:
 | 
			
		||||
		Type.ANY_OF_FLAGS_ON:
 | 
			
		||||
			return EVENT.eventIsAnyOfFlagsOn(event, eventFlag)
 | 
			
		||||
		Type.ALL_OF_FLAGS_ON:
 | 
			
		||||
			return EVENT.eventAreFlagsOn(event, eventFlag)
 | 
			
		||||
		Type.ANY_OF_FLAGS_OFF:
 | 
			
		||||
			return EVENT.eventIsAnyOfFlagsOff(event, eventFlag)
 | 
			
		||||
		Type.ALL_OF_FLAGS_OFF:
 | 
			
		||||
			return EVENT.eventAreFlagsOff(event, eventFlag)
 | 
			
		||||
	return false
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://ccujhcc446mvh
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://dwcd277pv3p1t
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://cvrib7pjlip8g
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
class_name EventEntityTurn extends "res://scripts/Event/Event.gd"
 | 
			
		||||
 | 
			
		||||
@export var entity:EntityDirection = null
 | 
			
		||||
@export var direction:EntityDirection.Direction = EntityDirection.Direction.SOUTH
 | 
			
		||||
 | 
			
		||||
func start():
 | 
			
		||||
	if entity == null:
 | 
			
		||||
		return
 | 
			
		||||
	entity.direction = direction
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://bmcrd2ugqan43
 | 
			
		||||
@@ -1,62 +0,0 @@
 | 
			
		||||
class_name Event extends Node
 | 
			
		||||
 | 
			
		||||
const Entity = preload("res://scripts/Entity/Entity.gd");
 | 
			
		||||
 | 
			
		||||
var inEventSystemTree:bool = false;
 | 
			
		||||
var started:bool = false;
 | 
			
		||||
var ended:bool = false;
 | 
			
		||||
var interactor:EntityInteractor = null
 | 
			
		||||
var interactee:EntityInteractable = null
 | 
			
		||||
 | 
			
		||||
signal eventEnded()
 | 
			
		||||
 | 
			
		||||
# Godot Methods
 | 
			
		||||
func _process(delta: float) -> void:
 | 
			
		||||
	if !started || ended:
 | 
			
		||||
		return
 | 
			
		||||
	self.update(delta)
 | 
			
		||||
 | 
			
		||||
	if self.isDone():
 | 
			
		||||
		self.end()
 | 
			
		||||
 | 
			
		||||
# Event methods (cleaned up)
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	assert(
 | 
			
		||||
		self.is_inside_tree(), 
 | 
			
		||||
		"Event is trying to start but the node is not part of the scene tree. "+
 | 
			
		||||
		"Refer to EventSystem.addEvent"
 | 
			
		||||
	)
 | 
			
		||||
	assert(started == false)
 | 
			
		||||
	started = true
 | 
			
		||||
 | 
			
		||||
func update(_delta:float) -> void:
 | 
			
		||||
	assert(started == true)
 | 
			
		||||
	assert(ended == false)
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	return true
 | 
			
		||||
 | 
			
		||||
func end() -> void:
 | 
			
		||||
	assert(ended == false)
 | 
			
		||||
	ended = true
 | 
			
		||||
	self.eventEnded.emit()
 | 
			
		||||
	if self.inEventSystemTree:
 | 
			
		||||
		EVENT.removeEvent(self)
 | 
			
		||||
 | 
			
		||||
func isEndingEvent() -> bool:
 | 
			
		||||
	return false
 | 
			
		||||
 | 
			
		||||
func reset() -> void:
 | 
			
		||||
	started = false
 | 
			
		||||
	ended = false
 | 
			
		||||
	interactor = null
 | 
			
		||||
	interactee = null
 | 
			
		||||
 | 
			
		||||
func onEntityInteract(
 | 
			
		||||
	interactor:EntityInteractor,
 | 
			
		||||
	interactee:EntityInteractable
 | 
			
		||||
) -> void:
 | 
			
		||||
	self.reset()
 | 
			
		||||
	self.interactor = interactor
 | 
			
		||||
	self.interactee = interactee
 | 
			
		||||
	self.start()
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://cl3vqv8bwyoeu
 | 
			
		||||
@@ -1,63 +0,0 @@
 | 
			
		||||
class_name EventConversation extends "res://scripts/Event/Flow/EventGroup.gd"
 | 
			
		||||
 | 
			
		||||
@export var startPauseType:PauseSystem.PauseType = PauseSystem.PauseType.ENTITY_PAUSED
 | 
			
		||||
@export var endPauseType:PauseSystem.PauseType = PauseSystem.PauseType.NOT_PAUSED
 | 
			
		||||
 | 
			
		||||
@export var entities:Array[Entity] = []
 | 
			
		||||
 | 
			
		||||
@export var pauseInteractee:bool = true
 | 
			
		||||
@export var pauseInteractor:bool = true
 | 
			
		||||
@export var turnInteractee:bool = true
 | 
			
		||||
@export var turnInteractor:bool = true
 | 
			
		||||
 | 
			
		||||
var endPauseEvent:EventPause = null
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	# Turn events
 | 
			
		||||
	if interactee && interactor:
 | 
			
		||||
		if turnInteractee && interactee.entityDirection && interactor.characterBody:
 | 
			
		||||
			var turn = EventEntityTurn.new()
 | 
			
		||||
			turn.name = "Conversation Turn Interactee"
 | 
			
		||||
			turn.entity = interactee.entityDirection
 | 
			
		||||
			turn.direction = turn.entity.getDirectionToFace(interactor.characterBody.global_position)
 | 
			
		||||
			addChildEvent(turn, 0)
 | 
			
		||||
 | 
			
		||||
		if turnInteractor && interactor.entityDirection && interactee.characterBody:
 | 
			
		||||
			var turn = EventEntityTurn.new()
 | 
			
		||||
			turn.name = "Conversation Turn Interactor"
 | 
			
		||||
			turn.entity = interactor.entityDirection
 | 
			
		||||
			turn.direction = turn.entity.getDirectionToFace(interactee.characterBody.global_position)
 | 
			
		||||
			addChildEvent(turn, 0)
 | 
			
		||||
 | 
			
		||||
	# Create start pause event
 | 
			
		||||
	if (pauseInteractee && interactee.entity) || (pauseInteractor && interactor.entity):
 | 
			
		||||
		var startPause = EventPause.new()
 | 
			
		||||
		startPause.name = "Conversation Start Pause"
 | 
			
		||||
		startPause.pauseType = startPauseType
 | 
			
		||||
		startPause.entities = entities
 | 
			
		||||
		if pauseInteractee && interactee.entity:
 | 
			
		||||
			startPause.includeInteractee = pauseInteractee
 | 
			
		||||
		if pauseInteractor && interactor.entity:
 | 
			
		||||
			startPause.includeInteractor = pauseInteractor
 | 
			
		||||
		addChildEvent(startPause, 0)
 | 
			
		||||
 | 
			
		||||
		# Create end pause event.
 | 
			
		||||
		endPauseEvent = EventPause.new()
 | 
			
		||||
		endPauseEvent.name = "Conversation End Pause"
 | 
			
		||||
		endPauseEvent.pauseType = endPauseType
 | 
			
		||||
		endPauseEvent.entities = entities
 | 
			
		||||
		if pauseInteractee && interactee.entity:
 | 
			
		||||
			endPauseEvent.includeInteractee = pauseInteractee
 | 
			
		||||
		if pauseInteractor && interactor.entity:
 | 
			
		||||
			endPauseEvent.includeInteractor = pauseInteractor
 | 
			
		||||
		addChildEvent(endPauseEvent, -1)
 | 
			
		||||
 | 
			
		||||
	# Pass off to event group
 | 
			
		||||
	super.start()
 | 
			
		||||
 | 
			
		||||
func end() -> void:
 | 
			
		||||
	print("Ending conversation event: ", self)
 | 
			
		||||
	# Manually end pause
 | 
			
		||||
	if endPauseEvent != null && !endPauseEvent.started:
 | 
			
		||||
		endPauseEvent.start()
 | 
			
		||||
	super.end()
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://tkfc88q8m86f
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://dq35fj8r206nj
 | 
			
		||||
@@ -1,63 +0,0 @@
 | 
			
		||||
class_name EventFlagModify extends "res://scripts/Event/Event.gd"
 | 
			
		||||
 | 
			
		||||
enum Action {
 | 
			
		||||
	TURN_ON,
 | 
			
		||||
	TURN_OFF,
 | 
			
		||||
	SET_TO,
 | 
			
		||||
	ALL_ON,
 | 
			
		||||
	ALL_OFF
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@export var action:Action = Action.TURN_ON;
 | 
			
		||||
@export var event:EventSystem.SpecialEvent;
 | 
			
		||||
@export_flags(
 | 
			
		||||
	"1:1",
 | 
			
		||||
	"2:2",
 | 
			
		||||
	"3:4",
 | 
			
		||||
	"4:8",
 | 
			
		||||
	"5:16",
 | 
			
		||||
	"6:32",
 | 
			
		||||
	"7:64",
 | 
			
		||||
	"8:128",
 | 
			
		||||
	"9:256",
 | 
			
		||||
	"10:512",
 | 
			
		||||
	"11:1024",
 | 
			
		||||
	"12:2048",
 | 
			
		||||
	"13:4096",
 | 
			
		||||
	"14:8192",
 | 
			
		||||
	"15:16384",
 | 
			
		||||
	"16:32768",
 | 
			
		||||
	"17:65536",
 | 
			
		||||
	"18:131072",
 | 
			
		||||
	"19:262144",
 | 
			
		||||
	"20:524288",
 | 
			
		||||
	"21:1048576",
 | 
			
		||||
	"22:2097152",
 | 
			
		||||
	"23:4194304",
 | 
			
		||||
	"24:8388608",
 | 
			
		||||
	"25:16777216",
 | 
			
		||||
	"26:33554432",
 | 
			
		||||
	"27:67108864",
 | 
			
		||||
	"28:134217728",
 | 
			
		||||
	"29:268435456",
 | 
			
		||||
	"30:536870912",
 | 
			
		||||
	"31:1073741824",
 | 
			
		||||
	"32:2147483648"
 | 
			
		||||
)
 | 
			
		||||
var eventFlag:int = 0;
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	super.start()
 | 
			
		||||
	match action:
 | 
			
		||||
		Action.TURN_ON:
 | 
			
		||||
			EVENT.eventFlagOn(event, eventFlag)
 | 
			
		||||
		Action.TURN_OFF:
 | 
			
		||||
			EVENT.eventFlagOff(event, eventFlag)
 | 
			
		||||
		Action.SET_TO:
 | 
			
		||||
			EVENT.eventFlagSetTo(event, eventFlag)
 | 
			
		||||
		Action.ALL_ON:
 | 
			
		||||
			EVENT.eventFlagSetTo(event, 0xffffffff)
 | 
			
		||||
		Action.ALL_OFF:
 | 
			
		||||
			EVENT.eventFlagSetTo(event, 0)
 | 
			
		||||
		_:
 | 
			
		||||
			print("Invalid action: %s" % str(action))
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://0ygswaohp7kj
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
class_name EventFlagOn extends "res://scripts/Event/Event.gd"
 | 
			
		||||
 | 
			
		||||
@export var event:EventSystem.SpecialEvent;
 | 
			
		||||
@export_flags(
 | 
			
		||||
	"1:1",
 | 
			
		||||
	"2:2",
 | 
			
		||||
	"3:4",
 | 
			
		||||
	"4:8",
 | 
			
		||||
	"5:16",
 | 
			
		||||
	"6:32",
 | 
			
		||||
	"7:64",
 | 
			
		||||
	"8:128",
 | 
			
		||||
	"9:256",
 | 
			
		||||
	"10:512",
 | 
			
		||||
	"11:1024",
 | 
			
		||||
	"12:2048",
 | 
			
		||||
	"13:4096",
 | 
			
		||||
	"14:8192",
 | 
			
		||||
	"15:16384",
 | 
			
		||||
	"16:32768",
 | 
			
		||||
	"17:65536",
 | 
			
		||||
	"18:131072",
 | 
			
		||||
	"19:262144",
 | 
			
		||||
	"20:524288",
 | 
			
		||||
	"21:1048576",
 | 
			
		||||
	"22:2097152",
 | 
			
		||||
	"23:4194304",
 | 
			
		||||
	"24:8388608",
 | 
			
		||||
	"25:16777216",
 | 
			
		||||
	"26:33554432",
 | 
			
		||||
	"27:67108864",
 | 
			
		||||
	"28:134217728",
 | 
			
		||||
	"29:268435456",
 | 
			
		||||
	"30:536870912",
 | 
			
		||||
	"31:1073741824",
 | 
			
		||||
	"32:2147483648"
 | 
			
		||||
)
 | 
			
		||||
var eventFlag:int = 0;
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	super.start()
 | 
			
		||||
	EVENT.eventFlagOn(event, eventFlag)
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://cbd7wpvkf76ux
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://sqi2ehu4sqa1
 | 
			
		||||
@@ -1,15 +0,0 @@
 | 
			
		||||
class_name EventPause extends "res://scripts/Event/Event.gd"
 | 
			
		||||
 | 
			
		||||
@export var pauseType:PauseSystem.PauseType = PauseSystem.PauseType.ENTITY_PAUSED
 | 
			
		||||
@export var entities:Array[Entity] = []
 | 
			
		||||
@export var includeInteractee:bool = true
 | 
			
		||||
@export var includeInteractor:bool = true
 | 
			
		||||
 | 
			
		||||
func end() -> void:
 | 
			
		||||
	super.end()
 | 
			
		||||
	var ents:Array[Entity] = entities
 | 
			
		||||
	if interactor && includeInteractor && interactor.entity:
 | 
			
		||||
		ents.append(interactor.entity)
 | 
			
		||||
	if interactee && includeInteractee && interactee.entity:
 | 
			
		||||
		ents.append(interactee.entity)
 | 
			
		||||
	PAUSE.pause(pauseType, ents)
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://bv36suxm08vqe
 | 
			
		||||
@@ -1,25 +0,0 @@
 | 
			
		||||
class_name EventTextbox extends "res://scripts/Event/Event.gd"
 | 
			
		||||
 | 
			
		||||
@export_multiline var text:String = ""
 | 
			
		||||
 | 
			
		||||
var textPlural:String = ""
 | 
			
		||||
var count:int = 1
 | 
			
		||||
var transContext:TransContext = null
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	super.start()
 | 
			
		||||
 | 
			
		||||
	if text.is_empty() && transContext == null:
 | 
			
		||||
		push_error("EventTextbox text is empty and no TransContext provided.")
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	if transContext == null:
 | 
			
		||||
		transContext = TransContext.new()
 | 
			
		||||
 | 
			
		||||
	if textPlural.is_empty():
 | 
			
		||||
		VN.getTextbox().setText(transContext.trans(text))
 | 
			
		||||
	else:
 | 
			
		||||
		VN.getTextbox().setText(transContext.transPlural(text, textPlural, count));
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	return super.isDone() && VN.getTextbox().isClosed;
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://y7ckj1tn5cro
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
class_name EventTrigger extends Node
 | 
			
		||||
 | 
			
		||||
@export var triggerMultipleTimes: bool = false
 | 
			
		||||
 | 
			
		||||
var eventIf:EventIf = null
 | 
			
		||||
 | 
			
		||||
func _enter_tree() -> void:
 | 
			
		||||
	for child in get_children():
 | 
			
		||||
		if !(child is EventIf):
 | 
			
		||||
			continue
 | 
			
		||||
		eventIf = child
 | 
			
		||||
		break
 | 
			
		||||
 | 
			
		||||
	if eventIf == null:
 | 
			
		||||
		push_error(self, "requires an EventIf child to function properly")
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	eventIf.eventConditionMet.connect(onConditionTriggered)
 | 
			
		||||
	eventIf.onTriggerListening(self)
 | 
			
		||||
 | 
			
		||||
func _exit_tree() -> void:
 | 
			
		||||
	if eventIf != null:
 | 
			
		||||
		eventIf.eventConditionMet.disconnect(onConditionTriggered)
 | 
			
		||||
		eventIf.onTriggerNotListening(self)
 | 
			
		||||
		
 | 
			
		||||
	eventIf = null
 | 
			
		||||
 | 
			
		||||
func onConditionTriggered() -> void:
 | 
			
		||||
	if !triggerMultipleTimes:
 | 
			
		||||
		eventIf.eventConditionMet.disconnect(onConditionTriggered)
 | 
			
		||||
		eventIf.onTriggerNotListening(self)
 | 
			
		||||
	eventIf.start()
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://cs7voh47aoca8
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://dj5wl682sbohc
 | 
			
		||||
@@ -1,35 +0,0 @@
 | 
			
		||||
class_name EventGoTo extends "res://scripts/Event/Event.gd"
 | 
			
		||||
 | 
			
		||||
enum Type {
 | 
			
		||||
	GO_TO,
 | 
			
		||||
	GO_TO_AND_WAIT,
 | 
			
		||||
	GO_TO_AND_CONTINUE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@export var event:Event = null
 | 
			
		||||
@export var type:Type = Type.GO_TO
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	super.start()
 | 
			
		||||
	if event == null:
 | 
			
		||||
		print("EventGoTo: No event set")
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	event.start()
 | 
			
		||||
 | 
			
		||||
func isDone():
 | 
			
		||||
	if !super.isDone():
 | 
			
		||||
		return false
 | 
			
		||||
	
 | 
			
		||||
	if event == null:
 | 
			
		||||
		return true
 | 
			
		||||
 | 
			
		||||
	if type == Type.GO_TO_AND_WAIT:
 | 
			
		||||
		return event.isDone()
 | 
			
		||||
 | 
			
		||||
	return true
 | 
			
		||||
 | 
			
		||||
func isEndingEvent() -> bool:
 | 
			
		||||
	if type == Type.GO_TO:
 | 
			
		||||
		return true
 | 
			
		||||
	return false
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://da7fr2bave0c
 | 
			
		||||
@@ -1,83 +0,0 @@
 | 
			
		||||
class_name EventGroup extends "res://scripts/Event/Flow/EventWithChildren.gd"
 | 
			
		||||
 | 
			
		||||
enum ProcessType {
 | 
			
		||||
	SEQUENTIAL,
 | 
			
		||||
	PARALLEL,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@export var processType:ProcessType = ProcessType.SEQUENTIAL;
 | 
			
		||||
 | 
			
		||||
var childIndex:int = 0
 | 
			
		||||
var eventGroupStarted:bool = false
 | 
			
		||||
 | 
			
		||||
func shouldAutoStart() -> bool:
 | 
			
		||||
	return true
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	super.start()
 | 
			
		||||
 | 
			
		||||
	if shouldAutoStart():
 | 
			
		||||
		startEventGroup()
 | 
			
		||||
 | 
			
		||||
func startEventGroup() -> void:
 | 
			
		||||
	eventGroupStarted = true
 | 
			
		||||
 | 
			
		||||
	# This is called by the parent event to start the group
 | 
			
		||||
	if processType == ProcessType.SEQUENTIAL:
 | 
			
		||||
		childIndex = -1
 | 
			
		||||
		nextChild()
 | 
			
		||||
	elif processType == ProcessType.PARALLEL:
 | 
			
		||||
		for child in childEvents:
 | 
			
		||||
			startChild(child)
 | 
			
		||||
 | 
			
		||||
func update(delta:float) -> void:
 | 
			
		||||
	super.update(delta)
 | 
			
		||||
 | 
			
		||||
	# If sequential, see if the current child is done, if so go to next child
 | 
			
		||||
	if processType == ProcessType.SEQUENTIAL:
 | 
			
		||||
		if childIndex < 0 || childIndex >= childEvents.size():
 | 
			
		||||
			return
 | 
			
		||||
		if childEvents[childIndex].isDone():
 | 
			
		||||
			nextChild()
 | 
			
		||||
 | 
			
		||||
func nextChild() -> void:
 | 
			
		||||
	childIndex += 1
 | 
			
		||||
	if childIndex >= childEvents.size():
 | 
			
		||||
		return
 | 
			
		||||
	startChild(childEvents[childIndex])
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	if !super.isDone():
 | 
			
		||||
		return false
 | 
			
		||||
 | 
			
		||||
	if started && !eventGroupStarted:
 | 
			
		||||
		return true
 | 
			
		||||
	
 | 
			
		||||
	# If sequential, check if we've reached the end of the children
 | 
			
		||||
	if processType == ProcessType.SEQUENTIAL:
 | 
			
		||||
		return childIndex >= childEvents.size()
 | 
			
		||||
 | 
			
		||||
	# If parallel, check if all children are done
 | 
			
		||||
	elif processType == ProcessType.PARALLEL:
 | 
			
		||||
		for child in childEvents:
 | 
			
		||||
			if !child.isDone():
 | 
			
		||||
				return false
 | 
			
		||||
		return true
 | 
			
		||||
 | 
			
		||||
	return false
 | 
			
		||||
 | 
			
		||||
func end() -> void:
 | 
			
		||||
	for child in childEvents:
 | 
			
		||||
		if child.ended || !child.started:
 | 
			
		||||
			continue
 | 
			
		||||
		child.end()
 | 
			
		||||
	# Send to the parent to end the extra events
 | 
			
		||||
	super.end()
 | 
			
		||||
 | 
			
		||||
func reset() -> void:
 | 
			
		||||
	childIndex = -1
 | 
			
		||||
	eventGroupStarted = false
 | 
			
		||||
	for child in childEvents:
 | 
			
		||||
		child.reset()
 | 
			
		||||
	# Send to the parent to reset the extra events
 | 
			
		||||
	super.reset()
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://bb1qpptyr1rec
 | 
			
		||||
@@ -1,50 +0,0 @@
 | 
			
		||||
class_name EventWithChildren extends "res://scripts/Event/Event.gd"
 | 
			
		||||
 | 
			
		||||
var childEvents:Array[Event] = []
 | 
			
		||||
var addedEvents:Array[Event] = []
 | 
			
		||||
 | 
			
		||||
func start():
 | 
			
		||||
	super.start()
 | 
			
		||||
	_updateChildEvents()
 | 
			
		||||
 | 
			
		||||
func reset() -> void:
 | 
			
		||||
	super.reset()
 | 
			
		||||
	_cleanupExtraEvents()
 | 
			
		||||
 | 
			
		||||
func end() -> void:
 | 
			
		||||
	super.end()
 | 
			
		||||
	_cleanupExtraEvents()
 | 
			
		||||
 | 
			
		||||
func _updateChildEvents() -> void:
 | 
			
		||||
	childEvents = []
 | 
			
		||||
	for child in get_children():
 | 
			
		||||
		if child is Event:
 | 
			
		||||
			childEvents.append(child)
 | 
			
		||||
 | 
			
		||||
func _cleanupExtraEvents():
 | 
			
		||||
	for event in addedEvents:
 | 
			
		||||
		remove_child(event)
 | 
			
		||||
		event.queue_free()
 | 
			
		||||
	addedEvents = []
 | 
			
		||||
	_updateChildEvents()
 | 
			
		||||
 | 
			
		||||
func addChildEvent(child:Event, position:int = -1) -> void:
 | 
			
		||||
	assert(started == false || ended == true)
 | 
			
		||||
	if position < 0:
 | 
			
		||||
		position = childEvents.size() + position + 1
 | 
			
		||||
		
 | 
			
		||||
	add_child(child)
 | 
			
		||||
	move_child(child, position)
 | 
			
		||||
	addedEvents.append(child)
 | 
			
		||||
	_updateChildEvents()
 | 
			
		||||
 | 
			
		||||
func startChild(child:Event) -> void:
 | 
			
		||||
	assert(child.get_parent() == self)
 | 
			
		||||
 | 
			
		||||
	# Inherits some properties from this event.
 | 
			
		||||
	child.interactee = self.interactee
 | 
			
		||||
	child.interactor = self.interactor
 | 
			
		||||
	child.start()
 | 
			
		||||
 | 
			
		||||
	if child.isEndingEvent():
 | 
			
		||||
		self.end()
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://bs78jtft61ro6
 | 
			
		||||
@@ -1,74 +0,0 @@
 | 
			
		||||
class_name EventGetItem extends "res://scripts/Event/Item/EventItem.gd"
 | 
			
		||||
 | 
			
		||||
const EventConversation = preload("res://scripts/Event/EventConversation.gd")
 | 
			
		||||
 | 
			
		||||
enum GetType {
 | 
			
		||||
	FOUND,
 | 
			
		||||
	GIVEN,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@export var showText: bool = true
 | 
			
		||||
@export var getType:GetType = GetType.FOUND;
 | 
			
		||||
@export var removeNode:Node = null
 | 
			
		||||
 | 
			
		||||
var conversationEvent:EventConversation = null
 | 
			
		||||
var textboxEvent:EventTextbox = null
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	# Should show text?
 | 
			
		||||
	if !showText:
 | 
			
		||||
		super.start()
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	# What text to show?
 | 
			
		||||
	var textKey:String
 | 
			
		||||
	match getType:
 | 
			
		||||
		GetType.FOUND:
 | 
			
		||||
			textKey = "event.get_item.found"
 | 
			
		||||
		GetType.GIVEN:
 | 
			
		||||
			textKey = "event.get_item.given"
 | 
			
		||||
		_:
 | 
			
		||||
			super.start()
 | 
			
		||||
			return
 | 
			
		||||
 | 
			
		||||
	# Create translation context
 | 
			
		||||
	var ctx = TransContext.new()
 | 
			
		||||
	ctx.addInteger("quantity", quantity)
 | 
			
		||||
	ctx.addContext("item", ITEM.getItem(itemType).getTransContext())
 | 
			
		||||
 | 
			
		||||
	# Create conversation
 | 
			
		||||
	conversationEvent = EventConversation.new()
 | 
			
		||||
	addChildEvent(conversationEvent)
 | 
			
		||||
 | 
			
		||||
	# Create textbox
 | 
			
		||||
	textboxEvent = EventTextbox.new()
 | 
			
		||||
	textboxEvent.transContext = ctx
 | 
			
		||||
	textboxEvent.text = textKey
 | 
			
		||||
	textboxEvent.textPlural = textKey + "_plural"
 | 
			
		||||
	textboxEvent.count = quantity
 | 
			
		||||
	conversationEvent.addChildEvent(textboxEvent)
 | 
			
		||||
 | 
			
		||||
	# Begin processing
 | 
			
		||||
	super.start()
 | 
			
		||||
	startChild(conversationEvent)
 | 
			
		||||
 | 
			
		||||
func rewardItem():
 | 
			
		||||
	getInventory().addItem(itemType, quantity)
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	if !super.isDone():
 | 
			
		||||
		return false
 | 
			
		||||
 | 
			
		||||
	if !showText:
 | 
			
		||||
		return true
 | 
			
		||||
	return conversationEvent.isDone()
 | 
			
		||||
 | 
			
		||||
func end() -> void:
 | 
			
		||||
	rewardItem()
 | 
			
		||||
	if removeNode:
 | 
			
		||||
		var parent = removeNode.get_parent()
 | 
			
		||||
		if parent:
 | 
			
		||||
			parent.remove_child(removeNode)
 | 
			
		||||
		removeNode.queue_free()
 | 
			
		||||
		removeNode = null
 | 
			
		||||
	super.end()
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://b41umpbgqfuc2
 | 
			
		||||
@@ -1,11 +0,0 @@
 | 
			
		||||
class_name EventItem extends "res://scripts/Event/Flow/EventWithChildren.gd"
 | 
			
		||||
const Inventory = preload("res://scripts/Item/Inventory.gd")
 | 
			
		||||
 | 
			
		||||
@export var itemType:Item.Type = Item.Type.POTION
 | 
			
		||||
@export var quantity:int = 1
 | 
			
		||||
var inventory:Inventory = null
 | 
			
		||||
 | 
			
		||||
func getInventory() -> Inventory:
 | 
			
		||||
	if inventory == null:
 | 
			
		||||
		inventory = ITEM.PLAYER_INVENTORY
 | 
			
		||||
	return inventory
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://bgd2nkg5ni2et
 | 
			
		||||
@@ -1,77 +0,0 @@
 | 
			
		||||
class_name EventIfQuest extends "res://scripts/Event/Condition/EventIf.gd"
 | 
			
		||||
## Event that checks if a quest is in a specific state, if the condition is met
 | 
			
		||||
## then all children events will be run through.
 | 
			
		||||
##
 | 
			
		||||
## Can also be used as part of a trigger condition to fire if the quest state
 | 
			
		||||
## is updated.
 | 
			
		||||
 | 
			
		||||
enum Type {
 | 
			
		||||
	ANY_OF_OBJECTIVES_COMPLETED,
 | 
			
		||||
	ALL_OF_OBJECTIVES_COMPLETED,
 | 
			
		||||
	ANY_OF_OBJECTIVES_NOT_COMPLETED,
 | 
			
		||||
	ALL_OF_OBJECTIVES_NOT_COMPLETED,
 | 
			
		||||
	SPECIFIC_OBJECTIVE_COMPLETED,
 | 
			
		||||
	SPECIFIC_OBJECTIVE_NOT_COMPLETED,
 | 
			
		||||
	QUEST_STARTED,
 | 
			
		||||
	QUEST_NOT_STARTED,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@export var questKey:QuestSystem.QuestKey = QuestSystem.QuestKey.TEST_QUEST
 | 
			
		||||
@export var type:Type = Type.ALL_OF_OBJECTIVES_COMPLETED
 | 
			
		||||
@export var objective:int = 0
 | 
			
		||||
 | 
			
		||||
func ifCondition() -> bool:
 | 
			
		||||
	var quest:Quest = QUEST.quests.get(questKey)
 | 
			
		||||
 | 
			
		||||
	match type:
 | 
			
		||||
		Type.ANY_OF_OBJECTIVES_COMPLETED:
 | 
			
		||||
			for objective in quest.objecitves:
 | 
			
		||||
				if !objective.isCompleted():
 | 
			
		||||
					return true
 | 
			
		||||
 | 
			
		||||
		Type.ALL_OF_OBJECTIVES_COMPLETED:
 | 
			
		||||
			for objective in quest.objectives:
 | 
			
		||||
				if !objective.isCompleted():
 | 
			
		||||
					return false
 | 
			
		||||
			return true
 | 
			
		||||
 | 
			
		||||
		Type.ANY_OF_OBJECTIVES_NOT_COMPLETED:
 | 
			
		||||
			for objective in quest.objectives:
 | 
			
		||||
				if !objective.isCompleted():
 | 
			
		||||
					return true
 | 
			
		||||
 | 
			
		||||
		Type.ALL_OF_OBJECTIVES_NOT_COMPLETED:
 | 
			
		||||
			for objective in quest.objectives:
 | 
			
		||||
				if objective.isCompleted():
 | 
			
		||||
					return false
 | 
			
		||||
			return true
 | 
			
		||||
 | 
			
		||||
		Type.SPECIFIC_OBJECTIVE_COMPLETED:
 | 
			
		||||
			if quest.objectives[objective].isCompleted():
 | 
			
		||||
				return true
 | 
			
		||||
 | 
			
		||||
		Type.SPECIFIC_OBJECTIVE_NOT_COMPLETED:
 | 
			
		||||
			if quest.objectives[objective].isCompleted():
 | 
			
		||||
				return false
 | 
			
		||||
			return true
 | 
			
		||||
 | 
			
		||||
		Type.QUEST_STARTED:
 | 
			
		||||
			if quest.isStarted():
 | 
			
		||||
				return true
 | 
			
		||||
 | 
			
		||||
		Type.QUEST_NOT_STARTED:
 | 
			
		||||
			if !quest.isStarted():
 | 
			
		||||
				return true
 | 
			
		||||
 | 
			
		||||
	return false
 | 
			
		||||
 | 
			
		||||
func subscribeEvents() -> void:
 | 
			
		||||
	QUEST.questUpdated.connect(onQuestUpdated)
 | 
			
		||||
 | 
			
		||||
func unsubscribeEvents() -> void:
 | 
			
		||||
	QUEST.questUpdated.disconnect(onQuestUpdated)
 | 
			
		||||
 | 
			
		||||
func onQuestUpdated(quest:Quest) -> void:
 | 
			
		||||
	if quest.questKey != questKey:
 | 
			
		||||
		return
 | 
			
		||||
	self.onEventTrigger()
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://0ev1l0bf85gj
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://0aipsu5ele44
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://cnbl4x8p2xsx5
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://c2aj13e48jjd4
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
class_name EventShowQuest extends "res://scripts/Event/Event.gd"
 | 
			
		||||
 | 
			
		||||
@export var quest:QuestSystem.QuestKey = QuestSystem.QuestKey.TEST_QUEST
 | 
			
		||||
@export var waitUntilClosed:bool = true
 | 
			
		||||
@export var showQuest:bool = true
 | 
			
		||||
 | 
			
		||||
func start():
 | 
			
		||||
	if showQuest:
 | 
			
		||||
		UI.QUEST_MENU.open(quest)
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	if !super.isDone():
 | 
			
		||||
		return false
 | 
			
		||||
 | 
			
		||||
	if waitUntilClosed and showQuest:
 | 
			
		||||
		return !UI.QUEST_MENU.isOpen()
 | 
			
		||||
 | 
			
		||||
	return true
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://dd6ppw243a5x7
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
class_name EventStartQuest extends "res://scripts/Event/Quest/EventShowQuest.gd"
 | 
			
		||||
 | 
			
		||||
@export_category("Event Start Quest")
 | 
			
		||||
var nothing:bool = false
 | 
			
		||||
 | 
			
		||||
func start():
 | 
			
		||||
	assert(QUEST.quests.has(quest), "Quest not found.")
 | 
			
		||||
	QUEST.quests[quest].start()
 | 
			
		||||
	super.start()
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
uid://c4d7nithqnx5y
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user