[gd_scene load_steps=11 format=4 uid="uid://qn4g0qkjcuiy"]

[ext_resource type="Script" uid="uid://cdvxqkeqa7en5" path="res://Scripts/Parts/CastleVisual.gd" id="1_oxmfh"]
[ext_resource type="Texture2D" uid="uid://dt0qtxu2l646n" path="res://Assets/Sprites/Tilesets/Terrain/Overworld.png" id="2_tt5sy"]
[ext_resource type="Script" uid="uid://73oviwf6bbys" path="res://Scripts/Classes/Components/TilesetTextureSetter.gd" id="2_ulvy5"]
[ext_resource type="JSON" path="res://Assets/Sprites/Tilesets/Terrain/TerrainTiles.json" id="5_my1op"]
[ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="7_vjwyw"]
[ext_resource type="JSON" path="res://Assets/Sprites/Tilesets/SmallCastle.json" id="8_tt5sy"]

[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_80q5s"]
texture = ExtResource("2_tt5sy")
5:10/0 = 0
6:10/0 = 0
6:7/0 = 0
7:7/0 = 0
3:10/0 = 0
4:10/0 = 0

[sub_resource type="TileSet" id="TileSet_0n6c4"]
sources/0 = SubResource("TileSetAtlasSource_80q5s")

[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_oxmfh"]
texture = ExtResource("2_tt5sy")
texture_region_size = Vector2i(8, 8)
5:10/0 = 0
6:10/0 = 0
7:10/0 = 0
8:10/0 = 0
6:7/0 = 0
7:7/0 = 0
7:20/0 = 0

[sub_resource type="TileSet" id="TileSet_vjwyw"]
tile_size = Vector2i(8, 8)
sources/0 = SubResource("TileSetAtlasSource_oxmfh")

[node name="SmallCastleVisual" type="Node2D" node_paths=PackedStringArray("sprite")]
process_mode = 3
z_index = -5
script = ExtResource("1_oxmfh")
sprite = NodePath("Sprite")

[node name="Tiles" type="TileMapLayer" parent="."]
position = Vector2(-8, 8)
tile_map_data = PackedByteArray("AAD+////AAAGAAcAAAD+/wAAAAAHAAcAAAD+/wEAAAAHAAcAAAD///7/AAADAAoAAAD/////AAAFAAoAAAD//wAAAAAHAAcAAAD//wEAAAAHAAcAAAAAAP7/AAAHAAcAAAAAAP//AAAFAAoAAAAAAAAAAAAGAAoAAAABAP7/AAAEAAoAAAABAP//AAAFAAoAAAABAAAAAAAHAAcAAAABAAEAAAAHAAcAAAACAP//AAAGAAcAAAACAAAAAAAHAAcAAAACAAEAAAAHAAcAAAD///3/AAAGAAcAAAAAAP3/AAAGAAcAAAABAP3/AAAGAAcAAAA=")
tile_set = SubResource("TileSet_0n6c4")

[node name="TilesetTextureSetter" type="Node" parent="Tiles" node_paths=PackedStringArray("tile_map")]
script = ExtResource("2_ulvy5")
tile_map = NodePath("..")
metadata/_custom_type_script = "uid://73oviwf6bbys"

[node name="ResourceSetterNew" type="Node" parent="Tiles/TilesetTextureSetter" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("7_vjwyw")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("5_my1op")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[node name="BG" type="TileMapLayer" parent="Tiles"]
show_behind_parent = true
tile_map_data = PackedByteArray("AAAAAAAAAAAHABQAAAAAAAEAAAAHABQAAAAAAAIAAAAHABQAAAAAAAMAAAAHABQAAAABAAAAAAAHABQAAAABAAEAAAAHABQAAAABAAIAAAAHABQAAAABAAMAAAAHABQAAAA=")
tile_set = SubResource("TileSet_vjwyw")

[node name="TilesetTextureSetter" type="Node" parent="Tiles/BG" node_paths=PackedStringArray("tile_map")]
script = ExtResource("2_ulvy5")
tile_map = NodePath("..")
metadata/_custom_type_script = "uid://73oviwf6bbys"

[node name="ResourceSetterNew" type="Node" parent="Tiles/BG/TilesetTextureSetter" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("7_vjwyw")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("5_my1op")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[node name="Sprite" type="Sprite2D" parent="."]
hframes = 2
region_rect = Rect2(0, 0, 80, 80)

[node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect", "property_node")]
script = ExtResource("7_vjwyw")
node_to_affect = NodePath("..")
property_node = NodePath("../..")
property_name = "texture"
mode = 1
resource_json = ExtResource("8_tt5sy")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
