[gd_scene load_steps=15 format=2]

[ext_resource path="res://assets/level/Level.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/cameras.gd" type="Script" id=2]
[ext_resource path="res://scenes/player.tscn" type="PackedScene" id=3]
[ext_resource path="res://scenes/camera_room.tscn" type="PackedScene" id=4]
[ext_resource path="res://scripts/camera_room.gd" type="Script" id=5]
[ext_resource path="res://scripts/tracking_camera.gd" type="Script" id=6]
[ext_resource path="res://scenes/game_manager.tscn" type="PackedScene" id=7]
[ext_resource path="res://scripts/dof_focus.gd" type="Script" id=8]

[sub_resource type="CylinderShape" id=1]
height = 5.22615
radius = 12.052

[sub_resource type="BoxShape" id=4]
extents = Vector3( 1.78436, 2.33105, 6.04815 )

[sub_resource type="Animation" id=3]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath(".:camera_lerp")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 0.0 ]
}

[sub_resource type="Animation" id=9]
length = 0.3
tracks/0/type = "value"
tracks/0/path = NodePath(".:camera_lerp")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( -2, 1 ),
"update": 0,
"values": [ 0.0, 1.0 ]
}

[sub_resource type="ProceduralSky" id=7]
sky_top_color = Color( 0.486275, 0.486275, 0.486275, 1 )
sky_horizon_color = Color( 0.180392, 0.180392, 0.180392, 1 )
ground_bottom_color = Color( 0.545098, 0.545098, 0.545098, 1 )
ground_horizon_color = Color( 0.8, 0.8, 0.8, 1 )

[sub_resource type="Environment" id=6]
background_mode = 2
background_sky = SubResource( 7 )
ambient_light_sky_contribution = 0.5
tonemap_mode = 4
ssao_enabled = true
ssao_radius = 3.86
ssao_intensity = 0.69
dof_blur_far_enabled = true
dof_blur_far_amount = 0.15
dof_blur_near_enabled = true
dof_blur_near_amount = 0.15
adjustment_contrast = 1.97

[node name="main" type="Spatial"]

[node name="Level" parent="." instance=ExtResource( 1 )]

[node name="Player" parent="." instance=ExtResource( 3 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 4.35996 )

[node name="cameras" type="Spatial" parent="."]
script = ExtResource( 2 )
target = NodePath("../Player")
camera_lerp = 0.0

[node name="main_camera" type="Camera" parent="cameras"]
current = true

[node name="camera_room_center" type="Spatial" parent="cameras"]
script = ExtResource( 5 )

[node name="camera" type="Camera" parent="cameras/camera_room_center"]
transform = Transform( -1, 7.57103e-08, -4.37114e-08, 0, 0.5, 0.866025, 8.74228e-08, 0.866025, -0.5, 0, 12, 0 )
script = ExtResource( 6 )
target = NodePath("../../../Player")

[node name="hitbox" type="Area" parent="cameras/camera_room_center"]
collision_layer = 16
collision_mask = 2

[node name="CollisionShape" type="CollisionShape" parent="cameras/camera_room_center/hitbox"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.52689, 0 )
shape = SubResource( 1 )

[node name="camera_galley" parent="cameras" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -16.3 )

[node name="camera_ore_conveyor" parent="cameras" instance=ExtResource( 4 )]
transform = Transform( 0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, 0.707107, 11.526, 0, -11.526 )

[node name="camera_storage" parent="cameras" instance=ExtResource( 4 )]
transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 16.3, 0, 0 )

[node name="camera_crafting" parent="cameras" instance=ExtResource( 4 )]
transform = Transform( -0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, -0.707107, 11.526, 0, 11.526 )

[node name="camera_room_hallway" type="Spatial" parent="cameras"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 16.3 )
script = ExtResource( 5 )

[node name="camera" type="Camera" parent="cameras/camera_room_hallway"]
transform = Transform( -4.37114e-08, 0.965926, -0.258819, 0, 0.258819, 0.965926, 1, 4.2222e-08, -1.13133e-08, -1.397, 10, -2.312 )

[node name="hitbox" type="Area" parent="cameras/camera_room_hallway"]
collision_layer = 16
collision_mask = 2

[node name="CollisionShape" type="CollisionShape" parent="cameras/camera_room_hallway/hitbox"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.52689, -1.44831 )
shape = SubResource( 4 )

[node name="camera_rover" parent="cameras" instance=ExtResource( 4 )]
transform = Transform( -0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, -0.707107, -11.526, 0, 11.526 )

[node name="camera_comms" parent="cameras" instance=ExtResource( 4 )]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -16.3, 0, 0 )

[node name="camera_hydroponics" parent="cameras" instance=ExtResource( 4 )]
transform = Transform( 0.707106, 0, 0.707106, 0, 1, 0, -0.707106, 0, 0.707106, -11.526, 0, -11.526 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="cameras"]
anims/RESET = SubResource( 3 )
anims/switch_camera = SubResource( 9 )

[node name="lights" type="Spatial" parent="."]

[node name="Hub1" type="OmniLight" parent="lights"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0224032, 4.20288, 4.77208 )
shadow_enabled = true
omni_range = 10.7698

[node name="Hub2" type="OmniLight" parent="lights"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0765934, 4.20288, -4.81973 )
shadow_enabled = true
omni_range = 10.7698

[node name="light_galley" type="OmniLight" parent="lights"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.329, -16.3 )
shadow_enabled = true
omni_range = 5.893
omni_attenuation = 2.0

[node name="light_ore_conveyor" type="OmniLight" parent="lights"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 11.526, 3.329, -11.526 )
shadow_enabled = true
omni_range = 5.893
omni_attenuation = 2.0

[node name="light_storage" type="OmniLight" parent="lights"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 16.3, 3.329, 0 )
shadow_enabled = true
omni_range = 5.893
omni_attenuation = 2.0

[node name="light_crafting" type="OmniLight" parent="lights"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 11.526, 3.329, 11.526 )
shadow_enabled = true
omni_range = 5.893
omni_attenuation = 2.0

[node name="light_hallway" type="OmniLight" parent="lights"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.329, 16.3 )
shadow_enabled = true
omni_range = 5.893
omni_attenuation = 2.0

[node name="light_rover" type="OmniLight" parent="lights"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -11.526, 3.329, 11.526 )
shadow_enabled = true
omni_range = 5.893
omni_attenuation = 2.0

[node name="light_comms" type="OmniLight" parent="lights"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -16.3, 3.329, 0 )
shadow_enabled = true
omni_range = 5.893
omni_attenuation = 2.0

[node name="light_hydroponics" type="OmniLight" parent="lights"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -11.526, 3.329, -11.526 )
shadow_enabled = true
omni_range = 5.893
omni_attenuation = 2.0

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource( 6 )
script = ExtResource( 8 )
target = NodePath("../Player")
size = 4.0

[node name="game_manager" parent="." instance=ExtResource( 7 )]

[connection signal="player_entered" from="cameras/camera_room_center" to="cameras" method="_on_camera_room_player_entered"]
[connection signal="player_exited" from="cameras/camera_room_center" to="cameras" method="_on_camera_room_player_exited"]
[connection signal="area_entered" from="cameras/camera_room_center/hitbox" to="cameras/camera_room_center" method="_on_hitbox_area_entered"]
[connection signal="area_exited" from="cameras/camera_room_center/hitbox" to="cameras/camera_room_center" method="_on_hitbox_area_exited"]
[connection signal="player_entered" from="cameras/camera_galley" to="cameras" method="_on_camera_room_player_entered"]
[connection signal="player_exited" from="cameras/camera_galley" to="cameras" method="_on_camera_room_player_exited"]
[connection signal="player_entered" from="cameras/camera_ore_conveyor" to="cameras" method="_on_camera_room_player_entered"]
[connection signal="player_exited" from="cameras/camera_ore_conveyor" to="cameras" method="_on_camera_room_player_exited"]
[connection signal="player_entered" from="cameras/camera_storage" to="cameras" method="_on_camera_room_player_entered"]
[connection signal="player_exited" from="cameras/camera_storage" to="cameras" method="_on_camera_room_player_exited"]
[connection signal="player_entered" from="cameras/camera_crafting" to="cameras" method="_on_camera_room_player_entered"]
[connection signal="player_exited" from="cameras/camera_crafting" to="cameras" method="_on_camera_room_player_exited"]
[connection signal="player_entered" from="cameras/camera_room_hallway" to="cameras" method="_on_camera_room_player_entered"]
[connection signal="player_exited" from="cameras/camera_room_hallway" to="cameras" method="_on_camera_room_player_exited"]
[connection signal="area_entered" from="cameras/camera_room_hallway/hitbox" to="cameras/camera_room_hallway" method="_on_hitbox_area_entered"]
[connection signal="area_exited" from="cameras/camera_room_hallway/hitbox" to="cameras/camera_room_hallway" method="_on_hitbox_area_exited"]
[connection signal="player_entered" from="cameras/camera_rover" to="cameras" method="_on_camera_room_player_entered"]
[connection signal="player_exited" from="cameras/camera_rover" to="cameras" method="_on_camera_room_player_exited"]
[connection signal="player_entered" from="cameras/camera_comms" to="cameras" method="_on_camera_room_player_entered"]
[connection signal="player_exited" from="cameras/camera_comms" to="cameras" method="_on_camera_room_player_exited"]
[connection signal="player_entered" from="cameras/camera_hydroponics" to="cameras" method="_on_camera_room_player_entered"]
[connection signal="player_exited" from="cameras/camera_hydroponics" to="cameras" method="_on_camera_room_player_exited"]
