[gd_scene load_steps=21 format=3]

[ext_resource type="Terrain3DAssets" path="res://terrain/jajce/assets.tres" id="1_assets"]
[ext_resource type="PackedScene" path="res://world/resource_nodes/ResourceNode.tscn" id="2_resource"]
[ext_resource type="Script" path="res://world/jajce/jajce_world.gd" id="3_world"]

[sub_resource type="Terrain3DMaterial" id="Terrain3DMaterial_jajce"]
world_background = 0
auto_shader = true

[sub_resource type="NavigationMesh" id="NavigationMesh_greybox"]
vertices = PackedVector3Array(-14.5, 0.5, 0, -1, 0.5, 0, -1, 0.5, -0.75, 0, 0.5, -1, 0, 0.5, -14.5, -14.5, 0.5, -14.5, 0.75, 0.5, -1, 0.75, 0.75, -0.5, 14.5, 0.5, -0.5, 14.5, 0.5, -14.5, 0.75, 0.75, 0, 0, 1, 0, 0, 0.75, 0.75, -0.5, 0.75, 0.75, -0.5, 0.5, 14.5, 14.5, 0.5, 14.5, -1, 0.5, 0.75, -14.5, 0.5, 14.5)
polygons = [PackedInt32Array(2, 1, 0), PackedInt32Array(3, 2, 4), PackedInt32Array(4, 2, 5), PackedInt32Array(5, 2, 0), PackedInt32Array(6, 3, 4), PackedInt32Array(8, 7, 6), PackedInt32Array(8, 6, 9), PackedInt32Array(9, 6, 4), PackedInt32Array(12, 11, 10), PackedInt32Array(10, 7, 8), PackedInt32Array(14, 13, 12), PackedInt32Array(10, 8, 12), PackedInt32Array(12, 8, 14), PackedInt32Array(14, 8, 15), PackedInt32Array(0, 1, 16), PackedInt32Array(16, 13, 14), PackedInt32Array(14, 17, 16), PackedInt32Array(16, 17, 0)]

[sub_resource type="StandardMaterial3D" id="Material_ground"]
albedo_color = Color(0.24, 0.48, 0.25, 1)

[sub_resource type="StandardMaterial3D" id="Material_ridge"]
albedo_color = Color(0.34, 0.31, 0.27, 1)

[sub_resource type="StandardMaterial3D" id="Material_terrace"]
albedo_color = Color(0.42, 0.5, 0.29, 1)

[sub_resource type="StandardMaterial3D" id="Material_water"]
albedo_color = Color(0.16, 0.43, 0.62, 0.78)
transparency = 1

[sub_resource type="StandardMaterial3D" id="Material_building"]
albedo_color = Color(0.62, 0.48, 0.32, 1)

[sub_resource type="BoxMesh" id="Mesh_ground"]
material = SubResource("Material_ground")
size = Vector3(64, 0.2, 64)

[sub_resource type="BoxShape3D" id="Shape_ground"]
size = Vector3(64, 0.2, 64)

[sub_resource type="BoxMesh" id="Mesh_ridge"]
material = SubResource("Material_ridge")
size = Vector3(12, 10, 28)

[sub_resource type="BoxMesh" id="Mesh_terrace"]
material = SubResource("Material_terrace")
size = Vector3(15, 1.5, 8)

[sub_resource type="BoxMesh" id="Mesh_river"]
material = SubResource("Material_water")
size = Vector3(5, 0.08, 56)

[sub_resource type="BoxMesh" id="Mesh_house"]
material = SubResource("Material_building")
size = Vector3(4, 4, 5)

[sub_resource type="BoxMesh" id="Mesh_fortress"]
material = SubResource("Material_building")
size = Vector3(8, 5, 10)

[sub_resource type="BoxMesh" id="Mesh_bridge"]
material = SubResource("Material_building")
size = Vector3(8, 0.5, 3)

[sub_resource type="BoxMesh" id="Mesh_waterfall"]
material = SubResource("Material_water")
size = Vector3(5, 10, 0.5)

[sub_resource type="Environment" id="Environment_greybox"]
background_mode = 1
background_color = Color(0.55, 0.72, 0.82, 1)
ambient_light_source = 2
ambient_light_color = Color(1, 0.9, 0.78, 1)
ambient_light_energy = 0.55

[node name="JajceWorld" type="Node3D"]
script = ExtResource("3_world")

[node name="NavigationRegion3D" type="NavigationRegion3D" parent="."]
navigation_mesh = SubResource("NavigationMesh_greybox")

[node name="TerrainRoot" type="Node3D" parent="."]

[node name="Terrain3D" type="Terrain3D" parent="TerrainRoot"]
data_directory = "res://terrain/jajce/data"
material = SubResource("Terrain3DMaterial_jajce")
assets = ExtResource("1_assets")
collision_mask = 3
collision_mode = 0
top_level = true

[node name="GreyboxGround" type="StaticBody3D" parent="NavigationRegion3D"]

[node name="Mesh" type="MeshInstance3D" parent="NavigationRegion3D/GreyboxGround"]
mesh = SubResource("Mesh_ground")

[node name="Collision" type="CollisionShape3D" parent="NavigationRegion3D/GreyboxGround"]
shape = SubResource("Shape_ground")

[node name="GreyboxLandmarks" type="Node3D" parent="."]

[node name="FortressRidge" type="MeshInstance3D" parent="GreyboxLandmarks"]
position = Vector3(-25, 5, 9)
mesh = SubResource("Mesh_ridge")

[node name="FortressBlockout" type="MeshInstance3D" parent="GreyboxLandmarks"]
position = Vector3(-25, 12.5, 9)
mesh = SubResource("Mesh_fortress")

[node name="UpperTerrace" type="MeshInstance3D" parent="GreyboxLandmarks"]
position = Vector3(-14, 0.75, 12)
mesh = SubResource("Mesh_terrace")

[node name="LowerTerrace" type="MeshInstance3D" parent="GreyboxLandmarks"]
position = Vector3(-11, 0.75, 2)
mesh = SubResource("Mesh_terrace")

[node name="WaterRoot" type="Node3D" parent="."]

[node name="RiverGreybox" type="MeshInstance3D" parent="WaterRoot"]
position = Vector3(25, 0.08, 0)
mesh = SubResource("Mesh_river")

[node name="WaterfallGreybox" type="MeshInstance3D" parent="WaterRoot"]
position = Vector3(25, 5, -24)
mesh = SubResource("Mesh_waterfall")

[node name="VillageRoot" type="Node3D" parent="."]

[node name="House_01" type="MeshInstance3D" parent="VillageRoot"]
position = Vector3(-15, 2, 7)
mesh = SubResource("Mesh_house")

[node name="House_02" type="MeshInstance3D" parent="VillageRoot"]
position = Vector3(-8, 2, 2)
mesh = SubResource("Mesh_house")

[node name="House_03" type="MeshInstance3D" parent="VillageRoot"]
position = Vector3(-15, 2, -4)
mesh = SubResource("Mesh_house")

[node name="MillBlockout" type="MeshInstance3D" parent="VillageRoot"]
position = Vector3(19, 2, 7)
mesh = SubResource("Mesh_house")

[node name="BridgeBlockout" type="MeshInstance3D" parent="VillageRoot"]
position = Vector3(25, 0.5, 0)
mesh = SubResource("Mesh_bridge")

[node name="FoliageRoot" type="Node3D" parent="."]

[node name="WorldObjects" type="Node3D" parent="."]

[node name="ResourceNodes" type="Node3D" parent="WorldObjects"]

[node name="BerryBush_01" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(-6, 0, -8)
node_id = &"berry_bush_01"

[node name="BerryBush_02" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(-10, 0, -4)
node_id = &"berry_bush_02"
initial_amount = 8.0

[node name="Tree_01" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(6, 0, -8)
node_id = &"tree_01"
action_id = &"gather_wood"
resource_id = &"wood"
initial_amount = 15.0
yield_per_action = 3.0

[node name="Tree_02" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(10, 0, -4)
node_id = &"tree_02"
action_id = &"gather_wood"
resource_id = &"wood"
initial_amount = 12.0
yield_per_action = 3.0

[node name="LegacyActivityMarkers" type="Node3D" parent="."]

[node name="FoodZone" type="Marker3D" parent="LegacyActivityMarkers"]
position = Vector3(0, 0, -8)

[node name="GuardZone" type="Marker3D" parent="LegacyActivityMarkers"]
position = Vector3(0, 0, 8)

[node name="StudyZone" type="Marker3D" parent="LegacyActivityMarkers"]
position = Vector3(-6, 0, 6)

[node name="RestZone" type="Marker3D" parent="LegacyActivityMarkers"]
position = Vector3(4, 0, 5)

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
rotation_degrees = Vector3(-55, -35, 0)
light_color = Color(1, 0.87, 0.72, 1)
light_energy = 1.25

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_greybox")
