[gd_scene load_steps=16 format=4 uid="uid://cr8mtm0gfbpub"]

[ext_resource type="Script" uid="uid://b2j00riayxkit" path="res://Scripts/Controllers/RogueliteRoom.cs" id="1_1yrmj"]
[ext_resource type="Resource" uid="uid://q1ugy8nvmvsd" path="res://Resources/RogueliteMaps/Corridor_1x2.tres" id="2_1yrmj"]
[ext_resource type="TileSet" uid="uid://6k28roiljylj" path="res://Tilesets/factory_tileset.tres" id="3_uulda"]
[ext_resource type="Script" uid="uid://krean0uywtms" path="res://Scripts/TilemapAvoidance.cs" id="4_uhnmd"]
[ext_resource type="Script" uid="uid://8umfjejbkcsm" path="res://Scripts/Actors/RogueliteEnemySpawner.cs" id="5_2gcep"]
[ext_resource type="PackedScene" uid="uid://l84on3kv2s52" path="res://Scenes/Door_Horizontal.tscn" id="5_uhnmd"]
[ext_resource type="PackedScene" uid="uid://crph24e6e0v0q" path="res://Scenes/Interactable/Control_Pad.tscn" id="6_2gcep"]
[ext_resource type="Resource" uid="uid://cocl3qontm3be" path="res://Resources/Enemies/Base_Fairy.tres" id="6_gwxu4"]
[ext_resource type="Resource" uid="uid://qbo6avc7x64b" path="res://Resources/Enemies/Fairy_Guard.tres" id="7_e75fk"]
[ext_resource type="Script" uid="uid://umyqgyxjiaig" path="res://Scripts/Actors/ChestMarker.cs" id="7_k2por"]
[ext_resource type="Resource" uid="uid://ddx2b6ymqu3eo" path="res://Resources/Enemies/Wall_Turret.tres" id="8_2gcep"]
[ext_resource type="Texture2D" uid="uid://qeh4ai8h6sw5" path="res://Sprites/Chest.png" id="8_o17h4"]

[sub_resource type="NavigationPolygon" id="NavigationPolygon_rlq0q"]
vertices = PackedVector2Array(294, 68, 294, 278, 282, 234, 282, 70, 264, 68, 166, 70, 230, 234, 265, 278, 232, 246, 166, 58, 264, 58, 154, 70, 166, 234, 184, 234, 184, 244, 166, 294, 154, 294, 152, 244, 154, 234, 184, 278, 90, 166, 88, 166, 88, 150, 104, 148, 74, 150, 74, 148, 104, 138, 118, 138, 118, 166, 102, 166, 90, 234, 102, 234, 120, 234, 120, 244, 152, 234, 216, 244, 216, 234, 218, 234, 218, 166, 202, 166, 202, 148, 246, 148, 246, 166, 230, 166, 265, 294, 216, 294, 232, 280, 216, 280, 201, 246, 201, 278, 184, 294, 166, 310, 154, 310, 120, 294, 120, 278, 57, 278, 57, 294, 56, 294, 56, 278, 40, 278, 40, 262, 26, 262, 26, 68, 38, 234, 56, 68, 56, 58, 154, 58, 154, 10, 166, 10, 38, 70)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 0, 3, 5), PackedInt32Array(6, 2, 1, 7, 8), PackedInt32Array(9, 10, 4, 5, 11), PackedInt32Array(12, 13, 14), PackedInt32Array(15, 16, 17, 18, 12, 14, 19), PackedInt32Array(5, 12, 18, 11), PackedInt32Array(20, 21, 22, 23), PackedInt32Array(22, 24, 25, 23), PackedInt32Array(23, 26, 27, 28), PackedInt32Array(23, 28, 29), PackedInt32Array(20, 23, 29, 30), PackedInt32Array(30, 29, 31), PackedInt32Array(31, 32, 33), PackedInt32Array(17, 34, 18), PackedInt32Array(35, 36, 37), PackedInt32Array(38, 39, 40, 41), PackedInt32Array(41, 42, 43), PackedInt32Array(38, 41, 43), PackedInt32Array(37, 38, 43, 6), PackedInt32Array(7, 44, 45, 46), PackedInt32Array(45, 47, 46), PackedInt32Array(7, 46, 8), PackedInt32Array(48, 49, 19, 14), PackedInt32Array(19, 50, 15), PackedInt32Array(15, 51, 52, 16), PackedInt32Array(16, 53, 54, 17), PackedInt32Array(55, 56, 57, 58), PackedInt32Array(58, 59, 60, 30), PackedInt32Array(60, 61, 62, 63), PackedInt32Array(64, 65, 66, 11), PackedInt32Array(66, 67, 68, 9), PackedInt32Array(66, 9, 11), PackedInt32Array(64, 11, 69, 62), PackedInt32Array(62, 69, 63), PackedInt32Array(60, 63, 30), PackedInt32Array(55, 58, 30), PackedInt32Array(54, 55, 30, 31, 33), PackedInt32Array(54, 33, 17), PackedInt32Array(48, 14, 35, 8), PackedInt32Array(6, 8, 35, 37)])
outlines = Array[PackedVector2Array]([PackedVector2Array(17, 36, 14, 12, 47, 15, 49, 34)])
parsed_collision_mask = 353
source_geometry_mode = 1

[sub_resource type="RectangleShape2D" id="RectangleShape2D_4lag8"]
size = Vector2(272, 247)

[sub_resource type="AtlasTexture" id="AtlasTexture_kwstq"]
atlas = ExtResource("8_o17h4")
region = Rect2(0, 0, 16, 16)

[node name="Map" type="Node2D" node_paths=PackedStringArray("RoomClearActivation")]
process_mode = 1
script = ExtResource("1_1yrmj")
RoomResource = ExtResource("2_1yrmj")
RoomClearActivation = []

[node name="Tilemaps" type="Node2D" parent="." groups=["navigation_polygon_source_geometry_group"]]

[node name="Floor" type="TileMapLayer" parent="Tilemaps" node_paths=PackedStringArray("_solidLayers") groups=["Solid"]]
tile_map_data = PackedByteArray("[encoded data, 6404 characters]")
tile_set = ExtResource("3_uulda")
navigation_enabled = false
script = ExtResource("4_uhnmd")
_solidLayers = [NodePath("../Solid"), NodePath("../Props")]
metadata/_edit_lock_ = true

[node name="Solid" type="TileMapLayer" parent="Tilemaps" groups=["Solid"]]
tile_map_data = PackedByteArray("AAATAAAAAAABAAsAAAASAAAAAAABAAQAAAARAAAAAAABAAQAAAAQAAAAAAABAAQAAAAPAAAAAAABAAQAAAAOAAAAAAABAAQAAAANAAAAAAABAAQAAAAMAAAAAAABAAQAAAALAAAAAAACAAQAAAAIAAAAAAADAAQAAAAHAAAAAAABAAQAAAAGAAAAAAABAAQAAAAFAAAAAAABAAQAAAAEAAAAAAABAAQAAAADAAAAAAABAAQAAAACAAAAAAABAAQAAAABAAAAAAABAAQAAAAAAAAAAAAAAAsAAAATAAIAAAAEAAQAAAATAAEAAAAAAAQAAAAAAAIAAAAEAAQAAAAAAAEAAAAAAAQAAAAAAAkAAAAEAAQAAAAAAAgAAAAAAAQAAAAAAAcAAAAAAAQAAAAAAAYAAAAFAAQAAAATAAkAAAAEAAQAAAATAAgAAAAAAAQAA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0ACAAAAAAAAAAMAAwACAAAAAAAAAAMAA0ACAAAAAAAAAAPAAwACAAAAAAAAAAPAA0ACAAAAAAAAAAQAAwACAAAAAAAAAAQAA0ACAAAAAAAAAA=")
tile_set = ExtResource("3_uulda")
navigation_enabled = false
metadata/_edit_lock_ = true

[node name="Props" type="TileMapLayer" parent="Tilemaps" groups=["Solid"]]
tile_map_data = PackedByteArray("AAAGAAgAAQAAAAAAEQAFAAgAAQAAAAAAEwANAAgAAQAAAAAAFQAOAAgAAQAAAAAADQABABIAAQAAAAAAFAACABIAAQAAAAAADQABABEAAQAAAAAADQASABIAAQAAAAAADQAGABIAAQAAAAAADgAMAA4AAQAAAAAADgAEABIAAQAAAAAAAQANABAAAQAAAAAAAQAEAAoAAQAAAAAAEAAMABIAAQAAAAAAEAALAAEAAAAJAAwAAAALAAIAAAAJAA0AAAALAAwAAAAJAAwAAAALAA0AAAAJAA0AAAAPAAwAAAAJAAwAAAAPAA0AAAAJAA0AAAAHAAwAAAAJAAwAAAAHAA0AAAAJAA0AAAAEAAwAAAAKAAwAAAAEAA0AAAAKAA0AAAAIAAEAAAAKAAwAAAAIAAIAAAAKAA0AAAAQAAwAAAAKAAwAAAAQAA0AAAAKAA0AAAAIAAwAAAAKAAwAAAAIAA0AAAAKAA0AAAADAAwAAAAJAAwAAAADAA0AAAAJAA0AAAAAAA0AAAAKAA4AAAAAAA4AAAAKAA8AAAAAAAMAAAAKAA4AAAAAAAQAAAAKAA8AAAATAA0AAAAKAA4AAAATAA4AAAAKAA8AAAATAAMAAAAKAA4AAAATAAQAAAAKAA8AAAAMAAwAAAAKAAwAAAAMAA0AAAAKAA0AAAAOAAYACgADAAIAAAAOAAcACgADAAMAAAAGAAYACgADAAIAAAAGAAcACgADAAMAAAASAAEACgACAAAAAAASAAIACgACAAEAAAABAAEACgACAAAAAAABAAIACgACAAEAAAASAAMAAQAAAAAAEwARAAMAAQAAAAAAEwABAAMAAQAAAAAAFQACAAMAAQAAAAAAFQAIAA4AAQAAAAAAFQAFABIAAQAAAAAAGQARABIAAQAAAAAAGQA=")
tile_set = ExtResource("3_uulda")
navigation_enabled = false
metadata/_edit_lock_ = true

[node name="Actors" type="Node2D" parent="Tilemaps"]
metadata/_edit_lock_ = true

[node name="HorizontalDoor" parent="Tilemaps/Actors" instance=ExtResource("5_uhnmd")]
position = Vector2(96, 208)

[node name="HorizontalDoor2" parent="Tilemaps/Actors" instance=ExtResource("5_uhnmd")]
position = Vector2(224, 208)

[node name="ControlPad" parent="Tilemaps/Actors" node_paths=PackedStringArray("Target") instance=ExtResource("6_2gcep")]
position = Vector2(68, 209)
Target = NodePath("../HorizontalDoor")

[node name="ControlPad2" parent="Tilemaps/Actors" node_paths=PackedStringArray("Target") instance=ExtResource("6_2gcep")]
position = Vector2(250, 207)
Target = NodePath("../HorizontalDoor2")

[node name="EnemySpawners" type="Node2D" parent="."]

[node name="RogueliteEnemySpawner10" type="Marker2D" parent="EnemySpawners"]
position = Vector2(104, 31)
script = ExtResource("5_2gcep")
Enemy = ExtResource("8_2gcep")

[node name="RogueliteEnemySpawner6" type="Marker2D" parent="EnemySpawners"]
position = Vector2(97, 266)
script = ExtResource("5_2gcep")
Enemy = ExtResource("6_gwxu4")

[node name="RogueliteEnemySpawner7" type="Marker2D" parent="EnemySpawners"]
position = Vector2(158, 171)
script = ExtResource("5_2gcep")
Enemy = ExtResource("7_e75fk")

[node name="RogueliteEnemySpawner8" type="Marker2D" parent="EnemySpawners"]
position = Vector2(253, 283)
script = ExtResource("5_2gcep")
Enemy = ExtResource("6_gwxu4")

[node name="RogueliteEnemySpawner9" type="Marker2D" parent="EnemySpawners"]
position = Vector2(232, 60)
script = ExtResource("5_2gcep")
Enemy = ExtResource("7_e75fk")

[node name="NavigationRegion2D" type="NavigationRegion2D" parent="."]
visible = false
navigation_polygon = SubResource("NavigationPolygon_rlq0q")
use_edge_connections = false

[node name="PlayerEnterDetector" type="Area2D" parent="."]
visible = false
collision_layer = 0
collision_mask = 2

[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerEnterDetector"]
position = Vector2(162, 175.5)
shape = SubResource("RectangleShape2D_4lag8")

[node name="Features" type="Node2D" parent="."]

[node name="Chest" type="Marker2D" parent="Features"]
position = Vector2(200, 135)
script = ExtResource("7_k2por")
MarkerTexture = SubResource("AtlasTexture_kwstq")
SpawnChance = 10.0

[node name="Chest2" type="Marker2D" parent="Features"]
position = Vector2(248, 135)
script = ExtResource("7_k2por")
MarkerTexture = SubResource("AtlasTexture_kwstq")
SpawnChance = 10.0

[node name="Chest4" type="Marker2D" parent="Features"]
position = Vector2(120, 135)
script = ExtResource("7_k2por")
MarkerTexture = SubResource("AtlasTexture_kwstq")
SpawnChance = 10.0

[node name="Chest3" type="Marker2D" parent="Features"]
position = Vector2(72, 135)
script = ExtResource("7_k2por")
MarkerTexture = SubResource("AtlasTexture_kwstq")
SpawnChance = 10.0

[connection signal="area_entered" from="PlayerEnterDetector" to="." method="OnRoomEntered"]
