[gd_scene format=3 uid="uid://rs3hv73svbpa"]

[ext_resource type="Script" uid="uid://4mg67crlim53" path="res://player/player.gd" id="1_h2yge"]
[ext_resource type="Script" uid="uid://ii8ai801jur2" path="res://player/camera_rig.gd" id="2_1bvp3"]
[ext_resource type="Script" uid="uid://dbb25ttlyogqr" path="res://simulation/SimulationManager.gd" id="3_lquwl"]
[ext_resource type="Script" uid="uid://c1f3b26n4yntf" path="res://world/world_view_manager.gd" id="4_1bvp3"]
[ext_resource type="PackedScene" uid="uid://dhxxyprqflotq" path="res://player/npc/NpcVisual.tscn" id="5_lquwl"]
[ext_resource type="Script" uid="uid://cjvbgqx8rao0t" path="res://world/ui/ui.gd" id="6_7mycd"]
[ext_resource type="Script" uid="uid://bbwol3mrjgn2x" path="res://world/active_world_adapter.gd" id="9_adapter"]
[ext_resource type="Script" path="res://simulation/persistence/SaveSlotController.gd" id="10_save"]
[ext_resource type="PackedScene" path="res://world/jajce/JajceWorld.tscn" id="11_jajce"]
[ext_resource type="Script" path="res://world/ui/time_dial.gd" id="12_timedial"]
[ext_resource type="Script" path="res://world/demo/DemoController.gd" id="13_demo"]

[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_o5qli"]
radius = 0.4
height = 1.7

[sub_resource type="CapsuleMesh" id="CapsuleMesh_sgp6g"]

[sub_resource type="BoxMesh" id="BoxMesh_0wfyh"]

[node name="Main" type="Node3D" unique_id=1850341560]

[node name="JajceWorld" parent="." instance=ExtResource("11_jajce")]

[node name="Player" type="CharacterBody3D" parent="." unique_id=2022843760 node_paths=PackedStringArray("camera_rig", "simulation_manager", "pantry_storage", "guard_site", "study_site")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
script = ExtResource("1_h2yge")
camera_rig = NodePath("../CameraRig")
simulation_manager = NodePath("../SimulationManager")
pantry_storage = NodePath("../JajceWorld/WorldObjects/StorageSites/VillagePantry")
guard_site = NodePath("../JajceWorld/WorldObjects/ActivitySites/GuardPost")
study_site = NodePath("../JajceWorld/WorldObjects/ActivitySites/StudyDesk")
stomach_capacity_for_food = 10

[node name="CollisionShape3D" type="CollisionShape3D" parent="Player" unique_id=1249497228]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.85, 0)
shape = SubResource("CapsuleShape3D_o5qli")

[node name="MeshInstance3D" type="MeshInstance3D" parent="Player" unique_id=935946019]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.85, 0)
mesh = SubResource("CapsuleMesh_sgp6g")

[node name="FaceMarker" type="MeshInstance3D" parent="Player" unique_id=1558899356]
transform = Transform3D(0.15, 0, 0, 0, 0.15, 0, 0, 0, 0.4, 0, 1.2, 0.6266626)
mesh = SubResource("BoxMesh_0wfyh")

[node name="CameraRig" type="Node3D" parent="." unique_id=81378719 node_paths=PackedStringArray("target")]
transform = Transform3D(1, 0, 0, 0, 0.57357645, 0.81915206, 0, -0.81915206, 0.57357645, 0, 10, 8)
script = ExtResource("2_1bvp3")
target = NodePath("../Player")
follow_speed = 8.0
deadzone_right = 2.0
deadzone_forward = 2.0

[node name="Camera3D" type="Camera3D" parent="CameraRig" unique_id=1992528776]
current = true
fov = 65.0

[node name="ActiveWorldAdapter" type="Node" parent="." node_paths=PackedStringArray("pantry_storage")]
script = ExtResource("9_adapter")
pantry_storage = NodePath("../JajceWorld/WorldObjects/StorageSites/VillagePantry")

[node name="SimulationManager" type="Node" parent="." unique_id=1099676814 node_paths=PackedStringArray("active_world_adapter")]
script = ExtResource("3_lquwl")
active_world_adapter = NodePath("../ActiveWorldAdapter")

[node name="SaveSlotController" type="Node" parent="." node_paths=PackedStringArray("simulation_manager")]
script = ExtResource("10_save")
simulation_manager = NodePath("../SimulationManager")

[node name="WorldViewManager" type="Node" parent="." unique_id=763982891 node_paths=PackedStringArray("simulation_manager", "active_npcs_parent")]
script = ExtResource("4_1bvp3")
npc_visual_scene = ExtResource("5_lquwl")
simulation_manager = NodePath("../SimulationManager")
active_npcs_parent = NodePath("../ActiveNPCs")

[node name="EventBus" type="Node" parent="." unique_id=1149294963]

[node name="ActiveNPCs" type="Node3D" parent="." unique_id=88374680]

[node name="UI" type="CanvasLayer" parent="." unique_id=875790201 node_paths=PackedStringArray("simulation_manager")]
script = ExtResource("6_7mycd")
simulation_manager = NodePath("../SimulationManager")

[node name="DemoController" type="Node" parent="." node_paths=PackedStringArray("ui", "active_npcs_parent")]
script = ExtResource("13_demo")
ui = NodePath("../UI")
active_npcs_parent = NodePath("../ActiveNPCs")

[node name="VillagePanel" type="PanelContainer" parent="UI" unique_id=482126250]
offset_left = 20.0
offset_top = 20.0
offset_right = 280.0
offset_bottom = 140.0

[node name="MarginContainer" type="MarginContainer" parent="UI/VillagePanel" unique_id=60382506]
layout_mode = 2
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 4

[node name="VillageStatsLabel" type="Label" parent="UI/VillagePanel/MarginContainer" unique_id=1554319259]
layout_mode = 2
theme_override_font_sizes/font_size = 10

[node name="NpcInspectorPanel" type="PanelContainer" parent="UI"]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -370.0
offset_top = 20.0
offset_right = -20.0
offset_bottom = 330.0
grow_horizontal = 0

[node name="MarginContainer" type="MarginContainer" parent="UI/NpcInspectorPanel"]
layout_mode = 2
theme_override_constants/margin_left = 16
theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 16
theme_override_constants/margin_bottom = 12

[node name="NpcInspectorLabel" type="Label" parent="UI/NpcInspectorPanel/MarginContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.96, 0.91, 0.78, 1)
theme_override_font_sizes/font_size = 15
text = "Villager inspector"

[node name="TimeDial" type="Control" parent="UI" node_paths=PackedStringArray("day_night_cycle")]
layout_mode = 0
offset_left = 880.0
offset_top = 6.0
offset_right = 940.0
offset_bottom = 66.0
script = ExtResource("12_timedial")
day_night_cycle = NodePath("../JajceWorld/DayNightCycle")
