[gd_scene format=4 uid="uid://bjkhawylawqof"]

[ext_resource type="PackedScene" uid="uid://cmuvmmp7xam4o" path="res://core/daynight/environment_management.tscn" id="1_daynt"]
[ext_resource type="Script" uid="uid://bs232puek1gwc" path="res://docs/museums/daynight/museum_daynight.gd" id="1_ouqsa"]
[ext_resource type="Shader" uid="uid://bneoex8xpmcm8" path="res://core/daynight/sky.gdshader" id="3_jiovi"]
[ext_resource type="Texture2D" uid="uid://dest0qa7vaid0" path="res://core/daynight/stars_albedo.png" id="4_abyor"]
[ext_resource type="AudioStream" uid="uid://dvabvoqyya0g5" path="res://core/daynight/sounds/thunder_3.mp3" id="4_d5ghv"]
[ext_resource type="AudioStream" uid="uid://creenugno7hm" path="res://core/daynight/sounds/thunder_4.mp3" id="5_g8vyu"]
[ext_resource type="AudioStream" uid="uid://byuxpukhy72n8" path="res://core/daynight/sounds/rain_1.mp3" id="5_iu8wf"]
[ext_resource type="Script" uid="uid://brcimd12tx3dm" path="res://core/daynight/edge_detection_compositor.gd" id="5_jgh18"]
[ext_resource type="AudioStream" uid="uid://h5yhjn1x3f4j" path="res://core/daynight/sounds/rain_2.mp3" id="6_ftvlo"]
[ext_resource type="AudioStream" uid="uid://bm6dq4jwsbxf6" path="res://core/daynight/sounds/thunder_5.mp3" id="6_iu8wf"]
[ext_resource type="Script" uid="uid://cx2tlvxhvatj5" path="res://docs/museums/daynight/control.gd" id="6_q52t1"]
[ext_resource type="AudioStream" uid="uid://elrjw0smm0cj" path="res://core/daynight/sounds/rain_3.mp3" id="7_ouqsa"]
[ext_resource type="Script" uid="uid://ccdd52apoh4ir" path="res://docs/museums/daynight/camera_3d.gd" id="7_p2t1d"]
[ext_resource type="PackedScene" uid="uid://cjv1e8pc6gde1" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_01.tscn" id="14_iu8wf"]
[ext_resource type="PackedScene" uid="uid://qmt8bkiksgj3" path="res://tgcc/chunk/countryside/scene/chunk_country_cross_3_02.tscn" id="15_ftvlo"]
[ext_resource type="PackedScene" uid="uid://bgb4pfflokl5s" path="res://tgcc/chunk/prop/pylon/pylon.tscn" id="16_ftvlo"]
[ext_resource type="PackedScene" uid="uid://b002wu5ltuqi4" path="res://tgcc/chunk/countryside/scene/chunk_country_end_01.tscn" id="16_ouqsa"]
[ext_resource type="PackedScene" uid="uid://cu2chsjh8wuvp" path="res://tgcc/chunk/countryside/scene/chunk_country_straight_02.tscn" id="17_ra0ar"]
[ext_resource type="PackedScene" uid="uid://d1tfkhuktwthn" path="res://tgcc/chunk/countryside/scene/chunk_country_cross_3_03.tscn" id="18_j8mxr"]
[ext_resource type="PackedScene" uid="uid://dvk3bytqn3m5s" path="res://tgcc/train/main_train.tscn" id="20_ouqsa"]

[sub_resource type="AudioStreamMP3" id="AudioStreamMP3_ra0ar"]
data = PackedByteArray("[encoded data, 269724 characters]")

[sub_resource type="AudioStreamMP3" id="AudioStreamMP3_j8mxr"]
data = PackedByteArray("[encoded data, 254120 characters]")

[sub_resource type="FastNoiseLite" id="FastNoiseLite_jiovi"]
fractal_lacunarity = 1.915
fractal_gain = 0.53
fractal_weighted_strength = 0.35

[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_abyor"]
noise = SubResource("FastNoiseLite_jiovi")
seamless = true

[sub_resource type="ShaderMaterial" id="ShaderMaterial_abyor"]
shader = ExtResource("3_jiovi")
shader_parameter/sky_top_color = Color(0.36438444, 0.6417803, 0.8712311, 1)
shader_parameter/sky_horizon_color = Color(0.75821966, 0.8417803, 0.92534095, 1)
shader_parameter/night_intensity = 0.0
shader_parameter/cloud_noise = SubResource("NoiseTexture2D_abyor")
shader_parameter/sun_color = Color(1, 0.88767046, 0.775341, 1)
shader_parameter/cloud_center_color = Color(1, 1, 1, 1)
shader_parameter/cloud_edge_color = Color(0.8, 0.85, 0.9, 1)
shader_parameter/cloud_direction = Vector2(0.5, 0.2)
shader_parameter/cloud_speed = 0.1
shader_parameter/cloud_scale = 0.5
shader_parameter/cloud_threshold = 0.5
shader_parameter/cloud_edge_thickness = 0.406000019285
shader_parameter/cloud_edge_softness = 0.0
shader_parameter/star_density = 1500.0
shader_parameter/star_rarity = 2500.0
shader_parameter/star_scale_variation = 0.5
shader_parameter/shooting_star_texture = ExtResource("4_abyor")
shader_parameter/shooting_star_color = Color(0.38431373, 0.61960787, 0.23137255, 1)
shader_parameter/shooting_star_density = 1.0
shader_parameter/shooting_star_speed = 1.0
shader_parameter/shooting_star_scale = 5.0
shader_parameter/shooting_star_lifetime = 0.5
shader_parameter/shooting_star_travel_dist = 15.0

[sub_resource type="Sky" id="Sky_50i22"]
sky_material = SubResource("ShaderMaterial_abyor")

[sub_resource type="Environment" id="Environment_icuhg"]
background_mode = 2
sky = SubResource("Sky_50i22")
ambient_light_color = Color(1, 0.88767046, 0.775341, 1)
tonemap_exposure = 0.9979451
ssao_enabled = true
ssao_radius = 0.5
ssao_intensity = 14.0
ssao_detail = 0.0
ssil_enabled = true
glow_enabled = true
glow_levels/4 = 1.0
glow_intensity = 1.1835606
glow_strength = 0.65
glow_bloom = 1.0
fog_enabled = true
fog_mode = 1
fog_light_color = Color(0.75821966, 0.8417803, 0.92534095, 1)
fog_density = 0.004876705
fog_sky_affect = 0.0

[sub_resource type="CompositorEffect" id="CompositorEffect_q52t1"]
resource_local_to_scene = false
resource_name = ""
enabled = true
effect_callback_type = 1
access_resolved_color = false
access_resolved_depth = false
needs_motion_vectors = false
needs_normal_roughness = false
script = ExtResource("5_jgh18")
metadata/_custom_type_script = "uid://brcimd12tx3dm"

[sub_resource type="Compositor" id="Compositor_jbfcc"]
compositor_effects = Array[CompositorEffect]([SubResource("CompositorEffect_q52t1")])

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_p2t1d"]
albedo_color = Color(0.135, 0.45, 0.18224995, 1)

[sub_resource type="BoxMesh" id="BoxMesh_p2t1d"]
size = Vector3(200, 0.08, 200)

[node name="Museum" type="Node3D" unique_id=1411616506]
script = ExtResource("1_ouqsa")

[node name="DayNight" parent="." unique_id=1578787116 node_paths=PackedStringArray("camera") instance=ExtResource("1_daynt")]
camera = NodePath("../Camera3D")
thunder_sounds = Array[AudioStream]([SubResource("AudioStreamMP3_ra0ar"), SubResource("AudioStreamMP3_j8mxr"), ExtResource("4_d5ghv"), ExtResource("5_g8vyu"), ExtResource("6_iu8wf")])
rain_sounds = Array[AudioStream]([ExtResource("5_iu8wf"), ExtResource("6_ftvlo"), ExtResource("7_ouqsa")])

[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=6398994]
environment = SubResource("Environment_icuhg")
compositor = SubResource("Compositor_jbfcc")

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=565189502]
transform = Transform3D(0.7246343, -0.20683524, 0.65736127, 0, 0.95389545, 0.30013812, -0.6891333, -0.21749045, 0.6912255, 0, 0, 0)
light_color = Color(1, 0.88767046, 0.775341, 1)
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
shadow_enabled = true
shadow_bias = 0.2
shadow_normal_bias = 0.0
shadow_opacity = 0.97
shadow_blur = 0.4
directional_shadow_mode = 0
directional_shadow_fade_start = 0.9

[node name="Camera3D" type="Camera3D" parent="." unique_id=1893906598]
transform = Transform3D(0.035881948, 0.7570504, -0.65237045, -0.1472942, 0.6496678, 0.7458125, 0.9884417, 0.06932917, 0.13482046, -18.173235, 14.658583, -10.483771)
script = ExtResource("7_p2t1d")

[node name="Terrain" type="MeshInstance3D" parent="." unique_id=1335123628]
material_override = SubResource("StandardMaterial3D_p2t1d")
mesh = SubResource("BoxMesh_p2t1d")

[node name="Control" type="Control" parent="." unique_id=1032167802]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("6_q52t1")

[node name="Snow" type="CheckButton" parent="Control" unique_id=1267493556]
layout_mode = 0
offset_left = 21.0
offset_top = 13.0
offset_right = 109.0
offset_bottom = 44.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Snow"

[node name="Rain" type="CheckButton" parent="Control" unique_id=1387886007]
layout_mode = 0
offset_left = 21.0
offset_top = 41.0
offset_right = 109.0
offset_bottom = 72.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Rain"

[node name="Wind" type="CheckButton" parent="Control" unique_id=1160113828]
layout_mode = 0
offset_left = 20.0
offset_top = 66.0
offset_right = 108.0
offset_bottom = 97.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Wind"

[node name="Fireflies" type="CheckButton" parent="Control" unique_id=1177089839]
layout_mode = 0
offset_left = 20.0
offset_top = 92.0
offset_right = 129.0
offset_bottom = 123.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Fireflies"

[node name="RandomWeather" type="Button" parent="Control" unique_id=1114190563]
layout_mode = 0
offset_left = 24.0
offset_top = 157.0
offset_right = 207.0
offset_bottom = 188.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Random Weather (10\")"

[node name="WeatherEventLabel" type="Label" parent="Control" unique_id=1030782057]
layout_mode = 0
offset_left = 1637.0
offset_top = 19.0
offset_right = 1889.0
offset_bottom = 42.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Weather: Clear"

[node name="Storm" type="CheckButton" parent="Control" unique_id=936960924]
layout_mode = 0
offset_left = 110.0
offset_top = 40.0
offset_right = 206.0
offset_bottom = 71.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Storm"

[node name="DayTimeLabel" type="Label" parent="Control" unique_id=1673596218]
layout_mode = 0
offset_left = 26.0
offset_top = 211.0
offset_right = 360.0
offset_bottom = 234.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Time 00:00"

[node name="DayTimeSlider" type="HSlider" parent="Control" unique_id=530788076]
layout_mode = 0
offset_left = 26.0
offset_top = 235.0
offset_right = 205.0
offset_bottom = 251.0
max_value = 1.0
step = 0.01

[node name="DayTimeOptions" type="OptionButton" parent="Control" unique_id=1354705309]
layout_mode = 0
offset_left = 25.0
offset_top = 258.0
offset_right = 136.0
offset_bottom = 289.0
selected = 1
item_count = 4
popup/item_0/text = "Sunrise"
popup/item_0/id = 1
popup/item_1/text = "Day"
popup/item_1/id = 2
popup/item_2/text = "Sunset"
popup/item_2/id = 3
popup/item_3/text = "Night"
popup/item_3/id = 4

[node name="Dust" type="CheckButton" parent="Control" unique_id=2023312048]
layout_mode = 0
offset_left = 21.0
offset_top = 293.0
offset_right = 150.0
offset_bottom = 324.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
button_pressed = true
text = "Dust"

[node name="Blur" type="CheckButton" parent="Control" unique_id=1758807681]
layout_mode = 0
offset_left = 21.0
offset_top = 321.0
offset_right = 150.0
offset_bottom = 352.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
button_pressed = true
text = "Blur"

[node name="Pause" type="CheckButton" parent="Control" unique_id=156986934]
layout_mode = 0
offset_left = 212.0
offset_top = 227.0
offset_right = 307.0
offset_bottom = 258.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Pause"

[node name="Shadows" type="CheckButton" parent="Control" unique_id=1751516495]
layout_mode = 0
offset_left = 21.0
offset_top = 345.0
offset_right = 150.0
offset_bottom = 376.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
button_pressed = true
text = "Shadows"

[node name="WindSlider" type="HSlider" parent="Control" unique_id=25258103]
layout_mode = 0
offset_left = 113.0
offset_top = 74.0
offset_right = 255.0
offset_bottom = 90.0
max_value = 1.0
step = 0.01

[node name="Fog" type="CheckButton" parent="Control" unique_id=24312462]
layout_mode = 0
offset_left = 20.0
offset_top = 118.0
offset_right = 110.0
offset_bottom = 149.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Fog"

[node name="Scene" type="Node" parent="." unique_id=701973010]

[node name="chunk_country_corner_01" parent="Scene" unique_id=200417581 instance=ExtResource("14_iu8wf")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22.803223, 0, 0)

[node name="chunk_country_cross3_02" parent="Scene" unique_id=1492245999 node_paths=PackedStringArray("connection_left", "connection_right") instance=ExtResource("15_ftvlo")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -21.99749)
have_lamppost = true
connection_left = [NodePath("PaloLuce/sx")]
connection_right = [NodePath("PaloLuce/dx")]

[node name="PaloLuce" parent="Scene/chunk_country_cross3_02" unique_id=1607500596 instance=ExtResource("16_ftvlo")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.5996704, 0, 8.107037)

[node name="chunk_country_end_01" parent="Scene" unique_id=913263516 node_paths=PackedStringArray("connection_left", "connection_right") instance=ExtResource("16_ouqsa")]
have_lamppost = true
connection_left = [NodePath("PaloLuce2/sx")]
connection_right = [NodePath("PaloLuce2/dx")]

[node name="PaloLuce2" parent="Scene/chunk_country_end_01" unique_id=787841521 instance=ExtResource("16_ftvlo")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.1473236, 0, -4.881533)

[node name="chunk_country_straight_02" parent="Scene" unique_id=1847746456 instance=ExtResource("17_ra0ar")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 21.609644)

[node name="chunk_country_cross3_03" parent="Scene" unique_id=643218732 instance=ExtResource("18_j8mxr")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21.199265, 0, 0)

[node name="Train2" parent="Scene" unique_id=206892833 instance=ExtResource("20_ouqsa")]
transform = Transform3D(-0.85, 0, -1.2834644e-07, 0, 0.85, 0, 1.2834644e-07, 0, -0.85, 6.50667, 0, 0.8064747)

[connection signal="toggled" from="Control/Snow" to="Control" method="_on_snow_toggled"]
[connection signal="toggled" from="Control/Rain" to="Control" method="_on_rain_toggled"]
[connection signal="toggled" from="Control/Wind" to="Control" method="_on_wind_toggled"]
[connection signal="toggled" from="Control/Fireflies" to="Control" method="_on_fireflies_toggled"]
[connection signal="pressed" from="Control/RandomWeather" to="Control" method="_on_random_weather_pressed"]
[connection signal="toggled" from="Control/Storm" to="Control" method="_on_storm_toggled"]
[connection signal="value_changed" from="Control/DayTimeSlider" to="Control" method="_on_day_time_slider_value_changed"]
[connection signal="item_selected" from="Control/DayTimeOptions" to="Control" method="_on_option_button_item_selected"]
[connection signal="toggled" from="Control/Dust" to="Control" method="_on_dust_toggled"]
[connection signal="toggled" from="Control/Blur" to="Control" method="_on_blur_toggled"]
[connection signal="toggled" from="Control/Pause" to="Control" method="_on_pause_toggled"]
[connection signal="toggled" from="Control/Shadows" to="Control" method="_on_shadows_toggled"]
[connection signal="value_changed" from="Control/WindSlider" to="Control" method="_on_wind_slider_value_changed"]
[connection signal="toggled" from="Control/Fog" to="Control" method="_on_fog_toggled"]

[editable path="Scene/chunk_country_cross3_02/PaloLuce"]
[editable path="Scene/chunk_country_end_01/PaloLuce2"]
