BIN
										
									
								
								models/maps/SomeMap/SomeMap.fbx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								models/maps/SomeMap/SomeMap.fbx
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										38
									
								
								models/maps/SomeMap/SomeMap.fbx.import
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								models/maps/SomeMap/SomeMap.fbx.import
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="scene"
 | 
			
		||||
importer_version=1
 | 
			
		||||
type="PackedScene"
 | 
			
		||||
uid="uid://c5lyv50f7ls0i"
 | 
			
		||||
path="res://.godot/imported/SomeMap.fbx-15dd74d7349e33000020feacb745f7b7.scn"
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://models/maps/SomeMap/SomeMap.fbx"
 | 
			
		||||
dest_files=["res://.godot/imported/SomeMap.fbx-15dd74d7349e33000020feacb745f7b7.scn"]
 | 
			
		||||
 | 
			
		||||
[params]
 | 
			
		||||
 | 
			
		||||
nodes/root_type=""
 | 
			
		||||
nodes/root_name=""
 | 
			
		||||
nodes/apply_root_scale=true
 | 
			
		||||
nodes/root_scale=1.0
 | 
			
		||||
nodes/import_as_skeleton_bones=false
 | 
			
		||||
nodes/use_node_type_suffixes=true
 | 
			
		||||
meshes/ensure_tangents=true
 | 
			
		||||
meshes/generate_lods=true
 | 
			
		||||
meshes/create_shadow_meshes=true
 | 
			
		||||
meshes/light_baking=1
 | 
			
		||||
meshes/lightmap_texel_size=0.2
 | 
			
		||||
meshes/force_disable_compression=false
 | 
			
		||||
skins/use_named_skins=true
 | 
			
		||||
animation/import=true
 | 
			
		||||
animation/fps=30
 | 
			
		||||
animation/trimming=true
 | 
			
		||||
animation/remove_immutable_tracks=true
 | 
			
		||||
animation/import_rest_as_RESET=false
 | 
			
		||||
import_script/path=""
 | 
			
		||||
_subresources={}
 | 
			
		||||
fbx/importer=0
 | 
			
		||||
fbx/allow_geometry_helper_nodes=false
 | 
			
		||||
fbx/embedded_image_handling=1
 | 
			
		||||
							
								
								
									
										28
									
								
								models/maps/SomeMap/SomeMapModel.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								models/maps/SomeMap/SomeMapModel.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
[gd_scene load_steps=7 format=3 uid="uid://mr2ako4ox2gq"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://c5lyv50f7ls0i" path="res://models/maps/SomeMap/SomeMap.fbx" id="1_wkoy2"]
 | 
			
		||||
[ext_resource type="Shader" uid="uid://67hsyo0qqlfm" path="res://shaders/Map Shader.gdshader" id="2_m72sx"]
 | 
			
		||||
[ext_resource type="Texture2D" uid="uid://dgatj2jnpxojb" path="res://textures/tilesets/magecity.png" id="3_obl1d"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://cy4r0tp2htivb" path="res://scenes/MapBounds.tscn" id="4_y4q77"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_i805s"]
 | 
			
		||||
render_priority = 0
 | 
			
		||||
shader = ExtResource("2_m72sx")
 | 
			
		||||
shader_parameter/tileset = ExtResource("3_obl1d")
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_iqvxq"]
 | 
			
		||||
data = PackedVector3Array(0.01, 0.01, 0, 0.01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, 0.01, 0.01, 0, 0, 0, 0, 0, -0.01, 0, -0.01, -0.01, 0, -0.01, -0.01, 0, -0.01, 0, 0, 0, 0, 0, 0.01, 0, 0, 0.01, -0.01, 0, 0, -0.01, 0, 0, -0.01, 0, 0, 0, 0, 0.01, 0, 0, 0, 0.01, 0, 0, 0, 0, -0.01, 0, 0, -0.01, 0, 0, -0.01, 0.01, 0, 0, 0.01, 0, -0.01, 0.01, 0, -0.01, 0, 0, -0.02, 0, 0, -0.02, 0, 0, -0.02, 0.01, 0, -0.01, 0.01, 0, -0.01, 0, 0, -0.01, -0.01, 0, -0.02, -0.01, 0, -0.02, -0.01, 0, -0.02, 0, 0, -0.01, 0, 0, -0.01, -0.01, 0, -0.01, -0.02, 0, -0.02, -0.02, 0, -0.02, -0.02, 0, -0.02, -0.01, 0, -0.01, -0.01, 0, 0, -0.01, 0, 0, -0.02, 0, -0.01, -0.02, 0, -0.01, -0.02, 0, -0.01, -0.01, 0, 0, -0.01, 0, 0.01, -0.01, 0, 0.01, -0.02, 0, 0, -0.02, 0, 0, -0.02, 0, 0, -0.01, 0, 0.01, -0.01, 0, 0.02, -0.01, 0, 0.02, -0.02, 0, 0.01, -0.02, 0, 0.01, -0.02, 0, 0.01, -0.01, 0, 0.02, -0.01, 0, 0.02, 0, 0, 0.02, -0.01, 0, 0.01, -0.01, 0, 0.01, -0.01, 0, 0.01, 0, 0, 0.02, 0, 0, 0.02, 0.01, 0, 0.02, 0, 0, 0.01, 0, 0, 0.01, 0, 0, 0.01, 0.01, 0, 0.02, 0.01, 0, 0.02, 0.02, 0, 0.02, 0.01, 0, 0.01, 0.01, 0, 0.01, 0.01, 0, 0.01, 0.02, 0, 0.02, 0.02, 0, 0.01, 0.02, 0, 0.01, 0.01, 0, 0, 0.01, 0, 0, 0.01, 0, 0, 0.02, 0, 0.01, 0.02, 0, 0, 0.02, 0, 0, 0.01, 0, -0.01, 0.01, 0, -0.01, 0.01, 0, -0.01, 0.02, 0, 0, 0.02, 0, -0.01, 0.02, 0, -0.01, 0.01, 0, -0.02, 0.01, 0, -0.02, 0.01, 0, -0.02, 0.02, 0, -0.01, 0.02, 0, -0.02, 0.02, 0, -0.02, 0.01, 0, -0.03, 0.01, 0, -0.03, 0.01, 0, -0.03, 0.02, 0, -0.02, 0.02, 0, -0.02, 0.01, 0, -0.02, 0, 0, -0.03, 0, 0, -0.03, 0, 0, -0.03, 0.01, 0, -0.02, 0.01, 0, -0.02, 0, 0, -0.02, -0.01, 0, -0.03, -0.01, 0, -0.03, -0.01, 0, -0.03, 0, 0, -0.02, 0, 0, -0.02, -0.01, 0, -0.02, -0.02, 0, -0.03, -0.02, 0, -0.03, -0.02, 0, -0.03, -0.01, 0, -0.02, -0.01, 0, -0.02, -0.02, 0, -0.02, -0.03, 0, -0.03, -0.03, 0, -0.03, -0.03, 0, -0.03, -0.02, 0, -0.02, -0.02, 0, -0.01, -0.02, 0, -0.01, -0.03, 0, -0.02, -0.03, 0, -0.02, -0.03, 0, -0.02, -0.02, 0, -0.01, -0.02, 0, 0, -0.02, 0, 0, -0.03, 0, -0.01, -0.03, 0, -0.01, -0.03, 0, -0.01, -0.02, 0, 0, -0.02, 0, 0.01, -0.02, 0, 0.01, -0.03, 0, 0, -0.03, 0, 0, -0.03, 0, 0, -0.02, 0, 0.01, -0.02, 0, 0.02, -0.02, 0, 0.02, -0.03, 0, 0.01, -0.03, 0, 0.01, -0.03, 0, 0.01, -0.02, 0, 0.02, -0.02, 0, 0.03, -0.02, 0, 0.03, -0.03, 0, 0.02, -0.03, 0, 0.02, -0.03, 0, 0.02, -0.02, 0, 0.03, -0.02, 0, 0.03, -0.01, 0, 0.03, -0.02, 0, 0.02, -0.02, 0, 0.02, -0.02, 0, 0.02, -0.01, 0, 0.03, -0.01, 0, 0.03, 0, 0, 0.03, -0.01, 0, 0.02, -0.01, 0, 0.02, -0.01, 0, 0.02, 0, 0, 0.03, 0, 0, 0.03, 0.01, 0, 0.03, 0, 0, 0.02, 0, 0, 0.02, 0, 0, 0.02, 0.01, 0, 0.03, 0.01, 0, 0.03, 0.02, 0, 0.03, 0.01, 0, 0.02, 0.01, 0, 0.02, 0.01, 0, 0.02, 0.02, 0, 0.03, 0.02, 0, 0.03, 0.03, 0, 0.03, 0.02, 0, 0.02, 0.02, 0, 0.02, 0.02, 0, 0.02, 0.03, 0, 0.03, 0.03, 0, 0.02, 0.03, 0, 0.02, 0.02, 0, 0.01, 0.02, 0, 0.01, 0.02, 0, 0.01, 0.03, 0, 0.02, 0.03, 0, 0.01, 0.03, 0, 0.01, 0.02, 0, 0, 0.02, 0, 0, 0.02, 0, 0, 0.03, 0, 0.01, 0.03, 0, 0, 0.03, 0, 0, 0.02, 0, -0.01, 0.02, 0, -0.01, 0.02, 0, -0.01, 0.03, 0, 0, 0.03, 0, -0.01, 0.03, 0, -0.01, 0.02, 0, -0.02, 0.02, 0, -0.02, 0.02, 0, -0.02, 0.03, 0, -0.01, 0.03, 0, -0.02, 0.03, 0, -0.02, 0.02, 0, -0.03, 0.02, 0, -0.03, 0.02, 0, -0.03, 0.03, 0, -0.02, 0.03, 0)
 | 
			
		||||
 | 
			
		||||
[node name="SomeMapModel" instance=ExtResource("1_wkoy2")]
 | 
			
		||||
 | 
			
		||||
[node name="Cube" parent="." index="0"]
 | 
			
		||||
surface_material_override/0 = SubResource("ShaderMaterial_i805s")
 | 
			
		||||
 | 
			
		||||
[node name="StaticBody3D" type="StaticBody3D" parent="." index="1"]
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D" index="0"]
 | 
			
		||||
transform = Transform3D(100, 0, 0, 0, 0, 100, 0, -100, 0, 0, 0, 0)
 | 
			
		||||
shape = SubResource("ConcavePolygonShape3D_iqvxq")
 | 
			
		||||
 | 
			
		||||
[node name="MapBounds" parent="." index="2" instance=ExtResource("4_y4q77")]
 | 
			
		||||
transform = Transform3D(6.40417, 0, 0, 0, 4.52981, 0, 0, 0, 6.17046, 0.0595146, 2.14979, 0.0393701)
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								models/maps/SomeMap/some map.blend
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								models/maps/SomeMap/some map.blend
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								models/maps/SomeMap/some map.blend1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								models/maps/SomeMap/some map.blend1
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								models/maps/test.blend
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								models/maps/test.blend
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										51
									
								
								models/maps/test.blend.import
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								models/maps/test.blend.import
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
			
		||||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="scene"
 | 
			
		||||
importer_version=1
 | 
			
		||||
type="PackedScene"
 | 
			
		||||
uid="uid://c7g5kc0m1uhxa"
 | 
			
		||||
path="res://.godot/imported/test.blend-c501d2978761adab01d4cc9b69942fee.scn"
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://models/test.blend"
 | 
			
		||||
dest_files=["res://.godot/imported/test.blend-c501d2978761adab01d4cc9b69942fee.scn"]
 | 
			
		||||
 | 
			
		||||
[params]
 | 
			
		||||
 | 
			
		||||
nodes/root_type=""
 | 
			
		||||
nodes/root_name=""
 | 
			
		||||
nodes/apply_root_scale=true
 | 
			
		||||
nodes/root_scale=1.0
 | 
			
		||||
nodes/import_as_skeleton_bones=false
 | 
			
		||||
meshes/ensure_tangents=true
 | 
			
		||||
meshes/generate_lods=true
 | 
			
		||||
meshes/create_shadow_meshes=true
 | 
			
		||||
meshes/light_baking=1
 | 
			
		||||
meshes/lightmap_texel_size=0.2
 | 
			
		||||
meshes/force_disable_compression=false
 | 
			
		||||
skins/use_named_skins=true
 | 
			
		||||
animation/import=true
 | 
			
		||||
animation/fps=30
 | 
			
		||||
animation/trimming=false
 | 
			
		||||
animation/remove_immutable_tracks=true
 | 
			
		||||
animation/import_rest_as_RESET=false
 | 
			
		||||
import_script/path=""
 | 
			
		||||
_subresources={}
 | 
			
		||||
blender/nodes/visible=0
 | 
			
		||||
blender/nodes/active_collection_only=false
 | 
			
		||||
blender/nodes/punctual_lights=true
 | 
			
		||||
blender/nodes/cameras=true
 | 
			
		||||
blender/nodes/custom_properties=true
 | 
			
		||||
blender/nodes/modifiers=1
 | 
			
		||||
blender/meshes/colors=false
 | 
			
		||||
blender/meshes/uvs=true
 | 
			
		||||
blender/meshes/normals=true
 | 
			
		||||
blender/meshes/tangents=true
 | 
			
		||||
blender/meshes/skins=2
 | 
			
		||||
blender/meshes/export_bones_deforming_mesh_only=false
 | 
			
		||||
blender/materials/unpack_enabled=true
 | 
			
		||||
blender/materials/export_materials=1
 | 
			
		||||
blender/animation/limit_playback=true
 | 
			
		||||
blender/animation/always_sample=true
 | 
			
		||||
blender/animation/group_tracks=true
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								models/test.blend1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								models/test.blend1
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										15
									
								
								scenes/Cooking/CuttingScene.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								scenes/Cooking/CuttingScene.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
[gd_scene load_steps=3 format=3 uid="uid://bix00kr2hkaxn"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://kwnx0enmgk54" path="res://scripts/Scenes/CuttingScene.gd" id="1_2ls7x"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_hck4v"]
 | 
			
		||||
 | 
			
		||||
[node name="CuttingScene" type="Node3D"]
 | 
			
		||||
script = ExtResource("1_2ls7x")
 | 
			
		||||
 | 
			
		||||
[node name="Camera3D" type="Camera3D" parent="."]
 | 
			
		||||
transform = Transform3D(0.504528, 0.295299, -0.811326, 0, 0.939693, 0.34202, 0.863396, -0.172559, 0.474101, -1.50615, 0.608966, 0.933182)
 | 
			
		||||
fov = 35.4
 | 
			
		||||
 | 
			
		||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
 | 
			
		||||
mesh = SubResource("CapsuleMesh_hck4v")
 | 
			
		||||
							
								
								
									
										36
									
								
								scenes/Entities/Rosa.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								scenes/Entities/Rosa.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
[gd_scene load_steps=8 format=3 uid="uid://yhtpoum3eek7"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://ixwikdguyhf0" path="res://scripts/Entities/RosaController.gd" id="1_3g383"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://jd50n00bo05y" path="res://scripts/Entities/RosaCamera.gd" id="2_tr66j"]
 | 
			
		||||
[ext_resource type="Shader" uid="uid://7h2axb2tsh17" path="res://shaders/NPC Shader.gdshader" id="3_j5vis"]
 | 
			
		||||
[ext_resource type="Texture2D" uid="uid://b8ac5emade2y0" path="res://textures/characters/base_female.png" id="4_1ec0m"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ls7r8"]
 | 
			
		||||
radius = 0.331611
 | 
			
		||||
height = 0.804274
 | 
			
		||||
 | 
			
		||||
[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_1ec0m")
 | 
			
		||||
shader_parameter/frame = 0
 | 
			
		||||
shader_parameter/direction = 1
 | 
			
		||||
 | 
			
		||||
[node name="Rosa" type="CharacterBody3D"]
 | 
			
		||||
script = ExtResource("1_3g383")
 | 
			
		||||
 | 
			
		||||
[node name="Rosa Camera" type="Camera3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 0.130388, 0.991463, 0, -0.991463, 0.130388, 0, 3.14994, 0.404846)
 | 
			
		||||
fov = 30.0
 | 
			
		||||
script = ExtResource("2_tr66j")
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.126485)
 | 
			
		||||
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.00989294, 0, 0)
 | 
			
		||||
mesh = SubResource("QuadMesh_dyaax")
 | 
			
		||||
surface_material_override/0 = SubResource("ShaderMaterial_fegux")
 | 
			
		||||
							
								
								
									
										32
									
								
								scenes/Entities/TestNPC.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								scenes/Entities/TestNPC.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
[gd_scene load_steps=8 format=3 uid="uid://dr4b2pmsknuhc"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://d23qg1ovkbxst" path="res://scripts/Entities/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://btxgv85qst1jy" path="res://scripts/Cutscene/TestCutscene.gd" id="2_jwvuu"]
 | 
			
		||||
[ext_resource type="Texture2D" uid="uid://boa4hvwyoslv0" path="res://textures/characters/base_male.png" id="3_20w6p"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_dw1sy"]
 | 
			
		||||
radius = 0.331611
 | 
			
		||||
height = 0.804274
 | 
			
		||||
 | 
			
		||||
[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("3_20w6p")
 | 
			
		||||
shader_parameter/frame = 0
 | 
			
		||||
shader_parameter/direction = 1
 | 
			
		||||
 | 
			
		||||
[node name="TestNpc" type="CharacterBody3D"]
 | 
			
		||||
script = ExtResource("1_1muh7")
 | 
			
		||||
interactCutscene = ExtResource("2_jwvuu")
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.126485)
 | 
			
		||||
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")
 | 
			
		||||
							
								
								
									
										3
									
								
								scenes/MainMenu.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								scenes/MainMenu.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
[gd_scene format=3 uid="uid://w1q5eoiejmy3"]
 | 
			
		||||
 | 
			
		||||
[node name="MainMenu" type="Node3D"]
 | 
			
		||||
							
								
								
									
										14
									
								
								scenes/MapBounds.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								scenes/MapBounds.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
[gd_scene load_steps=3 format=3 uid="uid://cy4r0tp2htivb"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://dbah1pmk8jola" path="res://scripts/MapBounds.gd" id="1_43dqt"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ep4u2"]
 | 
			
		||||
 | 
			
		||||
[node name="MapBounds" type="Area3D"]
 | 
			
		||||
script = ExtResource("1_43dqt")
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
shape = SubResource("BoxShape3D_ep4u2")
 | 
			
		||||
 | 
			
		||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
 | 
			
		||||
[connection signal="body_exited" from="." to="." method="_on_body_exited"]
 | 
			
		||||
							
								
								
									
										41
									
								
								scenes/Maps/SomeMap.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								scenes/Maps/SomeMap.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
[gd_scene load_steps=7 format=3 uid="uid://dx6fv8n4jl5ku"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://mr2ako4ox2gq" path="res://models/maps/SomeMap/SomeMapModel.tscn" id="1_sbtr5"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://yhtpoum3eek7" path="res://scenes/Entities/Rosa.tscn" id="2_2h4bv"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://dr4b2pmsknuhc" path="res://scenes/Entities/TestNPC.tscn" id="3_q0pj2"]
 | 
			
		||||
 | 
			
		||||
[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="Some-map" type="Node3D"]
 | 
			
		||||
 | 
			
		||||
[node name="some map" parent="." instance=ExtResource("1_sbtr5")]
 | 
			
		||||
 | 
			
		||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
 | 
			
		||||
environment = SubResource("Environment_nyivo")
 | 
			
		||||
 | 
			
		||||
[node name="Rosa" parent="." instance=ExtResource("2_2h4bv")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.19857, 0.684572, 0.968477)
 | 
			
		||||
 | 
			
		||||
[node name="TestNpc" parent="." instance=ExtResource("3_q0pj2")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.68747, 0.459578, -0.399262)
 | 
			
		||||
interactType = 1
 | 
			
		||||
moveType = 1
 | 
			
		||||
direction = 1
 | 
			
		||||
 | 
			
		||||
[node name="OmniLight3D" type="OmniLight3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.28892, 0)
 | 
			
		||||
light_energy = 3.375
 | 
			
		||||
shadow_bias = 0.0
 | 
			
		||||
shadow_normal_bias = 0.9
 | 
			
		||||
omni_range = 281.646
 | 
			
		||||
							
								
								
									
										9
									
								
								scenes/Meta/Cooking.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								scenes/Meta/Cooking.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
[gd_scene load_steps=3 format=3 uid="uid://b4ffu88bmt4sa"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://ckxjs4wty6sju" path="res://scripts/Scenes/CookingScene.gd" id="1_27bmi"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://bix00kr2hkaxn" path="res://scenes/Cooking/CuttingScene.tscn" id="1_bokpl"]
 | 
			
		||||
 | 
			
		||||
[node name="Cooking" type="Node3D"]
 | 
			
		||||
script = ExtResource("1_27bmi")
 | 
			
		||||
 | 
			
		||||
[node name="CuttingScene" parent="." instance=ExtResource("1_bokpl")]
 | 
			
		||||
							
								
								
									
										9
									
								
								scenes/Meta/Overworld.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								scenes/Meta/Overworld.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
[gd_scene load_steps=3 format=3 uid="uid://tmbx2kit0jyq"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://pcncoc6wum4q" path="res://scripts/Scenes/OverworldScene.gd" id="1_yv6j0"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://dx6fv8n4jl5ku" path="res://scenes/Maps/SomeMap.tscn" id="4_8dvtu"]
 | 
			
		||||
 | 
			
		||||
[node name="Overworld" type="Node3D"]
 | 
			
		||||
script = ExtResource("1_yv6j0")
 | 
			
		||||
 | 
			
		||||
[node name="Some-map" parent="." instance=ExtResource("4_8dvtu")]
 | 
			
		||||
							
								
								
									
										12
									
								
								scenes/Meta/RootScene.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								scenes/Meta/RootScene.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
[gd_scene load_steps=4 format=3 uid="uid://tanovye003t2"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://cj4jxqpykhteg" path="res://scripts/Scenes/RootScene.gd" id="1_xu06r"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://iibqlagufwhm" path="res://scenes/Meta/Systems.tscn" id="2_et43v"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://dfwwtbs3ywcyq" path="res://scenes/Meta/UI.tscn" id="3_fwr0j"]
 | 
			
		||||
 | 
			
		||||
[node name="RootScene" type="Node3D"]
 | 
			
		||||
script = ExtResource("1_xu06r")
 | 
			
		||||
 | 
			
		||||
[node name="Systems" parent="." instance=ExtResource("2_et43v")]
 | 
			
		||||
 | 
			
		||||
[node name="UI" parent="." instance=ExtResource("3_fwr0j")]
 | 
			
		||||
							
								
								
									
										38
									
								
								scenes/Meta/Systems.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								scenes/Meta/Systems.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
[gd_scene load_steps=10 format=3 uid="uid://iibqlagufwhm"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://cj8athi16655p" path="res://scripts/System/Systems.gd" id="1_uen2c"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://d2b7r3t5ownc5" path="res://scripts/System/CutsceneSystem.gd" id="2_sf62c"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://bc4c4eqfrnegb" path="res://scripts/System/ItemSystem.gd" id="3_nwp6i"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dnlg1e8une55l" path="res://scripts/System/QuestSystem.gd" id="4_d00wi"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://chux5imw4pse6" path="res://scripts/System/VNSystem.gd" id="5_22p3i"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://bontk8ex2kxkb" path="res://scripts/System/PauseSystem.gd" id="6_hdi8m"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://mr6i8copcn37" path="res://scripts/System/BattleSystem.gd" id="7_miqgj"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://drcaiuyla2psa" path="res://scripts/System/CookingSystem.gd" id="7_nou1j"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://bbd8gcx6byjhf" path="res://scripts/System/SceneSystem.gd" id="9_budbk"]
 | 
			
		||||
 | 
			
		||||
[node name="Systems" type="Node"]
 | 
			
		||||
script = ExtResource("1_uen2c")
 | 
			
		||||
 | 
			
		||||
[node name="Cutscene" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("2_sf62c")
 | 
			
		||||
 | 
			
		||||
[node name="Item" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("3_nwp6i")
 | 
			
		||||
 | 
			
		||||
[node name="Quest" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("4_d00wi")
 | 
			
		||||
 | 
			
		||||
[node name="VN" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("5_22p3i")
 | 
			
		||||
 | 
			
		||||
[node name="Pause" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("6_hdi8m")
 | 
			
		||||
 | 
			
		||||
[node name="Cooking" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("7_nou1j")
 | 
			
		||||
 | 
			
		||||
[node name="Battle" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("7_miqgj")
 | 
			
		||||
 | 
			
		||||
[node name="Scene" type="Node" parent="."]
 | 
			
		||||
script = ExtResource("9_budbk")
 | 
			
		||||
							
								
								
									
										20
									
								
								scenes/Meta/UI.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								scenes/Meta/UI.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
[gd_scene load_steps=4 format=3 uid="uid://dfwwtbs3ywcyq"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Theme" uid="uid://dm7ee4aqjr2dl" path="res://ui/UI Theme.tres" id="1_3b1y4"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://vjr7s045ri4a" path="res://scripts/Scenes/UIScene.gd" id="2_5efuf"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://bkx3l0kckf4a8" path="res://scenes/UI/VNTextbox.tscn" id="2_x0c4l"]
 | 
			
		||||
 | 
			
		||||
[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
 | 
			
		||||
theme = ExtResource("1_3b1y4")
 | 
			
		||||
script = ExtResource("2_5efuf")
 | 
			
		||||
 | 
			
		||||
[node name="VNTextbox" parent="." instance=ExtResource("2_x0c4l")]
 | 
			
		||||
visible = false
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
offset_top = -133.0
 | 
			
		||||
							
								
								
									
										42
									
								
								scenes/UI/PauseMenu.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								scenes/UI/PauseMenu.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
[gd_scene load_steps=2 format=3 uid="uid://cqr1fgxwv0bjg"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Theme" uid="uid://dm7ee4aqjr2dl" path="res://ui/UI Theme.tres" id="1_jnmec"]
 | 
			
		||||
 | 
			
		||||
[node name="PauseMenu" type="Control"]
 | 
			
		||||
layout_mode = 3
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
theme = ExtResource("1_jnmec")
 | 
			
		||||
 | 
			
		||||
[node name="HSplitContainer" type="HBoxContainer" parent="."]
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
theme = ExtResource("1_jnmec")
 | 
			
		||||
 | 
			
		||||
[node name="Panel2" type="PanelContainer" parent="HSplitContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_vertical = 3
 | 
			
		||||
theme = ExtResource("1_jnmec")
 | 
			
		||||
 | 
			
		||||
[node name="VSplitContainer" type="VBoxContainer" parent="HSplitContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
theme = ExtResource("1_jnmec")
 | 
			
		||||
 | 
			
		||||
[node name="Panel" type="PanelContainer" parent="HSplitContainer/VSplitContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
size_flags_vertical = 3
 | 
			
		||||
theme = ExtResource("1_jnmec")
 | 
			
		||||
 | 
			
		||||
[node name="Panel2" type="PanelContainer" parent="HSplitContainer/VSplitContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
size_flags_horizontal = 3
 | 
			
		||||
theme = ExtResource("1_jnmec")
 | 
			
		||||
							
								
								
									
										28
									
								
								scenes/UI/VNTextbox.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								scenes/UI/VNTextbox.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
[gd_scene load_steps=3 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"]
 | 
			
		||||
 | 
			
		||||
[node name="VNTextbox" type="PanelContainer"]
 | 
			
		||||
anchors_preset = 12
 | 
			
		||||
anchor_top = 1.0
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
offset_top = -140.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 0
 | 
			
		||||
theme = ExtResource("1_wx4lp")
 | 
			
		||||
script = ExtResource("2_uo1gm")
 | 
			
		||||
 | 
			
		||||
[node name="MarginContainer" type="MarginContainer" parent="."]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
theme = ExtResource("1_wx4lp")
 | 
			
		||||
 | 
			
		||||
[node name="Label" type="RichTextLabel" parent="MarginContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
theme = ExtResource("1_wx4lp")
 | 
			
		||||
bbcode_enabled = true
 | 
			
		||||
text = "test
 | 
			
		||||
test
 | 
			
		||||
test
 | 
			
		||||
test"
 | 
			
		||||
							
								
								
									
										48
									
								
								scripts/Battle/Battle.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								scripts/Battle/Battle.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,48 @@
 | 
			
		||||
class_name Battle
 | 
			
		||||
const BattleFighter = preload("res://scripts/Battle/BattleFighter.gd");
 | 
			
		||||
 | 
			
		||||
enum FighterPosition {
 | 
			
		||||
	LEFT_TOP = 0,
 | 
			
		||||
	LEFT_CENTER = 1,
 | 
			
		||||
	LEFT_BOTTOM = 2,
 | 
			
		||||
	
 | 
			
		||||
	CENTER_TOP = 3,
 | 
			
		||||
	CENTER_CENTER = 4,
 | 
			
		||||
	CENTER_BOTTOM = 5,
 | 
			
		||||
 | 
			
		||||
	RIGHT_TOP = 6,
 | 
			
		||||
	RIGHT_CENTER = 7,
 | 
			
		||||
	RIGHT_BOTTOM = 8,
 | 
			
		||||
 | 
			
		||||
	ENEMY_DEFAULT = LEFT_CENTER,
 | 
			
		||||
	PLAYER_DEFAULT = RIGHT_CENTER,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
var fighters:Array = [];
 | 
			
		||||
 | 
			
		||||
func addFighter(fighter:BattleFighter, position:FighterPosition):
 | 
			
		||||
	if fighters.has(position):
 | 
			
		||||
		push_error("Fighter already exists at position");
 | 
			
		||||
		return
 | 
			
		||||
	fighters[position] = fighter;
 | 
			
		||||
 | 
			
		||||
func moveFighter(fighter:BattleFighter, position:FighterPosition):
 | 
			
		||||
	if fighters.has(position):
 | 
			
		||||
		push_error("Fighter already exists at position");
 | 
			
		||||
		return
 | 
			
		||||
	if not fighters.has(fighter):
 | 
			
		||||
		push_error("Fighter does not exist");
 | 
			
		||||
		return
 | 
			
		||||
	removeFighter(fighter);
 | 
			
		||||
	addFighter(fighter, position);
 | 
			
		||||
 | 
			
		||||
func getFightersOfTeam(team:BattleFighter.BattleFighterTeam):
 | 
			
		||||
	var result = [];
 | 
			
		||||
	for fighter in fighters:
 | 
			
		||||
		if fighter.team != team:
 | 
			
		||||
			continue
 | 
			
		||||
		result.append(fighter);
 | 
			
		||||
	return result;
 | 
			
		||||
 | 
			
		||||
func removeFighter(fighter:BattleFighter):
 | 
			
		||||
	fighters.erase(fighter);
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Battle/Battle.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Battle/Battle.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://kwijyojokkpm
 | 
			
		||||
							
								
								
									
										10
									
								
								scripts/Battle/BattleFighter.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								scripts/Battle/BattleFighter.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
class_name BattleFighter
 | 
			
		||||
 | 
			
		||||
enum BattleFighterTeam {
 | 
			
		||||
	PLAYER,
 | 
			
		||||
	ENEMY
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
var team:BattleFighterTeam;
 | 
			
		||||
var health:int = 100;
 | 
			
		||||
var maxHealth:int = 100;
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Battle/BattleFighter.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Battle/BattleFighter.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://daksbecm02l3t
 | 
			
		||||
							
								
								
									
										7
									
								
								scripts/Cooking/CookingGame.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								scripts/Cooking/CookingGame.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
class_name CookingGame
 | 
			
		||||
const VerticalSlice = preload("res://scripts/Cooking/Recipe/VerticalSlice.gd");
 | 
			
		||||
 | 
			
		||||
var recipe:CookingRecipe = null;
 | 
			
		||||
 | 
			
		||||
func _init(recipe:CookingRecipe) -> void:
 | 
			
		||||
	self.recipe = recipe;
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cooking/CookingGame.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cooking/CookingGame.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://nsqcafdni4vc
 | 
			
		||||
							
								
								
									
										8
									
								
								scripts/Cooking/Recipe/CookingRecipe.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								scripts/Cooking/Recipe/CookingRecipe.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
class_name CookingRecipe
 | 
			
		||||
const ItemStack = preload("res://scripts/Item/ItemStack.gd")
 | 
			
		||||
 | 
			
		||||
func _init() -> void:
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func getIngredients() -> Array[ItemStack]:
 | 
			
		||||
	return []
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cooking/Recipe/CookingRecipe.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cooking/Recipe/CookingRecipe.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://bqnancnrbmk5n
 | 
			
		||||
							
								
								
									
										10
									
								
								scripts/Cooking/Recipe/VerticalSlice.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								scripts/Cooking/Recipe/VerticalSlice.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
class_name VerticalSlice extends "res://scripts/Cooking/Recipe/CookingRecipe.gd"
 | 
			
		||||
const ItemSystem = preload("res://scripts/System/ItemSystem.gd")
 | 
			
		||||
 | 
			
		||||
func _init() -> void:
 | 
			
		||||
	super._init();
 | 
			
		||||
 | 
			
		||||
func getIngredients() -> Array[ItemStack]:
 | 
			
		||||
	return [
 | 
			
		||||
		ItemStack.new(ItemSystem.ITEM_POTION, 1)
 | 
			
		||||
	];
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cooking/Recipe/VerticalSlice.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cooking/Recipe/VerticalSlice.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://c2x1lbdtbtd00
 | 
			
		||||
							
								
								
									
										11
									
								
								scripts/Cutscene/Battle/BattleStartEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								scripts/Cutscene/Battle/BattleStartEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
class_name BattleStartEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
 | 
			
		||||
var battle:Battle;
 | 
			
		||||
 | 
			
		||||
func _init(battle:Battle):
 | 
			
		||||
	super._init();
 | 
			
		||||
	self.battle = battle;
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	super.start();
 | 
			
		||||
	getSystems().BATTLE.startBattle(self.battle);
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Battle/BattleStartEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Battle/BattleStartEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://e3ybjhvx0u1j
 | 
			
		||||
							
								
								
									
										11
									
								
								scripts/Cutscene/Cooking/CookingStartEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								scripts/Cutscene/Cooking/CookingStartEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
class_name CookingStartEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
const CookingGame = preload("res://scripts/Cooking/CookingGame.gd");
 | 
			
		||||
 | 
			
		||||
var cook:CookingGame;
 | 
			
		||||
 | 
			
		||||
func _init(cook:CookingGame) -> void:
 | 
			
		||||
	self.cook = cook;
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	getSystems().COOKING.setCookingGame(self.cook);
 | 
			
		||||
	getSystems().SCENE.setScene(SceneSystem.DawnScene.COOKING);
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Cooking/CookingStartEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Cooking/CookingStartEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://cvgjwamgxd47o
 | 
			
		||||
							
								
								
									
										42
									
								
								scripts/Cutscene/Cutscene.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								scripts/Cutscene/Cutscene.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
class_name Cutscene
 | 
			
		||||
const CutsceneEvent = preload("res://scripts/Cutscene/CutsceneEvent.gd");
 | 
			
		||||
 | 
			
		||||
var queue:Array[CutsceneEvent] = [];
 | 
			
		||||
var cutsceneSystem = null;
 | 
			
		||||
 | 
			
		||||
func setupCutscene() -> void:
 | 
			
		||||
	print_debug("Cutscene setup has not been overriden");
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func update(delta:float) -> void:
 | 
			
		||||
	if queue.size() == 0:
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	var item = queue[0]
 | 
			
		||||
	if !item.started:
 | 
			
		||||
		item.start()
 | 
			
		||||
		item.started = true
 | 
			
		||||
	
 | 
			
		||||
	item.update(delta)
 | 
			
		||||
 | 
			
		||||
	if item.isDone():
 | 
			
		||||
		item.end()
 | 
			
		||||
		queue.erase(item)
 | 
			
		||||
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func add(items:Array[CutsceneEvent]) -> void:
 | 
			
		||||
	for item in items:
 | 
			
		||||
		item.cutscene = self
 | 
			
		||||
		queue.append(item)
 | 
			
		||||
 | 
			
		||||
func clear() -> void:
 | 
			
		||||
	if queue.size() == 0:
 | 
			
		||||
		return
 | 
			
		||||
	
 | 
			
		||||
	var item = queue[0]
 | 
			
		||||
	if item.started:
 | 
			
		||||
		item.end()
 | 
			
		||||
		item.started = false
 | 
			
		||||
 | 
			
		||||
	queue.clear()
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Cutscene.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Cutscene.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://dyjbgcpycptxj
 | 
			
		||||
							
								
								
									
										32
									
								
								scripts/Cutscene/CutsceneEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								scripts/Cutscene/CutsceneEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
class_name CutsceneEvent
 | 
			
		||||
const Systems = preload("res://scripts/System/Systems.gd")
 | 
			
		||||
 | 
			
		||||
var started:bool = false;
 | 
			
		||||
var cutscene = null;
 | 
			
		||||
 | 
			
		||||
func _init() -> void:
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	started = true
 | 
			
		||||
 | 
			
		||||
func update(delta:float) -> void:
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	return true
 | 
			
		||||
 | 
			
		||||
func end() -> void:
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func reset() -> void:
 | 
			
		||||
	started = false
 | 
			
		||||
 | 
			
		||||
func getCutscene():
 | 
			
		||||
	return cutscene
 | 
			
		||||
 | 
			
		||||
func getCutsceneSystem():
 | 
			
		||||
	return cutscene.cutsceneSystem;
 | 
			
		||||
 | 
			
		||||
func getSystems() -> Systems:
 | 
			
		||||
	return getCutsceneSystem().get_node("..") as Systems;
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/CutsceneEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/CutsceneEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://chb6031ke0xeg
 | 
			
		||||
							
								
								
									
										17
									
								
								scripts/Cutscene/Event/CutsceneChangeEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								scripts/Cutscene/Event/CutsceneChangeEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
class_name CutsceneChangeEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
 | 
			
		||||
var getCutscene:Callable
 | 
			
		||||
var cutsceneNext:Cutscene
 | 
			
		||||
 | 
			
		||||
func _init(getCutscene:Callable) -> void:
 | 
			
		||||
	super._init();
 | 
			
		||||
	self.getCutscene = getCutscene;
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	super.start();
 | 
			
		||||
	self.cutsceneNext = self.getCutscene.call(self);
 | 
			
		||||
 | 
			
		||||
func end() -> void:
 | 
			
		||||
	self.cutsceneNext.setupCutscene();
 | 
			
		||||
	self.cutsceneNext.start();
 | 
			
		||||
	getSystems().CUTSCENE.setCurrentCutscene(self.cutsceneNext);
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Event/CutsceneChangeEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Event/CutsceneChangeEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://crnwlun27bocw
 | 
			
		||||
							
								
								
									
										73
									
								
								scripts/Cutscene/Event/CutsceneConcurrentEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								scripts/Cutscene/Event/CutsceneConcurrentEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,73 @@
 | 
			
		||||
class_name CutsceneConcurrentEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
 | 
			
		||||
enum ConcurrentType {
 | 
			
		||||
	SEQUENTIAL,
 | 
			
		||||
	PARALLEL,
 | 
			
		||||
	FIRST_DONE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var events:Array[CutsceneEvent] = []
 | 
			
		||||
var type:ConcurrentType = ConcurrentType.SEQUENTIAL
 | 
			
		||||
var current:int = 0
 | 
			
		||||
 | 
			
		||||
func _init(t:ConcurrentType, evts:Array[CutsceneEvent]) -> void:
 | 
			
		||||
	super._init();
 | 
			
		||||
	self.events = evts;
 | 
			
		||||
	self.type = t;
 | 
			
		||||
 | 
			
		||||
func update(delta:float) -> void:
 | 
			
		||||
	if self.type == ConcurrentType.PARALLEL:
 | 
			
		||||
		for event in self.events:
 | 
			
		||||
			if !event.started:
 | 
			
		||||
				event.start()
 | 
			
		||||
				event.started = true
 | 
			
		||||
 | 
			
		||||
			if !event.isDone():
 | 
			
		||||
				event.update(delta)
 | 
			
		||||
 | 
			
		||||
				if event.isDone():
 | 
			
		||||
					event.end()
 | 
			
		||||
 | 
			
		||||
	elif self.type == ConcurrentType.FIRST_DONE:
 | 
			
		||||
		for event in self.events:
 | 
			
		||||
			if !event.started:
 | 
			
		||||
				event.start()
 | 
			
		||||
				event.started = true
 | 
			
		||||
 | 
			
		||||
			event.update(delta)
 | 
			
		||||
 | 
			
		||||
			if event.isDone():
 | 
			
		||||
				event.end()
 | 
			
		||||
				break
 | 
			
		||||
 | 
			
		||||
	elif self.type == ConcurrentType.SEQUENTIAL:
 | 
			
		||||
		if self.current >= self.events.size():
 | 
			
		||||
			return;
 | 
			
		||||
		
 | 
			
		||||
		var evt = self.events[self.current]
 | 
			
		||||
		if !evt.started:
 | 
			
		||||
			evt.start()
 | 
			
		||||
			evt.started = true
 | 
			
		||||
 | 
			
		||||
		evt.update(delta)
 | 
			
		||||
 | 
			
		||||
		if evt.isDone():
 | 
			
		||||
			evt.end()
 | 
			
		||||
			self.current += 1
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	if self.type == ConcurrentType.SEQUENTIAL:
 | 
			
		||||
		return self.current >= self.events.size();
 | 
			
		||||
	elif self.type == ConcurrentType.PARALLEL:
 | 
			
		||||
		for evt in self.events:
 | 
			
		||||
			if !evt.isDone():
 | 
			
		||||
				return false;
 | 
			
		||||
		return true;
 | 
			
		||||
	elif self.type == ConcurrentType.FIRST_DONE:
 | 
			
		||||
		for evt in self.events:
 | 
			
		||||
			if evt.isDone():
 | 
			
		||||
				return true;
 | 
			
		||||
		return false;
 | 
			
		||||
 | 
			
		||||
	printerr("Invalid ConcurrentType")
 | 
			
		||||
	return false;
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Event/CutsceneConcurrentEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Event/CutsceneConcurrentEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://bwait88cm8pvd
 | 
			
		||||
							
								
								
									
										32
									
								
								scripts/Cutscene/Event/CutsceneIfEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								scripts/Cutscene/Event/CutsceneIfEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
class_name CutsceneIfEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
 | 
			
		||||
var eventTrue:CutsceneEvent
 | 
			
		||||
var eventFalse:CutsceneEvent
 | 
			
		||||
var condition:Callable
 | 
			
		||||
var result:bool = false
 | 
			
		||||
 | 
			
		||||
func _init(cond:Callable, evtTrue:CutsceneEvent, evtFalse:CutsceneEvent) -> void:
 | 
			
		||||
	super._init();
 | 
			
		||||
	condition = cond;
 | 
			
		||||
	eventTrue = evtTrue;
 | 
			
		||||
	eventFalse = evtFalse;
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	super.start();
 | 
			
		||||
	result = self.condition.call(self);
 | 
			
		||||
 | 
			
		||||
	if result:
 | 
			
		||||
		eventTrue.start();
 | 
			
		||||
	else:
 | 
			
		||||
		eventFalse.start();
 | 
			
		||||
 | 
			
		||||
func getEvent() -> CutsceneEvent:
 | 
			
		||||
	if result:
 | 
			
		||||
		return eventTrue;
 | 
			
		||||
	return eventFalse;
 | 
			
		||||
 | 
			
		||||
func update(delta:float) -> void:
 | 
			
		||||
	getEvent().update(delta);
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	return getEvent().isDone();
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Event/CutsceneIfEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Event/CutsceneIfEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://2txg4eswrh0q
 | 
			
		||||
							
								
								
									
										16
									
								
								scripts/Cutscene/Event/CutscenePauseEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								scripts/Cutscene/Event/CutscenePauseEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
class_name CutscenePauseEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
const PauseSystem = preload("res://scripts/System/PauseSystem.gd")
 | 
			
		||||
 | 
			
		||||
var pauseType:PauseSystem.PauseType;
 | 
			
		||||
var pauseEntities:Array = [];
 | 
			
		||||
 | 
			
		||||
func _init(
 | 
			
		||||
	type:PauseSystem.PauseType,
 | 
			
		||||
	entities:Array = [],
 | 
			
		||||
) -> void:
 | 
			
		||||
	super._init();
 | 
			
		||||
	self.pauseType = type;
 | 
			
		||||
	self.pauseEntities = entities;
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	getSystems().PAUSE.pause(self.pauseType, self.pauseEntities);
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Event/CutscenePauseEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Event/CutscenePauseEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://dj1kkm2vvvr2d
 | 
			
		||||
							
								
								
									
										10
									
								
								scripts/Cutscene/Event/CutscenePrintEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								scripts/Cutscene/Event/CutscenePrintEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
class_name CutscenePrintEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
 | 
			
		||||
var text:String = ""
 | 
			
		||||
 | 
			
		||||
func _init(text:String) -> void:
 | 
			
		||||
	super._init()
 | 
			
		||||
	self.text = text
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	print(self.text)
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Event/CutscenePrintEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Event/CutscenePrintEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://cknkpwqllg7nc
 | 
			
		||||
							
								
								
									
										13
									
								
								scripts/Cutscene/Event/CutsceneWaitEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								scripts/Cutscene/Event/CutsceneWaitEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
class_name CutsceneWaitEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
 | 
			
		||||
var wait:float = 0.0
 | 
			
		||||
 | 
			
		||||
func _init(time:float) -> void:
 | 
			
		||||
	super._init()
 | 
			
		||||
	self.wait = time
 | 
			
		||||
 | 
			
		||||
func update(delta:float) -> void:
 | 
			
		||||
	self.wait -= delta
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	return self.wait <= 0.0
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Event/CutsceneWaitEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Event/CutsceneWaitEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://cskwko5oqqq4m
 | 
			
		||||
							
								
								
									
										43
									
								
								scripts/Cutscene/Event/CutsceneWhileEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								scripts/Cutscene/Event/CutsceneWhileEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
class_name CutsceneWhileEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
 | 
			
		||||
var events:Array[CutsceneEvent] = []
 | 
			
		||||
var callback:Callable
 | 
			
		||||
var current:int = 0
 | 
			
		||||
 | 
			
		||||
func _init(callback:Callable, evt:Array[CutsceneEvent]) -> void:
 | 
			
		||||
	super._init();
 | 
			
		||||
	self.events = evt;
 | 
			
		||||
	self.callback = callback;
 | 
			
		||||
 | 
			
		||||
func shouldLoop() -> bool:
 | 
			
		||||
	return self.callback.call(self)
 | 
			
		||||
 | 
			
		||||
func update(delta:float) -> void:
 | 
			
		||||
	if self.current >= self.events.size():
 | 
			
		||||
		return;
 | 
			
		||||
	
 | 
			
		||||
	var evt = self.events[self.current]
 | 
			
		||||
	if !evt.started:
 | 
			
		||||
		evt.start()
 | 
			
		||||
		evt.started = true
 | 
			
		||||
 | 
			
		||||
	evt.update(delta)
 | 
			
		||||
 | 
			
		||||
	if evt.isDone():
 | 
			
		||||
		evt.end()
 | 
			
		||||
		self.current += 1
 | 
			
		||||
 | 
			
		||||
	if self.current < self.events.size():
 | 
			
		||||
		return
 | 
			
		||||
	
 | 
			
		||||
	if !self.shouldLoop():
 | 
			
		||||
		return
 | 
			
		||||
	
 | 
			
		||||
	self.current = 0
 | 
			
		||||
	for event in self.events:
 | 
			
		||||
		event.reset()
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	if self.shouldLoop():
 | 
			
		||||
		return false;
 | 
			
		||||
	return self.current >= self.events.size();
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Event/CutsceneWhileEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Event/CutsceneWhileEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://cx4uqll85m28i
 | 
			
		||||
@@ -0,0 +1,13 @@
 | 
			
		||||
class_name OverworldChangeDirectionEvent extends "res://scripts/Cutscene/Event/Entity/OverworldEntityEvent.gd"
 | 
			
		||||
 | 
			
		||||
var direction:OverworldEntity.Direction;
 | 
			
		||||
 | 
			
		||||
func _init(
 | 
			
		||||
	entity:OverworldEntity,
 | 
			
		||||
	direction:OverworldEntity.Direction,
 | 
			
		||||
) -> void:
 | 
			
		||||
	super._init(entity);
 | 
			
		||||
	self.direction = direction;
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	entity.direction = direction;
 | 
			
		||||
@@ -0,0 +1 @@
 | 
			
		||||
uid://cu82did0twmkm
 | 
			
		||||
							
								
								
									
										10
									
								
								scripts/Cutscene/Event/Entity/OverworldEntityEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								scripts/Cutscene/Event/Entity/OverworldEntityEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
class_name OverworldEntityEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
const OverworldEntity = preload("res://scripts/Entities/OverworldEntity.gd");
 | 
			
		||||
 | 
			
		||||
var entity:OverworldEntity;
 | 
			
		||||
 | 
			
		||||
func _init(
 | 
			
		||||
	entity:OverworldEntity,
 | 
			
		||||
) -> void:
 | 
			
		||||
	super._init();
 | 
			
		||||
	self.entity = entity;
 | 
			
		||||
@@ -0,0 +1 @@
 | 
			
		||||
uid://dmmguqphbe34j
 | 
			
		||||
							
								
								
									
										15
									
								
								scripts/Cutscene/Event/VisualNovel/TextboxEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								scripts/Cutscene/Event/VisualNovel/TextboxEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
class_name TextboxEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
 | 
			
		||||
 | 
			
		||||
var text:String;
 | 
			
		||||
 | 
			
		||||
func _init(
 | 
			
		||||
	text:String
 | 
			
		||||
) -> void:
 | 
			
		||||
	super._init();
 | 
			
		||||
	self.text = text;
 | 
			
		||||
 | 
			
		||||
func start() -> void:
 | 
			
		||||
	getSystems().VN.getTextbox().setText(self.text);
 | 
			
		||||
 | 
			
		||||
func isDone() -> bool:
 | 
			
		||||
	return getSystems().VN.getTextbox().isClosed;
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Event/VisualNovel/TextboxEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Event/VisualNovel/TextboxEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://dypv7erj66kbs
 | 
			
		||||
							
								
								
									
										29
									
								
								scripts/Cutscene/Scene/OverworldConversationEvent.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								scripts/Cutscene/Scene/OverworldConversationEvent.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
class_name OverworldConversationEvent extends "res://scripts/Cutscene/Cutscene.gd"
 | 
			
		||||
const OverworldEntity = preload("res://scripts/Entities/OverworldEntity.gd");
 | 
			
		||||
const TextboxEvent = preload("res://scripts/Cutscene/Event/VisualNovel/TextboxEvent.gd");
 | 
			
		||||
const PauseEvent = preload("res://scripts/Cutscene/Event/CutscenePauseEvent.gd");
 | 
			
		||||
const OverworldChangeDirectionEvent = preload("res://scripts/Cutscene/Event/Entity/OverworldChangeDirectionEvent.gd");
 | 
			
		||||
 | 
			
		||||
var speaker:OverworldEntity;
 | 
			
		||||
var interacted:OverworldEntity;
 | 
			
		||||
var texts:Array[String];
 | 
			
		||||
 | 
			
		||||
func _init(speaker:OverworldEntity, interacted:OverworldEntity, texts:Array[String]) -> void:
 | 
			
		||||
	self.speaker = speaker;
 | 
			
		||||
	self.interacted = interacted;
 | 
			
		||||
	self.texts = texts;
 | 
			
		||||
 | 
			
		||||
func setupCutscene() -> void:
 | 
			
		||||
	var dirSpeaker = speaker.getDirectionToFace(interacted.position);
 | 
			
		||||
	var dirInteracted = interacted.getDirectionToFace(speaker.position);
 | 
			
		||||
	
 | 
			
		||||
	add([
 | 
			
		||||
		OverworldChangeDirectionEvent.new(speaker, dirSpeaker),
 | 
			
		||||
		OverworldChangeDirectionEvent.new(interacted, dirInteracted),
 | 
			
		||||
		PauseEvent.new(PauseSystem.PauseType.ENTITY_PAUSED, [ speaker, interacted ]),
 | 
			
		||||
	]);
 | 
			
		||||
	
 | 
			
		||||
	for text in texts:
 | 
			
		||||
		add([ TextboxEvent.new(text) ]);
 | 
			
		||||
	
 | 
			
		||||
	add([ PauseEvent.new(PauseSystem.PauseType.NOT_PAUSED) ]);
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/Scene/OverworldConversationEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/Scene/OverworldConversationEvent.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://cywuvoi5v4fe3
 | 
			
		||||
							
								
								
									
										10
									
								
								scripts/Cutscene/TestCutscene.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								scripts/Cutscene/TestCutscene.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
class_name TestCutscene extends "res://scripts/Cutscene/Scene/OverworldConversationEvent.gd"
 | 
			
		||||
 | 
			
		||||
func _init(speaker:OverworldEntity, interacted:OverworldEntity ) -> void:
 | 
			
		||||
	super(
 | 
			
		||||
		speaker,
 | 
			
		||||
		interacted,
 | 
			
		||||
		[
 | 
			
		||||
			"Hello"
 | 
			
		||||
		]
 | 
			
		||||
	);
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Cutscene/TestCutscene.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Cutscene/TestCutscene.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://btxgv85qst1jy
 | 
			
		||||
							
								
								
									
										55
									
								
								scripts/Entities/BasicNPCEntity.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								scripts/Entities/BasicNPCEntity.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,55 @@
 | 
			
		||||
class_name BasicNPCEntity extends "res://scripts/Entities/OverworldEntity.gd"
 | 
			
		||||
const Cutscene = preload("res://scripts/Cutscene/Cutscene.gd");
 | 
			
		||||
const OverworldConversationEvent = preload("res://scripts/Cutscene/Scene/OverworldConversationEvent.gd");
 | 
			
		||||
 | 
			
		||||
enum BasicNPCInteractType {
 | 
			
		||||
	NONE,
 | 
			
		||||
	CUTSCENE,
 | 
			
		||||
	TEXTS
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
enum BasicNPCMoveType {
 | 
			
		||||
	STILL,
 | 
			
		||||
	RANDOM_LOOK
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@export var interactType:BasicNPCInteractType = BasicNPCInteractType.NONE;
 | 
			
		||||
@export var interactCutscene:GDScript;
 | 
			
		||||
@export var interactTexts:Array[String];
 | 
			
		||||
 | 
			
		||||
@export var moveType:BasicNPCMoveType = BasicNPCMoveType.STILL;
 | 
			
		||||
 | 
			
		||||
@export var randomLookMinTime:float = 1.5;
 | 
			
		||||
@export var randomLookMaxTime:float = 4.0;
 | 
			
		||||
var randomLookTimer:float = 0.0;
 | 
			
		||||
 | 
			
		||||
func interact(interactor:OverworldEntity) -> void:
 | 
			
		||||
	if interactType == BasicNPCInteractType.NONE:
 | 
			
		||||
		return
 | 
			
		||||
		
 | 
			
		||||
	if interactType == BasicNPCInteractType.CUTSCENE:
 | 
			
		||||
		# Cutscene in this manner must take two entities
 | 
			
		||||
		# (self, speaker, and interactor, player)
 | 
			
		||||
		var cs:Cutscene = interactCutscene.new(self, interactor);
 | 
			
		||||
		getSystems().CUTSCENE.setCurrentCutscene(cs);
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	if interactType == BasicNPCInteractType.TEXTS:
 | 
			
		||||
		var cs:Cutscene = OverworldConversationEvent.new(self, interactor, interactTexts);
 | 
			
		||||
		getSystems().CUTSCENE.setCurrentCutscene(cs);
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func updateMovement(delta:float) -> void:
 | 
			
		||||
	if moveType == BasicNPCMoveType.STILL:
 | 
			
		||||
		return
 | 
			
		||||
 | 
			
		||||
	if moveType == BasicNPCMoveType.RANDOM_LOOK:
 | 
			
		||||
		randomLookTimer -= delta;
 | 
			
		||||
		if randomLookTimer <= 0:
 | 
			
		||||
			randomLookTimer = randf_range(randomLookMinTime, randomLookMaxTime);
 | 
			
		||||
			self.direction = randi_range(0, 3);
 | 
			
		||||
		return
 | 
			
		||||
	
 | 
			
		||||
	pass
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Entities/BasicNPCEntity.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Entities/BasicNPCEntity.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://d23qg1ovkbxst
 | 
			
		||||
							
								
								
									
										176
									
								
								scripts/Entities/OverworldEntity.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										176
									
								
								scripts/Entities/OverworldEntity.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,176 @@
 | 
			
		||||
class_name OverworldEntity extends CharacterBody3D
 | 
			
		||||
 | 
			
		||||
const PauseSystem = preload("res://scripts/System/PauseSystem.gd")
 | 
			
		||||
 | 
			
		||||
enum Direction {
 | 
			
		||||
	NORTH,
 | 
			
		||||
	EAST,
 | 
			
		||||
	SOUTH,
 | 
			
		||||
	WEST,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var speed:float = 150;
 | 
			
		||||
var friction:float = 8.5;
 | 
			
		||||
var gravity:float = 30;
 | 
			
		||||
 | 
			
		||||
@export var direction = Direction.SOUTH:
 | 
			
		||||
	set(newDirection):
 | 
			
		||||
		direction = newDirection;
 | 
			
		||||
		_updateMaterial();
 | 
			
		||||
 | 
			
		||||
var meshInstance:MeshInstance3D;
 | 
			
		||||
var underFootTile:int = -1;
 | 
			
		||||
var underFootPosition:Vector3;
 | 
			
		||||
 | 
			
		||||
var withinMapBounds:MapBounds;
 | 
			
		||||
var withinBoundsLastFrame:bool = true;
 | 
			
		||||
 | 
			
		||||
func _updateMaterial():
 | 
			
		||||
	if !meshInstance:
 | 
			
		||||
		return
 | 
			
		||||
	var material:ShaderMaterial = meshInstance.get_surface_override_material(0)
 | 
			
		||||
	if !material:
 | 
			
		||||
		return
 | 
			
		||||
	material.set_shader_parameter("direction", direction)
 | 
			
		||||
 | 
			
		||||
func getSystems() -> Systems:
 | 
			
		||||
	return get_tree().current_scene.get_node("Systems") as Systems;
 | 
			
		||||
 | 
			
		||||
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);
 | 
			
		||||
	return Vector3(0, 0, 0);
 | 
			
		||||
	
 | 
			
		||||
func getDirectionToFace(position:Vector3) -> Direction:
 | 
			
		||||
	var diff = position - self.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;
 | 
			
		||||
 | 
			
		||||
# Virtual Methods
 | 
			
		||||
func updateMovement(delta) -> void:
 | 
			
		||||
	pass
 | 
			
		||||
	
 | 
			
		||||
func updateOverworldLogic(delta) -> void:
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func isPaused() -> bool:
 | 
			
		||||
	var pause = getSystems().PAUSE;
 | 
			
		||||
	var ps = pause.getPauseState();
 | 
			
		||||
 | 
			
		||||
	if ps == PauseSystem.PauseType.NOT_PAUSED:
 | 
			
		||||
		return false;
 | 
			
		||||
	elif ps == PauseSystem.PauseType.FULLY_PAUSED:
 | 
			
		||||
		return true;
 | 
			
		||||
	elif ps == PauseSystem.PauseType.ENTITY_PAUSED:
 | 
			
		||||
		if pause.entities.find(self) != -1:
 | 
			
		||||
			return true;
 | 
			
		||||
		return false
 | 
			
		||||
	elif ps == PauseSystem.PauseType.CUTSCENE_PAUSED:
 | 
			
		||||
		if pause.entities.find(self) != -1:
 | 
			
		||||
			return false;
 | 
			
		||||
		return true;
 | 
			
		||||
	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;
 | 
			
		||||
 | 
			
		||||
# Events
 | 
			
		||||
func _ready() -> void:
 | 
			
		||||
	meshInstance = get_node("MeshInstance3D")
 | 
			
		||||
	_updateTileData();
 | 
			
		||||
	_updateMaterial();
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func _process(delta:float) -> void:
 | 
			
		||||
	if isPaused():
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	# Handle entity leaving map bounds
 | 
			
		||||
	if !withinMapBounds:
 | 
			
		||||
		if !withinBoundsLastFrame:
 | 
			
		||||
			print("Entity ", self.name, " was out of map bounds for two frames");
 | 
			
		||||
		withinBoundsLastFrame = false;
 | 
			
		||||
	else:
 | 
			
		||||
		withinBoundsLastFrame = true;
 | 
			
		||||
	
 | 
			
		||||
	# Update logic
 | 
			
		||||
	updateOverworldLogic(delta)
 | 
			
		||||
 | 
			
		||||
func _physics_process(delta: float) -> void:
 | 
			
		||||
	if isPaused():
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	# Update movement
 | 
			
		||||
	updateMovement(delta);
 | 
			
		||||
 | 
			
		||||
	# Gravity and friction
 | 
			
		||||
	if !is_on_floor():
 | 
			
		||||
		velocity.y -= gravity * delta;
 | 
			
		||||
	else:
 | 
			
		||||
		velocity += -(velocity * friction * delta);
 | 
			
		||||
		if velocity.length() != 0:
 | 
			
		||||
			_updateTileData();
 | 
			
		||||
	
 | 
			
		||||
	# Update character controller.
 | 
			
		||||
	move_and_slide();
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Entities/OverworldEntity.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Entities/OverworldEntity.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://bpwbaptqu4bm5
 | 
			
		||||
							
								
								
									
										24
									
								
								scripts/Entities/RosaCamera.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								scripts/Entities/RosaCamera.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
extends Camera3D
 | 
			
		||||
 | 
			
		||||
const PIXEL_SCALE:float = 4.0;
 | 
			
		||||
const WORLD_UNITS:float = 32.0;
 | 
			
		||||
 | 
			
		||||
func _ready() -> void:
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
func _process(delta: float) -> void:
 | 
			
		||||
	var z:float = (
 | 
			
		||||
		tan((deg_to_rad(180) - deg_to_rad(fov)) / 2.0) *
 | 
			
		||||
		(get_viewport().size.y / 2.0)
 | 
			
		||||
	) / PIXEL_SCALE / WORLD_UNITS;
 | 
			
		||||
	
 | 
			
		||||
	var rosa = get_node("..");
 | 
			
		||||
	var look = rosa.position;
 | 
			
		||||
	var position = Vector3(0, 0, 2) + look;
 | 
			
		||||
	look_at_from_position(
 | 
			
		||||
		Vector3(position.x, position.y + z, position.z),
 | 
			
		||||
		look
 | 
			
		||||
	);
 | 
			
		||||
 | 
			
		||||
	pass
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Entities/RosaCamera.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Entities/RosaCamera.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://jd50n00bo05y
 | 
			
		||||
							
								
								
									
										51
									
								
								scripts/Entities/RosaController.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								scripts/Entities/RosaController.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
			
		||||
class_name RosaController extends "res://scripts/Entities/OverworldEntity.gd"
 | 
			
		||||
 | 
			
		||||
var interactRange = 0.7;
 | 
			
		||||
 | 
			
		||||
func updateOverworldLogic(delta) -> void:
 | 
			
		||||
	# Check if interact button is pressed
 | 
			
		||||
	if(Input.is_action_just_pressed("interact")):
 | 
			
		||||
		var rayDirection = getDirectionVector();
 | 
			
		||||
		# cast ray
 | 
			
		||||
		
 | 
			
		||||
		var query = PhysicsRayQueryParameters3D.create(
 | 
			
		||||
			position,
 | 
			
		||||
			position + (rayDirection * interactRange)
 | 
			
		||||
		)
 | 
			
		||||
		query.collide_with_areas = true
 | 
			
		||||
		query.exclude = [self]
 | 
			
		||||
 | 
			
		||||
		var result = get_world_3d().direct_space_state.intersect_ray(query)
 | 
			
		||||
		if result and result.collider:
 | 
			
		||||
			var collider = result.collider
 | 
			
		||||
			if(collider.has_method("interact")):
 | 
			
		||||
				collider.interact(self)
 | 
			
		||||
 | 
			
		||||
	if Input.is_action_just_pressed("pause"):
 | 
			
		||||
		getSystems().PAUSE.playerPauseToggle();
 | 
			
		||||
 | 
			
		||||
func updateMovement(delta) -> void:
 | 
			
		||||
	# User movement
 | 
			
		||||
	var dir:Vector2 = Input.get_vector("left", "right", "up", "down");
 | 
			
		||||
	if(dir.x != 0 or dir.y != 0):
 | 
			
		||||
		velocity.x = dir.x * speed * delta;
 | 
			
		||||
		velocity.z = dir.y * speed * delta;
 | 
			
		||||
		
 | 
			
		||||
		# Update direction
 | 
			
		||||
		if(dir.x >= abs(dir.y) and(
 | 
			
		||||
			dir.y == 0 or
 | 
			
		||||
			(dir.y > 0 and direction != Direction.SOUTH) or
 | 
			
		||||
			(dir.y < 0 and direction != Direction.NORTH)
 | 
			
		||||
		)):
 | 
			
		||||
			direction = Direction.EAST;
 | 
			
		||||
		elif (dir.x <= -abs(dir.y) and (
 | 
			
		||||
			dir.y == 0 or
 | 
			
		||||
			(dir.y > 0 and direction != Direction.SOUTH) or
 | 
			
		||||
			(dir.y < 0 and direction != Direction.NORTH)
 | 
			
		||||
		)):
 | 
			
		||||
			direction = Direction.WEST;
 | 
			
		||||
		elif (dir.y > 0):
 | 
			
		||||
			direction = Direction.SOUTH;
 | 
			
		||||
		elif (dir.y < 0):
 | 
			
		||||
			direction = Direction.NORTH;
 | 
			
		||||
	pass
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Entities/RosaController.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Entities/RosaController.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://ixwikdguyhf0
 | 
			
		||||
							
								
								
									
										36
									
								
								scripts/Item/Item.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								scripts/Item/Item.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
class_name Item
 | 
			
		||||
	
 | 
			
		||||
enum ItemCategory {
 | 
			
		||||
	MEDICINE,
 | 
			
		||||
	KEY_ITEM,
 | 
			
		||||
	INGREDIENT
 | 
			
		||||
};
 | 
			
		||||
	
 | 
			
		||||
func getName() -> String:
 | 
			
		||||
	push_error("getName() must be overridden in derived classes");
 | 
			
		||||
	return "";
 | 
			
		||||
 | 
			
		||||
func isStackable() -> bool:
 | 
			
		||||
	return true;
 | 
			
		||||
 | 
			
		||||
func isDroppable() -> bool:
 | 
			
		||||
	return true;
 | 
			
		||||
 | 
			
		||||
func isSellable() -> bool:
 | 
			
		||||
	return true;
 | 
			
		||||
 | 
			
		||||
func getSellPrice() -> int:
 | 
			
		||||
	return 0;
 | 
			
		||||
 | 
			
		||||
func getBuyPrice() -> int:
 | 
			
		||||
	return 0;
 | 
			
		||||
 | 
			
		||||
func isConsumable() -> bool:
 | 
			
		||||
	return false;
 | 
			
		||||
 | 
			
		||||
func consume() -> void:
 | 
			
		||||
	pass
 | 
			
		||||
	
 | 
			
		||||
func getCategory() -> ItemCategory:
 | 
			
		||||
	push_error("getCategory() must be overriden in derived class");
 | 
			
		||||
	return ItemCategory.MEDICINE;
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Item/Item.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Item/Item.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://c6t5tprnd23t0
 | 
			
		||||
							
								
								
									
										8
									
								
								scripts/Item/ItemStack.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								scripts/Item/ItemStack.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
class_name ItemStack
 | 
			
		||||
 | 
			
		||||
var item:Item;
 | 
			
		||||
var quantity:int;
 | 
			
		||||
 | 
			
		||||
func _init(item:Item, quantity:int = 1):
 | 
			
		||||
	self.item = item;
 | 
			
		||||
	self.quantity = quantity;
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Item/ItemStack.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Item/ItemStack.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://re7dg4hpp804
 | 
			
		||||
							
								
								
									
										13
									
								
								scripts/Item/Potion.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								scripts/Item/Potion.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
class_name Potion extends "res://scripts/Item/Item.gd"
 | 
			
		||||
 | 
			
		||||
func getName() -> String:
 | 
			
		||||
	return "Potion"
 | 
			
		||||
 | 
			
		||||
func getCategory() -> ItemCategory:
 | 
			
		||||
	return ItemCategory.MEDICINE;
 | 
			
		||||
 | 
			
		||||
func isConsumable() -> bool:
 | 
			
		||||
	return true;
 | 
			
		||||
 | 
			
		||||
func consume() -> void:
 | 
			
		||||
	print("Consuming Potion");
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Item/Potion.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Item/Potion.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://dpns5iesd08rl
 | 
			
		||||
							
								
								
									
										15
									
								
								scripts/MapBounds.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								scripts/MapBounds.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
extends Area3D
 | 
			
		||||
class_name MapBounds
 | 
			
		||||
 | 
			
		||||
func _ready() -> void:
 | 
			
		||||
	pass
 | 
			
		||||
 | 
			
		||||
func _on_body_entered(body: Node3D) -> void:
 | 
			
		||||
	if (!body is OverworldEntity):
 | 
			
		||||
		return
 | 
			
		||||
	(body as OverworldEntity).withinMapBounds = self;
 | 
			
		||||
 | 
			
		||||
func _on_body_exited(body: Node3D) -> void:
 | 
			
		||||
	if (!body is OverworldEntity):
 | 
			
		||||
		return
 | 
			
		||||
	(body as OverworldEntity).withinMapBounds = null;
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/MapBounds.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/MapBounds.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://dbah1pmk8jola
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/OverworldEntity.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/OverworldEntity.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://dr3asofxu1pep
 | 
			
		||||
							
								
								
									
										8
									
								
								scripts/Quest/Objective/QuestObjective.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								scripts/Quest/Objective/QuestObjective.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
class_name QuestObjective
 | 
			
		||||
 | 
			
		||||
var name:String
 | 
			
		||||
 | 
			
		||||
func _init(
 | 
			
		||||
	name:String
 | 
			
		||||
):
 | 
			
		||||
	self.name = name;
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Quest/Objective/QuestObjective.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Quest/Objective/QuestObjective.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://bakmt6ufpq33o
 | 
			
		||||
							
								
								
									
										36
									
								
								scripts/Quest/Quest.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								scripts/Quest/Quest.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
class_name Quest
 | 
			
		||||
const QuestObjective = preload("res://scripts/Quest/Objective/QuestObjective.gd");
 | 
			
		||||
 | 
			
		||||
enum QuestState {
 | 
			
		||||
	NOT_STARTED,
 | 
			
		||||
	ACTIVE,
 | 
			
		||||
	INACTIVE,
 | 
			
		||||
	FINISHED
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
var questName:String;
 | 
			
		||||
var questState:QuestState = QuestState.NOT_STARTED;
 | 
			
		||||
var objectives:Array[QuestObjective] = [];
 | 
			
		||||
var currentObjective = -1;
 | 
			
		||||
 | 
			
		||||
func _init(
 | 
			
		||||
	questName:String,
 | 
			
		||||
	objectives:Array[QuestObjective]
 | 
			
		||||
) -> void:
 | 
			
		||||
	self.questName = questName;
 | 
			
		||||
	self.objectives = objectives;
 | 
			
		||||
 | 
			
		||||
func getState() -> QuestState:
 | 
			
		||||
	return questState;
 | 
			
		||||
 | 
			
		||||
func start():
 | 
			
		||||
	print("Starting quest: " + questName);
 | 
			
		||||
	questState = QuestState.ACTIVE;
 | 
			
		||||
	currentObjective = 0;
 | 
			
		||||
	
 | 
			
		||||
func nextObjective():
 | 
			
		||||
	currentObjective = currentObjective + 1;
 | 
			
		||||
	if currentObjective >= objectives.size():
 | 
			
		||||
		questState = QuestState.FINISHED;
 | 
			
		||||
		return null;
 | 
			
		||||
	return objectives[currentObjective];
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Quest/Quest.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Quest/Quest.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://kuxak18kbjr5
 | 
			
		||||
							
								
								
									
										6
									
								
								scripts/Quest/QuestExample.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								scripts/Quest/QuestExample.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
class_name QuestExample extends "res://scripts/Quest/Quest.gd"
 | 
			
		||||
 | 
			
		||||
func _init() -> void:
 | 
			
		||||
	super("Example Quest", [
 | 
			
		||||
		QuestObjective.new("Test")
 | 
			
		||||
	]);
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Quest/QuestExample.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Quest/QuestExample.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://cg3piglr8rbfs
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/RosaCamera.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/RosaCamera.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://cubx2asrudfyp
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/RosaController.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/RosaController.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://dnls1370w0gr4
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Scenes/CookingScene.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Scenes/CookingScene.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
class_name CookingScene extends Node3D
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Scenes/CookingScene.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Scenes/CookingScene.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://ckxjs4wty6sju
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Scenes/CuttingScene.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Scenes/CuttingScene.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
class_name CuttingScene extends Node3D
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Scenes/CuttingScene.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Scenes/CuttingScene.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://kwnx0enmgk54
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Scenes/OverworldScene.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Scenes/OverworldScene.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
class_name OverworldScene extends Node3D
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Scenes/OverworldScene.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Scenes/OverworldScene.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://pcncoc6wum4q
 | 
			
		||||
							
								
								
									
										10
									
								
								scripts/Scenes/RootScene.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								scripts/Scenes/RootScene.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
class_name RootScene extends Node3D
 | 
			
		||||
const Systems = preload("res://scripts/System/Systems.gd");
 | 
			
		||||
const SceneSystem = preload("res://scripts/System/SceneSystem.gd");
 | 
			
		||||
 | 
			
		||||
var systems:Systems;
 | 
			
		||||
 | 
			
		||||
func _ready() -> void:
 | 
			
		||||
	print("Game started");
 | 
			
		||||
	systems = $Systems;
 | 
			
		||||
	systems.SCENE.setScene(SceneSystem.DawnScene.OVERWORLD);
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Scenes/RootScene.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Scenes/RootScene.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://cj4jxqpykhteg
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Scenes/UIScene.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Scenes/UIScene.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
class_name UIScene extends Control
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/Scenes/UIScene.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/Scenes/UIScene.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://vjr7s045ri4a
 | 
			
		||||
							
								
								
									
										11
									
								
								scripts/System/BattleSystem.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								scripts/System/BattleSystem.gd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
class_name BattleSystem extends Node
 | 
			
		||||
const Battle = preload("res://scripts/Battle/Battle.gd");
 | 
			
		||||
 | 
			
		||||
var battle:Battle = null;
 | 
			
		||||
 | 
			
		||||
func getSystems():
 | 
			
		||||
	return get_tree().current_scene.get_node("Systems");
 | 
			
		||||
 | 
			
		||||
func startBattle(battle:Battle) -> void:
 | 
			
		||||
	print("start battle");
 | 
			
		||||
	self.battle = battle;
 | 
			
		||||
							
								
								
									
										1
									
								
								scripts/System/BattleSystem.gd.uid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scripts/System/BattleSystem.gd.uid
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
uid://mr6i8copcn37
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user