diff --git a/Scenes/Components/Greyboxing/MoveableBlock.tscn b/Scenes/Components/Greyboxing/MoveableBlock.tscn index e73ae43..5c49bf6 100644 --- a/Scenes/Components/Greyboxing/MoveableBlock.tscn +++ b/Scenes/Components/Greyboxing/MoveableBlock.tscn @@ -12,6 +12,7 @@ resource_local_to_scene = true size = Vector2(32, 32) [node name="MoveableBlock" type="RigidBody2D" groups=["NodesWithID"]] +collision_layer = 5 mass = 0.25 gravity_scale = 0.0 lock_rotation = true diff --git a/Scenes/Components/SimpleSwitch.tscn b/Scenes/Components/SimpleSwitch.tscn index 8490af6..a14848c 100644 --- a/Scenes/Components/SimpleSwitch.tscn +++ b/Scenes/Components/SimpleSwitch.tscn @@ -1,26 +1,28 @@ -[gd_scene load_steps=4 format=3 uid="uid://bbdfk08t5dt1b"] +[gd_scene load_steps=5 format=3 uid="uid://c3fld6my8so3p"] -[ext_resource type="PackedScene" uid="uid://bmwu7t5fqfmd5" path="res://Scenes/Components/Switch.tscn" id="1_a5k7c"] -[ext_resource type="Script" path="res://Scripts/Components/SimpleSwitch.gd" id="2_xotxe"] +[ext_resource type="PackedScene" uid="uid://bmwu7t5fqfmd5" path="res://Scenes/Components/Switch.tscn" id="1_8we76"] +[ext_resource type="Script" path="res://Scripts/Components/SimpleSwitchConfig.gd" id="2_l3rma"] +[ext_resource type="Script" path="res://Scripts/Components/SimpleSwitchSignalDelegate.gd" id="3_lnafs"] -[sub_resource type="RectangleShape2D" id="RectangleShape2D_e1puu"] +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ytkac"] +resource_local_to_scene = true size = Vector2(0, 0) -[node name="SimpleSwitch" instance=ExtResource("1_a5k7c")] -z_index = -1 -script = ExtResource("2_xotxe") +[node name="SimpleSwitchParent" instance=ExtResource("1_8we76")] +script = ExtResource("2_l3rma") track_variable = "" sensor_size = Vector2(0, 0) feedback_enabled = false default_color = Color(0.745098, 0.745098, 0.745098, 1) active_color = Color(0, 0.392157, 0, 1) -[node name="Polygon2D" type="Polygon2D" parent="." index="0"] +[node name="SignalDelegate" type="Node" parent="." index="0"] +script = ExtResource("3_lnafs") + +[node name="Polygon2D" type="Polygon2D" parent="Switch" index="0"] visible = false color = Color(0.745098, 0.745098, 0.745098, 1) polygon = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0) -[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="1"] -shape = SubResource("RectangleShape2D_e1puu") - -[connection signal="triggered" from="." to="." method="_on_triggered"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Switch" index="1"] +shape = SubResource("RectangleShape2D_ytkac") diff --git a/Scenes/Components/Switch.tscn b/Scenes/Components/Switch.tscn index b7ff167..e71ec6d 100644 --- a/Scenes/Components/Switch.tscn +++ b/Scenes/Components/Switch.tscn @@ -1,13 +1,17 @@ -[gd_scene load_steps=2 format=3 uid="uid://bmwu7t5fqfmd5"] +[gd_scene load_steps=3 format=3 uid="uid://bmwu7t5fqfmd5"] +[ext_resource type="Script" path="res://Scripts/Components/SwitchConfig.gd" id="1_fdbxp"] [ext_resource type="Script" path="res://Scripts/Components/Switch.gd" id="1_rlyjj"] -[node name="Switch" type="Area2D"] +[node name="SwitchParent" type="Node2D"] +script = ExtResource("1_fdbxp") + +[node name="Switch" type="Area2D" parent="."] collision_layer = 0 collision_mask = 4 script = ExtResource("1_rlyjj") -[connection signal="area_entered" from="." to="." method="_on_enter"] -[connection signal="area_exited" from="." to="." method="_on_exit"] -[connection signal="body_entered" from="." to="." method="_on_enter_body"] -[connection signal="body_exited" from="." to="." method="_on_exit_body"] +[connection signal="area_entered" from="Switch" to="Switch" method="_on_enter"] +[connection signal="area_exited" from="Switch" to="Switch" method="_on_exit"] +[connection signal="body_entered" from="Switch" to="Switch" method="_on_enter_body"] +[connection signal="body_exited" from="Switch" to="Switch" method="_on_exit_body"] diff --git a/Scenes/Levels/BadLevelA.tscn b/Scenes/Levels/BadLevelA.tscn index b0ea37c..495829b 100644 --- a/Scenes/Levels/BadLevelA.tscn +++ b/Scenes/Levels/BadLevelA.tscn @@ -1,58 +1,103 @@ -[gd_scene load_steps=20 format=3 uid="uid://dqus00e1w2cj6"] - -[ext_resource type="PackedScene" uid="uid://dyq8mcdsutnsa" path="res://Scenes/Components/LevelBase.tscn" id="1_ov2b1"] -[ext_resource type="Script" path="res://ZZ_Scratch/GreyboxingTools/BadLevelA.gd" id="2_k3sre"] -[ext_resource type="TileSet" uid="uid://c5vrjt6pkv26m" path="res://ZZ_Scratch/GreyboxingTools/test_tileset.tres" id="3_eqe2x"] -[ext_resource type="PackedScene" uid="uid://bx2qjlw58ci20" path="res://Scenes/Components/Greyboxing/GreyboxObject.tscn" id="4_a3thb"] -[ext_resource type="Script" path="res://Scripts/Resources/Effects/SetQuestStateEffect.gd" id="5_bkbnh"] -[ext_resource type="PackedScene" uid="uid://d1y25semyqxkw" path="res://Scenes/Components/Greyboxing/MoveableBlock.tscn" id="6_774fu"] -[ext_resource type="PackedScene" uid="uid://c2kg6apj756dw" path="res://Scenes/Components/NPC.tscn" id="7_ha0ow"] -[ext_resource type="Resource" uid="uid://0e6y5ablkqx" path="res://Scripts/Resources/NPCs/Buckley.tres" id="8_3v584"] -[ext_resource type="Script" path="res://Scripts/Resources/Effects/DialogueEffect.gd" id="9_hipqj"] -[ext_resource type="Resource" path="res://ZZ_Scratch/DialogicValidation/test_timeline.dtl" id="10_o8vd5"] -[ext_resource type="PackedScene" uid="uid://rgvfsx60t2ap" path="res://Scenes/Components/Inventory/Item.tscn" id="11_ubn0w"] -[ext_resource type="Resource" uid="uid://b7w2axnxl0fkt" path="res://Scripts/Resources/Items/Key.tres" id="12_ai8lm"] -[ext_resource type="Script" path="res://Scripts/Resources/Effects/LevelLoadEffect.gd" id="13_mquhu"] -[ext_resource type="PackedScene" uid="uid://b13wrl3bedjku" path="res://Scenes/Components/Torch.tscn" id="14_v6etx"] +[gd_scene load_steps=32 format=3 uid="uid://d4mrsiv1l8m35"] + +[ext_resource type="PackedScene" uid="uid://dyq8mcdsutnsa" path="res://Scenes/Components/LevelBase.tscn" id="1_iejup"] +[ext_resource type="Script" path="res://ZZ_Scratch/GreyboxingTools/BadLevelA.gd" id="2_22a2t"] +[ext_resource type="TileSet" uid="uid://c5vrjt6pkv26m" path="res://ZZ_Scratch/GreyboxingTools/test_tileset.tres" id="2_nrxue"] +[ext_resource type="Script" path="res://Scripts/Resources/Effects/LevelLoadEffect.gd" id="7_7tyl1"] +[ext_resource type="PackedScene" uid="uid://bx2qjlw58ci20" path="res://Scenes/Components/Greyboxing/GreyboxObject.tscn" id="7_ipcqk"] +[ext_resource type="Script" path="res://Scripts/Resources/Effects/SetQuestStateEffect.gd" id="8_m75fk"] +[ext_resource type="PackedScene" uid="uid://d1y25semyqxkw" path="res://Scenes/Components/Greyboxing/MoveableBlock.tscn" id="9_78gjk"] +[ext_resource type="PackedScene" uid="uid://c2kg6apj756dw" path="res://Scenes/Components/NPC.tscn" id="10_0kwe0"] +[ext_resource type="PackedScene" uid="uid://c3fld6my8so3p" path="res://Scenes/Components/SimpleSwitch.tscn" id="10_d5o0s"] +[ext_resource type="Script" path="res://Scripts/Resources/Effects/DialogueEffect.gd" id="11_03hvs"] +[ext_resource type="Script" path="res://Scripts/Resources/Effects/TeleportEffect.gd" id="11_c5j4a"] +[ext_resource type="Resource" uid="uid://0e6y5ablkqx" path="res://Scripts/Resources/NPCs/Buckley.tres" id="12_56eii"] +[ext_resource type="Resource" path="res://ZZ_Scratch/DialogicValidation/test_timeline.dtl" id="12_lpexj"] +[ext_resource type="PackedScene" uid="uid://rgvfsx60t2ap" path="res://Scenes/Components/Inventory/Item.tscn" id="13_1m8di"] +[ext_resource type="Script" path="res://Scripts/Resources/Conditions/DialogicVarCondition.gd" id="13_sg6v0"] +[ext_resource type="Script" path="res://Scripts/Resources/Effects/SetVAREffect.gd" id="14_o0d20"] +[ext_resource type="Resource" uid="uid://b7w2axnxl0fkt" path="res://Scripts/Resources/Items/Key.tres" id="15_svqc7"] +[ext_resource type="Script" path="res://Scripts/Resources/Effects/ConditionalEffect.gd" id="15_x1ixy"] +[ext_resource type="PackedScene" uid="uid://b13wrl3bedjku" path="res://Scenes/Components/Torch.tscn" id="16_p267s"] [sub_resource type="Resource" id="Resource_ecxtb"] -script = ExtResource("5_bkbnh") +script = ExtResource("8_m75fk") quest_id = "test-item-quest" target_state = 1 +[sub_resource type="Resource" id="Resource_ir05h"] +script = ExtResource("11_c5j4a") +dest_path = NodePath("../../../Markers/PlayerStart") + +[sub_resource type="Resource" id="Resource_d5ja3"] +script = ExtResource("13_sg6v0") +variable_name = "QuestVarConditionTest" +check_type = 3 +check_value = "true" + +[sub_resource type="Resource" id="Resource_cnrmo"] +script = ExtResource("14_o0d20") +variable_name = "QuestVarConditionTest" +set_type = "overwrite" +new_value = "true" + +[sub_resource type="Resource" id="Resource_hni0i"] +script = ExtResource("14_o0d20") +variable_name = "QuestVarConditionTest" +set_type = "overwrite" +new_value = "false" + +[sub_resource type="Resource" id="Resource_bqjrh"] +script = ExtResource("15_x1ixy") +condition = Array[Resource("res://Scripts/Resources/TriggerCondition.gd")]([SubResource("Resource_d5ja3")]) +true_path = Array[Resource("res://Scripts/Resources/Effect.gd")]([SubResource("Resource_hni0i")]) +false_path = Array[Resource("res://Scripts/Resources/Effect.gd")]([SubResource("Resource_cnrmo")]) + +[sub_resource type="Resource" id="Resource_goqj7"] +script = ExtResource("14_o0d20") +variable_name = "QuestVarConditionTest" +set_type = "overwrite" +new_value = "true" + +[sub_resource type="Resource" id="Resource_pmht2"] +script = ExtResource("14_o0d20") +variable_name = "QuestVarConditionTest" +set_type = "overwrite" +new_value = "false" + [sub_resource type="Resource" id="Resource_dr3sh"] -script = ExtResource("9_hipqj") -timeline = ExtResource("10_o8vd5") +script = ExtResource("11_03hvs") +timeline = ExtResource("12_lpexj") [sub_resource type="Resource" id="Resource_yblux"] -script = ExtResource("5_bkbnh") +script = ExtResource("8_m75fk") quest_id = "test-var-quest" target_state = 1 [sub_resource type="Resource" id="Resource_yp128"] -script = ExtResource("5_bkbnh") +script = ExtResource("8_m75fk") quest_id = "phase-parent-test" target_state = 1 [sub_resource type="Resource" id="Resource_o1toe"] -script = ExtResource("13_mquhu") +script = ExtResource("7_7tyl1") load_level_name = "BadLevelB" marker_name = "" -[node name="LevelBase" instance=ExtResource("1_ov2b1")] -script = ExtResource("2_k3sre") +[node name="LevelBase" instance=ExtResource("1_iejup")] +script = ExtResource("2_22a2t") [node name="TileMap" parent="." index="0"] -tile_set = ExtResource("3_eqe2x") +tile_set = ExtResource("2_nrxue") layer_0/tile_data = PackedInt32Array(-262151, 458752, 3, -196615, 458752, 3, -131079, 458752, 3, -65543, 458752, 3, -7, 458752, 3, 65529, 458752, 3, 131065, 458752, 3, 196601, 458752, 3, 262137, 458752, 3, 327673, 458752, 3, 393209, 458752, 3, 458745, 458752, 3, 524281, 458752, 3, 589817, 458752, 3, 655353, 458752, 3, 720889, 458752, 3, 786425, 458752, 3, 851961, 458752, 3, 917497, 458752, 3, 983033, 458752, 3, 1048569, 458752, 3, 1114105, 458752, 3, 1179641, 458752, 3, 1245177, 458752, 3, -262150, 458752, 3, -196614, 458752, 3, -131078, 458752, 3, -65542, 458752, 3, -6, 458752, 3, 65530, 458752, 3, 131066, 458752, 3, 196602, 458752, 3, 262138, 458752, 3, 327674, 458752, 3, 393210, 458752, 3, 458746, 458752, 3, 524282, 458752, 3, 589818, 458752, 3, 655354, 458752, 3, 720890, 458752, 3, 786426, 458752, 3, 851962, 458752, 3, 917498, 458752, 3, 983034, 458752, 3, 1048570, 458752, 3, 1114106, 458752, 3, 1179642, 458752, 3, 1245178, 458752, 3, -262149, 458752, 3, -196613, 458752, 3, -131077, 458752, 3, -65541, 458752, 3, -5, 458752, 3, 65531, 458752, 3, 131067, 458752, 3, 196603, 458752, 3, 262139, 458752, 3, 327675, 458752, 3, 393211, 458752, 3, 458747, 458752, 3, 524283, 458752, 3, 589819, 458752, 3, 655355, 458752, 3, 720891, 458752, 3, 786427, 458752, 3, 851963, 458752, 3, 917499, 458752, 3, 983035, 458752, 3, 1048571, 458752, 3, 1114107, 458752, 3, 1179643, 458752, 3, 1245179, 458752, 3, -262148, 458752, 3, -196612, 458752, 3, -131076, 458752, 3, -65540, 458752, 3, -4, 458752, 3, 65532, 458752, 3, 131068, 458752, 3, 196604, 458752, 3, 262140, 458752, 3, 327676, 458752, 3, 393212, 458752, 3, 458748, 458752, 3, 524284, 458752, 3, 589820, 458752, 3, 655356, 458752, 3, 720892, 458752, 3, 786428, 458752, 3, 851964, 458752, 3, 917500, 458752, 3, 983036, 458752, 3, 1048572, 458752, 3, 1114108, 458752, 3, 1179644, 458752, 3, 1245180, 458752, 3, -262147, 458752, 3, -196611, 458752, 3, -131075, 458752, 3, -65539, 458752, 3, -3, 458752, 3, 65533, 458752, 3, 131069, 458752, 3, 196605, 458752, 3, 262141, 458752, 3, 327677, 458752, 3, 393213, 458752, 3, 458749, 458752, 3, 524285, 458752, 3, 589821, 458752, 3, 655357, 458752, 3, 720893, 458752, 3, 786429, 458752, 3, 851965, 458752, 3, 917501, 458752, 3, 983037, 458752, 3, 1048573, 458752, 3, 1114109, 458752, 3, 1179645, 458752, 3, 1245181, 458752, 3, -262146, 458752, 3, -196610, 458752, 3, -131074, 458752, 3, -65538, 458752, 3, -2, 458752, 3, 65534, 458752, 3, 131070, 458752, 3, 196606, 458752, 3, 262142, 458752, 3, 327678, 458752, 3, 393214, 458752, 3, 458750, 458752, 3, 524286, 458752, 3, 589822, 458752, 3, 655358, 458752, 3, 720894, 458752, 3, 786430, 458752, 3, 851966, 458752, 3, 917502, 458752, 3, 983038, 458752, 3, 1048574, 458752, 3, 1114110, 458752, 3, 1179646, 458752, 3, 1245182, 458752, 3, -262145, 458752, 3, -196609, 458752, 3, -131073, 458752, 3, -65537, 458752, 3, -1, 458752, 3, 65535, 458752, 3, 131071, 458752, 3, 196607, 458752, 3, 262143, 458752, 3, 327679, 458752, 3, 393215, 458752, 3, 458751, 458752, 3, 524287, 458752, 3, 589823, 458752, 3, 655359, 458752, 3, 720895, 458752, 3, 786431, 458752, 3, 851967, 458752, 3, 917503, 458752, 3, 983039, 458752, 3, 1048575, 458752, 3, 1114111, 458752, 3, 1179647, 458752, 3, 1245183, 458752, 3, -327680, 458752, 3, -262144, 458752, 3, -196608, 458752, 3, -131072, 458752, 3, -65536, 458752, 3, 0, 458752, 3, 65536, 458752, 3, 131072, 458752, 3, 196608, 458752, 3, 262144, 458752, 3, 327680, 458752, 3, 393216, 458752, 3, 458752, 458752, 3, 524288, 458752, 3, 589824, 458752, 3, 655360, 458752, 3, 720896, 458752, 3, 786432, 458752, 3, 851968, 458752, 3, 917504, 458752, 3, 983040, 458752, 3, 1048576, 458752, 3, 1114112, 458752, 3, 1179648, 458752, 3, -327679, 458752, 3, -262143, 458752, 3, -196607, 458752, 3, -131071, 458752, 3, -65535, 458752, 3, 1, 458752, 3, 65537, 458752, 3, 131073, 458752, 3, 196609, 458752, 3, 262145, 458752, 3, 327681, 458752, 3, 393217, 458752, 3, 458753, 458752, 3, 524289, 458752, 3, 589825, 458752, 3, 655361, 458752, 3, 720897, 458752, 3, 786433, 458752, 3, 851969, 458752, 3, 917505, 458752, 3, 983041, 458752, 3, 1048577, 458752, 3, 1114113, 458752, 3, 1179649, 458752, 3, -327678, 458752, 3, -262142, 458752, 3, -196606, 458752, 3, -131070, 458752, 3, -65534, 458752, 3, 2, 458752, 3, 65538, 458752, 3, 131074, 458752, 3, 196610, 458752, 3, 262146, 458752, 3, 327682, 458752, 3, 393218, 458752, 3, 458754, 458752, 3, 524290, 458752, 3, 589826, 458752, 3, 655362, 458752, 3, 720898, 458752, 3, 786434, 458752, 3, 851970, 458752, 3, 917506, 458752, 3, 983042, 458752, 3, 1048578, 458752, 3, 1114114, 458752, 3, 1179650, 458752, 3, -327677, 458752, 3, -262141, 458752, 3, -196605, 458752, 3, -131069, 458752, 3, -65533, 458752, 3, 3, 458752, 3, 65539, 458752, 3, 131075, 458752, 3, 196611, 458752, 3, 262147, 458752, 3, 327683, 458752, 3, 393219, 458752, 3, 458755, 458752, 3, 524291, 458752, 3, 589827, 458752, 3, 655363, 458752, 3, 720899, 458752, 3, 786435, 458752, 3, 851971, 458752, 3, 917507, 458752, 3, 983043, 458752, 3, 1048579, 458752, 3, 1114115, 458752, 3, 1179651, 458752, 3, -327676, 458752, 3, -262140, 458752, 3, -196604, 458752, 3, -131068, 458752, 3, -65532, 458752, 3, 4, 458752, 3, 65540, 458752, 3, 131076, 458752, 3, 196612, 458752, 3, 262148, 458752, 3, 327684, 458752, 3, 393220, 458752, 3, 458756, 458752, 3, 524292, 458752, 3, 589828, 458752, 3, 655364, 458752, 3, 720900, 458752, 3, 786436, 458752, 3, 851972, 458752, 3, 917508, 458752, 3, 983044, 458752, 3, 1048580, 458752, 3, 1114116, 458752, 3, 1179652, 458752, 3, -327675, 458752, 3, -262139, 458752, 3, -196603, 458752, 3, -131067, 458752, 3, -65531, 458752, 3, 5, 458752, 3, 65541, 458752, 3, 131077, 458752, 3, 196613, 458752, 3, 262149, 458752, 3, 327685, 458752, 3, 393221, 458752, 3, 458757, 458752, 3, 524293, 458752, 3, 589829, 458752, 3, 655365, 458752, 3, 720901, 458752, 3, 786437, 458752, 3, 851973, 458752, 3, 917509, 458752, 3, 983045, 458752, 3, 1048581, 458752, 3, 1114117, 458752, 3, 1179653, 458752, 3, -327674, 458752, 3, -262138, 458752, 3, -196602, 458752, 3, -131066, 458752, 3, -65530, 458752, 3, 6, 458752, 3, 65542, 458752, 3, 131078, 458752, 3, 196614, 458752, 3, 262150, 458752, 3, 327686, 458752, 3, 393222, 458752, 3, 458758, 458752, 3, 524294, 458752, 3, 589830, 458752, 3, 655366, 458752, 3, 720902, 458752, 3, 786438, 458752, 3, 851974, 458752, 3, 917510, 458752, 3, 983046, 458752, 3, 1048582, 458752, 3, 1114118, 458752, 3, 1179654, 458752, 3, -327673, 458752, 3, -262137, 458752, 3, -196601, 458752, 3, -131065, 458752, 3, -65529, 458752, 3, 7, 458752, 3, 65543, 458752, 3, 131079, 458752, 3, 196615, 458752, 3, 262151, 458752, 3, 327687, 458752, 3, 393223, 458752, 3, 458759, 458752, 3, 524295, 458752, 3, 589831, 458752, 3, 655367, 458752, 3, 720903, 458752, 3, 786439, 458752, 3, 851975, 458752, 3, 917511, 458752, 3, 983047, 458752, 3, 1048583, 458752, 3, 1114119, 458752, 3, 1179655, 458752, 3, -327672, 458752, 3, -262136, 458752, 3, -196600, 458752, 3, -131064, 458752, 3, -65528, 458752, 3, 8, 458752, 3, 65544, 458752, 3, 131080, 458752, 3, 196616, 458752, 3, 262152, 458752, 3, 327688, 458752, 3, 393224, 458752, 3, 458760, 458752, 3, 524296, 458752, 3, 589832, 458752, 3, 655368, 458752, 3, 720904, 458752, 3, 786440, 458752, 3, 851976, 458752, 3, 917512, 458752, 3, 983048, 458752, 3, 1048584, 458752, 3, 1114120, 458752, 3, 1179656, 458752, 3, -327671, 458752, 3, -262135, 458752, 3, -196599, 458752, 3, -131063, 458752, 3, -65527, 458752, 3, 9, 458752, 3, 65545, 458752, 3, 131081, 458752, 3, 196617, 458752, 3, 262153, 458752, 3, 327689, 458752, 3, 393225, 458752, 3, 458761, 458752, 3, 524297, 458752, 3, 589833, 458752, 3, 655369, 458752, 3, 720905, 458752, 3, 786441, 458752, 3, 851977, 458752, 3, 917513, 458752, 3, 983049, 458752, 3, 1048585, 458752, 3, 1114121, 458752, 3, 1179657, 458752, 3, -327670, 458752, 3, -262134, 458752, 3, -196598, 458752, 3, -131062, 458752, 3, -65526, 458752, 3, 10, 458752, 3, 65546, 458752, 3, 131082, 458752, 3, 196618, 458752, 3, 262154, 458752, 3, 327690, 458752, 3, 393226, 458752, 3, 458762, 458752, 3, 524298, 458752, 3, 589834, 458752, 3, 655370, 458752, 3, 720906, 458752, 3, 786442, 458752, 3, 851978, 458752, 3, 917514, 458752, 3, 983050, 458752, 3, 1048586, 458752, 3, 1114122, 458752, 3, 1179658, 458752, 3, -327669, 458752, 3, -262133, 458752, 3, -196597, 458752, 3, -131061, 458752, 3, -65525, 458752, 3, 11, 458752, 3, 65547, 458752, 3, 131083, 458752, 3, 196619, 458752, 3, 262155, 458752, 3, 327691, 458752, 3, 393227, 458752, 3, 458763, 458752, 3, 524299, 458752, 3, 589835, 458752, 3, 655371, 458752, 3, 720907, 458752, 3, 786443, 458752, 3, 851979, 458752, 3, 917515, 458752, 3, 983051, 458752, 3, 1048587, 458752, 3, 1114123, 458752, 3, 1179659, 458752, 3, -327668, 458752, 3, -262132, 458752, 3, -196596, 458752, 3, -131060, 458752, 3, -65524, 458752, 3, 12, 458752, 3, 65548, 458752, 3, 131084, 458752, 3, 196620, 458752, 3, 262156, 458752, 3, 327692, 458752, 3, 393228, 458752, 3, 458764, 458752, 3, 524300, 458752, 3, 589836, 458752, 3, 655372, 458752, 3, 720908, 458752, 3, 786444, 458752, 3, 851980, 458752, 3, 917516, 458752, 3, 983052, 458752, 3, 1048588, 458752, 3, 1114124, 458752, 3, 1179660, 458752, 3, -327667, 458752, 3, -262131, 458752, 3, -196595, 458752, 3, -131059, 458752, 3, -65523, 458752, 3, 13, 458752, 3, 65549, 458752, 3, 131085, 458752, 3, 196621, 458752, 3, 262157, 458752, 3, 327693, 458752, 3, 393229, 458752, 3, 458765, 458752, 3, 524301, 458752, 3, 589837, 458752, 3, 655373, 458752, 3, 720909, 458752, 3, 786445, 458752, 3, 851981, 458752, 3, 917517, 458752, 3, 983053, 458752, 3, 1048589, 458752, 3, 1114125, 458752, 3, 1179661, 458752, 3, -327666, 458752, 3, -262130, 458752, 3, -196594, 458752, 3, -131058, 458752, 3, -65522, 458752, 3, 14, 458752, 3, 65550, 458752, 3, 131086, 458752, 3, 196622, 458752, 3, 262158, 458752, 3, 327694, 458752, 3, 393230, 458752, 3, 458766, 458752, 3, 524302, 458752, 3, 589838, 458752, 3, 655374, 458752, 3, 720910, 458752, 3, 786446, 458752, 3, 851982, 458752, 3, 917518, 458752, 3, 983054, 458752, 3, 1048590, 458752, 3, 1114126, 458752, 3, 1179662, 458752, 3, -327665, 458752, 3, -262129, 458752, 3, -196593, 458752, 3, -131057, 458752, 3, -65521, 458752, 3, 15, 458752, 3, 65551, 458752, 3, 131087, 458752, 3, 196623, 458752, 3, 262159, 458752, 3, 327695, 458752, 3, 393231, 458752, 3, 458767, 458752, 3, 524303, 458752, 3, 589839, 458752, 3, 655375, 458752, 3, 720911, 458752, 3, 786447, 458752, 3, 851983, 458752, 3, 917519, 458752, 3, 983055, 458752, 3, 1048591, 458752, 3, 1114127, 458752, 3, 1179663, 458752, 3, -327664, 458752, 3, -262128, 458752, 3, -196592, 458752, 3, -131056, 458752, 3, -65520, 458752, 3, 16, 458752, 3, 65552, 458752, 3, 131088, 458752, 3, 196624, 458752, 3, 262160, 458752, 3, 327696, 458752, 3, 393232, 458752, 3, 458768, 458752, 3, 524304, 458752, 3, 589840, 458752, 3, 655376, 458752, 3, 720912, 458752, 3, 786448, 458752, 3, 851984, 458752, 3, 917520, 458752, 3, 983056, 458752, 3, 1048592, 458752, 3, 1114128, 458752, 3, 1179664, 458752, 3, -327663, 458752, 3, -262127, 458752, 3, -196591, 458752, 3, -131055, 458752, 3, -65519, 458752, 3, 17, 458752, 3, 65553, 458752, 3, 131089, 458752, 3, 196625, 458752, 3, 262161, 458752, 3, 327697, 458752, 3, 393233, 458752, 3, 458769, 458752, 3, 524305, 458752, 3, 589841, 458752, 3, 655377, 458752, 3, 720913, 458752, 3, 786449, 458752, 3, 851985, 458752, 3, 917521, 458752, 3, 983057, 458752, 3, 1048593, 458752, 3, 1114129, 458752, 3, 1179665, 458752, 3, -327662, 458752, 3, -262126, 458752, 3, -196590, 458752, 3, -131054, 458752, 3, -65518, 458752, 3, 18, 458752, 3, 65554, 458752, 3, 131090, 458752, 3, 196626, 458752, 3, 262162, 458752, 3, 327698, 458752, 3, 393234, 458752, 3, 458770, 458752, 3, 524306, 458752, 3, 589842, 458752, 3, 655378, 458752, 3, 720914, 458752, 3, 786450, 458752, 3, 851986, 458752, 3, 917522, 458752, 3, 983058, 458752, 3, 1048594, 458752, 3, 1114130, 458752, 3, 1179666, 458752, 3, -327661, 458752, 3, -262125, 458752, 3, -196589, 458752, 3, -131053, 458752, 3, -65517, 458752, 3, 19, 458752, 3, 65555, 458752, 3, 131091, 458752, 3, 196627, 458752, 3, 262163, 458752, 3, 327699, 458752, 3, 393235, 458752, 3, 458771, 458752, 3, 524307, 458752, 3, 589843, 458752, 3, 655379, 458752, 3, 720915, 458752, 3, 786451, 458752, 3, 851987, 458752, 3, 917523, 458752, 3, 983059, 458752, 3, 1048595, 458752, 3, 1114131, 458752, 3, 1179667, 458752, 3, -327660, 458752, 3, -262124, 458752, 3, -196588, 458752, 3, -131052, 458752, 3, -65516, 458752, 3, 20, 458752, 3, 65556, 458752, 3, 131092, 458752, 3, 196628, 458752, 3, 262164, 458752, 3, 327700, 458752, 3, 393236, 458752, 3, 458772, 458752, 3, 524308, 458752, 3, 589844, 458752, 3, 655380, 458752, 3, 720916, 458752, 3, 786452, 458752, 3, 851988, 458752, 3, 917524, 458752, 3, 983060, 458752, 3, 1048596, 458752, 3, 1114132, 458752, 3, 1179668, 458752, 3, -327659, 458752, 3, -262123, 458752, 3, -196587, 458752, 3, -131051, 458752, 3, -65515, 458752, 3, 21, 458752, 3, 65557, 458752, 3, 131093, 458752, 3, 196629, 458752, 3, 262165, 458752, 3, 327701, 458752, 3, 393237, 458752, 3, 458773, 458752, 3, 524309, 458752, 3, 589845, 458752, 3, 655381, 458752, 3, 720917, 458752, 3, 786453, 458752, 3, 851989, 458752, 3, 917525, 458752, 3, 983061, 458752, 3, 1048597, 458752, 3, 1114133, 458752, 3, 1179669, 458752, 3, -327658, 458752, 3, -262122, 458752, 3, -196586, 458752, 3, -131050, 458752, 3, -65514, 458752, 3, 22, 458752, 3, 65558, 458752, 3, 131094, 458752, 3, 196630, 458752, 3, 262166, 458752, 3, 327702, 458752, 3, 393238, 458752, 3, 458774, 458752, 3, 524310, 458752, 3, 589846, 458752, 3, 655382, 458752, 3, 720918, 458752, 3, 786454, 458752, 3, 851990, 458752, 3, 917526, 458752, 3, 983062, 458752, 3, 1048598, 458752, 3, 1114134, 458752, 3, 1179670, 458752, 3, -327657, 458752, 3, -262121, 458752, 3, -196585, 458752, 3, -131049, 458752, 3, -65513, 458752, 3, 23, 458752, 3, 65559, 458752, 3, 131095, 458752, 3, 196631, 458752, 3, 262167, 458752, 3, 327703, 458752, 3, 393239, 458752, 3, 458775, 458752, 3, 524311, 458752, 3, 589847, 458752, 3, 655383, 458752, 3, 720919, 458752, 3, 786455, 458752, 3, 851991, 458752, 3, 917527, 458752, 3, 983063, 458752, 3, 1048599, 458752, 3, 1114135, 458752, 3, 1179671, 458752, 3, -327656, 458752, 3, -262120, 458752, 3, -196584, 458752, 3, -131048, 458752, 3, -65512, 458752, 3, 24, 458752, 3, 65560, 458752, 3, 131096, 458752, 3, 196632, 458752, 3, 262168, 458752, 3, 327704, 458752, 3, 393240, 458752, 3, 458776, 458752, 3, 524312, 458752, 3, 589848, 458752, 3, 655384, 458752, 3, 720920, 458752, 3, 786456, 458752, 3, 851992, 458752, 3, 917528, 458752, 3, 983064, 458752, 3, 1048600, 458752, 3, 1114136, 458752, 3, 1179672, 458752, 3, -327655, 458752, 3, -262119, 458752, 3, -196583, 458752, 3, -131047, 458752, 3, -65511, 458752, 3, 25, 458752, 3, 65561, 458752, 3, 131097, 458752, 3, 196633, 458752, 3, 262169, 458752, 3, 327705, 458752, 3, 393241, 458752, 3, 458777, 458752, 3, 524313, 458752, 3, 589849, 458752, 3, 655385, 458752, 3, 720921, 458752, 3, 786457, 458752, 3, 851993, 458752, 3, 917529, 458752, 3, 983065, 458752, 3, 1048601, 458752, 3, 1114137, 458752, 3, 1179673, 458752, 3, -327654, 458752, 3, -262118, 458752, 3, -196582, 458752, 3, -131046, 458752, 3, -65510, 458752, 3, 26, 458752, 3, 65562, 458752, 3, 131098, 458752, 3, 196634, 458752, 3, 262170, 458752, 3, 327706, 458752, 3, 393242, 458752, 3, 458778, 458752, 3, 524314, 458752, 3, 589850, 458752, 3, 655386, 458752, 3, 720922, 458752, 3, 786458, 458752, 3, 851994, 458752, 3, 917530, 458752, 3, 983066, 458752, 3, 1048602, 458752, 3, 1114138, 458752, 3, 1179674, 458752, 3, -327653, 458752, 3, -262117, 458752, 3, -196581, 458752, 3, -131045, 458752, 3, -65509, 458752, 3, 27, 458752, 3, 65563, 458752, 3, 131099, 458752, 3, 196635, 458752, 3, 262171, 458752, 3, 327707, 458752, 3, 393243, 458752, 3, 458779, 458752, 3, 524315, 458752, 3, 589851, 458752, 3, 655387, 458752, 3, 720923, 458752, 3, 786459, 458752, 3, 851995, 458752, 3, 917531, 458752, 3, 983067, 458752, 3, 1048603, 458752, 3, 1114139, 458752, 3, 1179675, 458752, 3, -327652, 458752, 3, -262116, 458752, 3, -196580, 458752, 3, -131044, 458752, 3, -65508, 458752, 3, 28, 458752, 3, 65564, 458752, 3, 131100, 458752, 3, 196636, 458752, 3, 262172, 458752, 3, 327708, 458752, 3, 393244, 458752, 3, 458780, 458752, 3, 524316, 458752, 3, 589852, 458752, 3, 655388, 458752, 3, 720924, 458752, 3, 786460, 458752, 3, 851996, 458752, 3, 917532, 458752, 3, 983068, 458752, 3, 1048604, 458752, 3, 1114140, 458752, 3, 1179676, 458752, 3, -327651, 458752, 3, -262115, 458752, 3, -196579, 458752, 3, -131043, 458752, 3, -65507, 458752, 3, 29, 458752, 3, 65565, 458752, 3, 131101, 458752, 3, 196637, 458752, 3, 262173, 458752, 3, 327709, 458752, 3, 393245, 458752, 3, 458781, 458752, 3, 524317, 458752, 3, 589853, 458752, 3, 655389, 458752, 3, 720925, 458752, 3, 786461, 458752, 3, 851997, 458752, 3, 917533, 458752, 3, 983069, 458752, 3, 1048605, 458752, 3, 1114141, 458752, 3, 1179677, 458752, 3) layer_1/tile_data = PackedInt32Array(720915, 196608, 5, 655379, 327680, 5, 589843, 327680, 5, 524307, 262144, 5, 458771, 262144, 3, 393235, 262144, 3, 327699, 262144, 3, 262163, 262144, 3, 196627, 327680, 5, 131091, 262144, 3, 65555, 327680, 5, 19, 327680, 5, -65517, 262144, 3, 720914, 196608, 5, 655378, 327680, 5, 589842, 262144, 5, 524306, 327680, 5, 458770, 262144, 3, 393234, 262144, 5, 327698, 262144, 3, 262162, 262144, 3, 196626, 262144, 3, 131090, 327680, 5, 65554, 327680, 5, 18, 262144, 5, -65518, 262144, 5, 720913, 327680, 5, 655377, 196608, 5, 589841, 262144, 5, 524305, 262144, 5, 458769, 327680, 5, 393233, 196608, 5, 327697, 327680, 5, 262161, 262144, 5, 196625, 262144, 5, 131089, 196608, 5, 65553, 327680, 5, 17, 262144, 3, -65519, 262144, 3, 720912, 196608, 5, 655376, 262144, 5, 589840, 327680, 5, 524304, 196608, 5, 458768, 262144, 5, 393232, 327680, 5, 327696, 262144, 5, 262160, 196608, 5, 196624, 262144, 5, 131088, 262144, 3, 65552, 196608, 5, 16, 196608, 5, -65520, 262144, 3, 720911, 262144, 3, 655375, 262144, 5, 589839, 262144, 3, 524303, 262144, 5, 458767, 196608, 5, 393231, 196608, 5, 327695, 262144, 5, 262159, 262144, 5, 196623, 262144, 3, 131087, 262144, 3, 65551, 262144, 3, 15, 196608, 5, -65521, 327680, 5, 720910, 196608, 5, 655374, 262144, 5, 589838, 262144, 3, 524302, 262144, 3, 458766, 262144, 3, 393230, 196608, 5, 327694, 327680, 5, 262158, 262144, 3, 196622, 262144, 3, 131086, 196608, 5, 65550, 327680, 5, 14, 262144, 5, -65522, 327680, 5, 720909, 327680, 5, 655373, 262144, 5, 589837, 262144, 5, 524301, 262144, 5, 458765, 327680, 5, 393229, 262144, 3, 327693, 327680, 5, 262157, 262144, 5, 196621, 327680, 5, 131085, 262144, 3, 65549, 262144, 3, 13, 196608, 5, -65523, 327680, 5, 720908, 196608, 5, 655372, 196608, 5, 589836, 262144, 5, 524300, 262144, 3, 458764, 327680, 5, 393228, 196608, 5, 327692, 196608, 5, 262156, 262144, 5, 196620, 327680, 5, 131084, 196608, 5, 65548, 196608, 5, 12, 327680, 5, -65524, 262144, 5, 720907, 262144, 3, 655371, 262144, 5, 589835, 262144, 5, 524299, 196608, 5, 458763, 262144, 3, 393227, 196608, 5, 327691, 262144, 5, 262155, 196608, 5, 196619, 262144, 3, 131083, 262144, 3, 65547, 327680, 5, 11, 196608, 5, -65525, 262144, 5, 720906, 262144, 3, 655370, 327680, 5, 589834, 262144, 3, 524298, 327680, 5, 458762, 327680, 5, 393226, 196608, 5, 327690, 262144, 3, 262154, 262144, 5, 196618, 196608, 5, 131082, 196608, 5, 65546, 196608, 5, 10, 327680, 5, -65526, 262144, 3, 720905, 262144, 5, 655369, 327680, 5, 589833, 262144, 3, 524297, 196608, 5, 458761, 262144, 5, 393225, 327680, 5, 327689, 262144, 3, 262153, 262144, 3, 196617, 262144, 3, 131081, 262144, 3, 65545, 327680, 5, 9, 196608, 5, -65527, 262144, 5, 720904, 196608, 5, 655368, 262144, 3, 589832, 196608, 5, 524296, 262144, 3, 458760, 196608, 5, 393224, 262144, 3, 327688, 262144, 5, 262152, 262144, 3, 196616, 262144, 5, 131080, 196608, 5, 65544, 262144, 5, 8, 327680, 5, -65528, 327680, 5, 720903, 327680, 5, 655367, 327680, 5, 589831, 262144, 3, 524295, 327680, 5, 458759, 262144, 3, 393223, 262144, 5, 327687, 327680, 5, 262151, 262144, 3, 196615, 262144, 5, 131079, 262144, 3, 65543, 327680, 5, 7, 262144, 5, -65529, 262144, 3, 720902, 262144, 3, 655366, 262144, 3, 589830, 327680, 5, 524294, 262144, 3, 458758, 327680, 5, 393222, 196608, 5, 327686, 196608, 5, 262150, 327680, 5, 196614, 196608, 5, 131078, 262144, 3, 65542, 196608, 5, 6, 196608, 5, -65530, 262144, 3, 720901, 196608, 5, 655365, 262144, 3, 589829, 327680, 5, 524293, 327680, 5, 458757, 327680, 5, 393221, 262144, 5, 327685, 196608, 5, 262149, 196608, 5, 196613, 327680, 5, 131077, 196608, 5, 65541, 262144, 5, 5, 327680, 5, -65531, 327680, 5, 720900, 196608, 5, 655364, 262144, 3, 589828, 196608, 5, 524292, 262144, 5, 458756, 262144, 5, 393220, 262144, 3, 327684, 262144, 3, 262148, 196608, 5, 196612, 327680, 5, 131076, 262144, 3, 65540, 327680, 5, 4, 327680, 5, -65532, 327680, 5, 720899, 196608, 5, 655363, 262144, 3, 589827, 262144, 3, 524291, 196608, 5, 458755, 262144, 5, 393219, 327680, 5, 327683, 327680, 5, 262147, 327680, 5, 196611, 262144, 5, 131075, 327680, 5, 65539, 262144, 3, 3, 262144, 5, -65533, 327680, 5, 720898, 262144, 5, 655362, 262144, 5, 589826, 196608, 5, 524290, 327680, 5, 458754, 196608, 5, 393218, 196608, 5, 327682, 262144, 3, 262146, 262144, 3, 196610, 327680, 5, 131074, 327680, 5, 65538, 262144, 3, 2, 196608, 5, -65534, 196608, 5, 720897, 262144, 5, 655361, 262144, 3, 589825, 196608, 5, 524289, 262144, 5, 458753, 262144, 5, 393217, 262144, 3, 327681, 262144, 5, 262145, 262144, 5, 196609, 262144, 3, 131073, 262144, 5, 65537, 196608, 5, 1, 262144, 3, -65535, 196608, 5, 720896, 262144, 5, 655360, 262144, 3, 589824, 262144, 3, 524288, 262144, 5, 458752, 196608, 5, 393216, 262144, 3, 327680, 196608, 5, 262144, 327680, 5, 196608, 262144, 5, 131072, 196608, 5, 65536, 262144, 5, 0, 196608, 5, -65536, 262144, 5, 786431, 196608, 5, 720895, 196608, 5, 655359, 262144, 5, 589823, 262144, 3, 524287, 327680, 5, 458751, 262144, 5, 393215, 262144, 3, 327679, 327680, 5, 262143, 262144, 5, 196607, 196608, 5, 131071, 327680, 5, 65535, 327680, 5, -1, 262144, 5, 786430, 262144, 5, 720894, 327680, 5, 655358, 262144, 5, 589822, 262144, 3, 524286, 327680, 5, 458750, 262144, 5, 393214, 262144, 5, 327678, 262144, 5, 262142, 327680, 5, 196606, 262144, 5, 131070, 262144, 3, 65534, 262144, 5, -2, 262144, 5, 65533, 196608, 3, -3, 196608, 3, -65539, 196608, 2, -65538, 262144, 2, -65537, 262144, 2, 131069, 196608, 3, 196605, 196608, 3, 262141, 196608, 3, 327677, 196608, 3, 393213, 196608, 3, 458749, 196608, 3, 524285, 196608, 3, 589821, 196608, 3, 655357, 196608, 3, 720893, 196608, 3, 786429, 196608, 3, 851967, 262144, 4, 851966, 262144, 4, 851965, 196608, 4, -131072, 262144, 2, 786432, 262144, 4, -131071, 262144, 2, 786433, 262144, 4, -131070, 262144, 2, 786434, 262144, 4, -131069, 262144, 2, 786435, 262144, 4, -131068, 262144, 2, 786436, 262144, 4, -131067, 262144, 2, 786437, 262144, 4, -131066, 262144, 2, 786438, 262144, 4, -131065, 262144, 2, 786439, 262144, 4, -131064, 262144, 2, 786440, 262144, 4, -131063, 262144, 2, 786441, 262144, 4, -131062, 262144, 2, 786442, 262144, 4, -131061, 262144, 2, 786443, 262144, 4, -131060, 262144, 2, 786444, 262144, 4, -131059, 262144, 2, 786445, 262144, 4, -131058, 262144, 2, 786446, 262144, 4, -131057, 262144, 2, 786447, 262144, 4, -131056, 262144, 2, 786448, 262144, 4, -131055, 262144, 2, 786449, 262144, 4, -131054, 262144, 2, 786450, 262144, 4, -131053, 262144, 2, 786451, 262144, 4, -65516, 327680, 3, 20, 327680, 3, -131052, 327680, 2, 65556, 327680, 3, 131092, 327680, 3, 196628, 327680, 3, 262164, 327680, 3, 327700, 327680, 3, 393236, 327680, 3, 458772, 327680, 3, 524308, 327680, 3, 589844, 327680, 3, 655380, 327680, 3, 720916, 327680, 3, 786452, 327680, 4) layer_3/tile_data = PackedInt32Array(262150, 0, 6, 262152, 327680, 6, 262155, 262144, 6, 524291, 65536, 6, 458761, 393216, 6, 524294, 327680, 6, 524300, 262144, 6, 196621, 589824, 0, 262158, 589824, 0, 131088, 589824, 0, 262161, 589824, 0) [node name="CanopyMap" parent="." index="1"] -tile_set = ExtResource("3_eqe2x") +tile_set = ExtResource("2_nrxue") layer_0/tile_data = PackedInt32Array(196625, 589824, 3, 65552, 589824, 3, 131085, 589824, 3, 196622, 589824, 3) -[node name="testobj" parent="Objects" index="0" instance=ExtResource("4_a3thb")] +[node name="testobj" parent="Objects" index="0" instance=ExtResource("7_ipcqk")] position = Vector2(3, 362) size = Vector2(2, 3.5) can_block_movement = true @@ -61,27 +106,63 @@ action_verb = 5 effects = Array[Resource("res://Scripts/Resources/Effect.gd")]([SubResource("Resource_ecxtb")]) y_sort_width = 104 -[node name="MoveableBlock" parent="Objects" index="1" instance=ExtResource("6_774fu")] +[node name="MoveableBlock" parent="Objects" index="1" instance=ExtResource("9_78gjk")] position = Vector2(138, 172) collision_layer = 5 id = "block-right" -[node name="MoveableBlock2" parent="Objects" index="2" instance=ExtResource("6_774fu")] +[node name="MoveableBlock2" parent="Objects" index="2" instance=ExtResource("9_78gjk")] position = Vector2(71, 171) id = "block-left" -[node name="mayor_buckley" parent="Objects/Characters" index="0" instance=ExtResource("7_ha0ow")] +[node name="aoeu" parent="Objects/Switches" index="0" instance=ExtResource("10_d5o0s")] +position = Vector2(36, 116) +sensor_size = Vector2(20, 20) +feedback_enabled = true +on_pressed_effects = Array[Resource("res://Scripts/Resources/Effect.gd")]([SubResource("Resource_ir05h")]) + +[node name="Switch" parent="Objects/Switches" index="1" instance=ExtResource("10_d5o0s")] +z_index = -1 +position = Vector2(598, 282) +track_variable = "QuestVarConditionTest" +sensor_size = Vector2(64, 20) +feedback_enabled = true +default_color = Color(0.61339, 0.61339, 0.61339, 1) +active_color = Color(0.401161, 0.710938, 0.374908, 1) +on_pressed_effects = Array[Resource("res://Scripts/Resources/Effect.gd")]([SubResource("Resource_bqjrh")]) + +[node name="Switch_2" parent="Objects/Switches" index="2" instance=ExtResource("10_d5o0s")] +z_index = -1 +position = Vector2(592.329, 339.083) +sensor_size = Vector2(20, 20) +feedback_enabled = true +default_color = Color(0.61339, 0.61339, 0.61339, 1) +active_color = Color(0.401161, 0.710938, 0.374908, 1) +on_pressed_effects = Array[Resource("res://Scripts/Resources/Effect.gd")]([SubResource("Resource_goqj7")]) +on_released_effects = Array[Resource("res://Scripts/Resources/Effect.gd")]([SubResource("Resource_pmht2")]) + +[node name="Switch_3" parent="Objects/Switches" index="3" instance=ExtResource("10_d5o0s")] +z_index = -1 +position = Vector2(-12, 171) +sensor_size = Vector2(20, 20) +feedback_enabled = true +default_color = Color(0.61339, 0.61339, 0.61339, 1) +active_color = Color(0.878906, 0.0274658, 0.3268, 1) +single_fire = true +id_mask = Array[String](["block-left"]) + +[node name="mayor_buckley" parent="Objects/Characters" index="0" instance=ExtResource("10_0kwe0")] position = Vector2(534, 289) -config = ExtResource("8_3v584") +config = ExtResource("12_56eii") dlg = SubResource("Resource_dr3sh") id = "mayor_buckley" -[node name="QUEST_KEY" parent="Objects/Items" index="0" instance=ExtResource("11_ubn0w")] +[node name="QUEST_KEY" parent="Objects/Items" index="0" instance=ExtResource("13_1m8di")] position = Vector2(170.04, 350.165) -item = ExtResource("12_ai8lm") +item = ExtResource("15_svqc7") quantity = 1 -[node name="variable-quest-giver" parent="Objects" index="6" instance=ExtResource("4_a3thb")] +[node name="variable-quest-giver" parent="Objects" index="6" instance=ExtResource("7_ipcqk")] position = Vector2(325.779, 327.512) can_block_movement = true can_interact = true @@ -89,7 +170,7 @@ tint = Color(0.171265, 0.539106, 0.71875, 1) action_verb = 5 effects = Array[Resource("res://Scripts/Resources/Effect.gd")]([SubResource("Resource_yblux")]) -[node name="GreyboxObj" parent="Objects" index="7" instance=ExtResource("4_a3thb")] +[node name="GreyboxObj" parent="Objects" index="7" instance=ExtResource("7_ipcqk")] position = Vector2(451, 319) can_block_movement = true can_interact = true @@ -97,7 +178,7 @@ tint = Color(0.171875, 0.6875, 0.179932, 1) action_verb = 5 effects = Array[Resource("res://Scripts/Resources/Effect.gd")]([SubResource("Resource_yp128")]) -[node name="LevelTeleport" parent="Objects" index="8" instance=ExtResource("4_a3thb")] +[node name="LevelTeleport" parent="Objects" index="8" instance=ExtResource("7_ipcqk")] position = Vector2(112, 68) size = Vector2(2, 2) can_block_movement = true @@ -105,13 +186,13 @@ can_interact = true effects = Array[Resource("res://Scripts/Resources/Effect.gd")]([SubResource("Resource_o1toe")]) y_sort_width = 104 -[node name="Torch" parent="Objects/Lighting" index="0" instance=ExtResource("14_v6etx")] +[node name="Torch" parent="Objects/Lighting" index="0" instance=ExtResource("16_p267s")] position = Vector2(273, 156) light_energy = 0.7 light_size = 2.0 display_height = 2 -[node name="Torch_2" parent="Objects/Lighting" index="1" instance=ExtResource("14_v6etx")] +[node name="Torch_2" parent="Objects/Lighting" index="1" instance=ExtResource("16_p267s")] position = Vector2(207, 156) light_energy = 0.7 light_size = 2.0 @@ -122,4 +203,6 @@ position = Vector2(522, 183) [node name="CanvasModulate" parent="." index="4"] visible = false -color = Color(0.122252, 0.122252, 0.122252, 1) +color = Color(0.411765, 0.411765, 0.411765, 1) + +[connection signal="triggered" from="Objects/Switches/aoeu" to="." method="_on_test_a_triggered"] diff --git a/Scripts/Components/LevelBase.gd b/Scripts/Components/LevelBase.gd index c6cd716..973f675 100644 --- a/Scripts/Components/LevelBase.gd +++ b/Scripts/Components/LevelBase.gd @@ -11,7 +11,7 @@ const DEFAULT_MARKER: String = "PlayerStart" return editor_overlay_color set(value): editor_overlay_color = value - if Engine.is_editor_hint(): + if Engine.is_editor_hint() && _canvas_modulate != null: _canvas_modulate.color = value ## When enabled the color overlay will be applied. When unset it will not. @@ -20,7 +20,7 @@ const DEFAULT_MARKER: String = "PlayerStart" return apply_editor_overlay set(value): apply_editor_overlay = value - if Engine.is_editor_hint(): + if Engine.is_editor_hint() && _canvas_modulate != null: _canvas_modulate.visible = apply_editor_overlay var driver: Driver @@ -29,11 +29,11 @@ var level_name: String = name var _canvas_modulate: CanvasModulate = null: get: - var path := "CanwasModulate" + var path := "CanvasModulate" if has_node(path): # done as a property getter because we can't use @onready as part of @tool # script and I don't know a better pattern - return get_node("CanvasModulate") + return get_node(path) return null @onready var _marker_root := $Markers diff --git a/Scripts/Components/SimpleSwitch.gd b/Scripts/Components/SimpleSwitch.gd deleted file mode 100644 index 500ac01..0000000 --- a/Scripts/Components/SimpleSwitch.gd +++ /dev/null @@ -1,50 +0,0 @@ -@tool -class_name SimpleSwitch -extends Switch - -@export var track_variable: String = "" -@export var sensor_size: Vector2 - -@export_category("Visual Feedback") -@export var feedback_enabled := false -@export var default_color := Color.GRAY -@export var active_color := Color.DARK_GREEN - -@onready var poly: Polygon2D = $Polygon2D -@onready var shape: CollisionShape2D = $CollisionShape2D - - -func _ready() -> void: - poly.color = default_color - var x := sensor_size.x / 2 - var y := sensor_size.y / 2 - poly.polygon = [ - Vector2(-x, -y), - Vector2(x, -y), - Vector2(x, y), - Vector2(-x, y), - ] - var rs2d := RectangleShape2D.new() - rs2d.size = sensor_size - shape.shape = rs2d - - -func _process(_delta: float) -> void: - if Engine.is_editor_hint(): - poly.visible = feedback_enabled - return - - if track_variable != "": - # TODO: this is probably not super performant but good enough for now - _set_activation(Dialogic.VAR.get_variable(track_variable)) - - -func _on_triggered(_id: String, state: bool) -> void: - _set_activation(state) - - -func _set_activation(state: bool) -> void: - if state: - poly.color = active_color - else: - poly.color = default_color diff --git a/Scripts/Components/SimpleSwitchConfig.gd b/Scripts/Components/SimpleSwitchConfig.gd new file mode 100644 index 0000000..520cde8 --- /dev/null +++ b/Scripts/Components/SimpleSwitchConfig.gd @@ -0,0 +1,69 @@ +@tool +class_name SimpleSwitchConfig +extends SwitchConfig + +@export var track_variable: String = "" +@export var sensor_size: Vector2: + set(value): + sensor_size = value + _sync_sensor() + +@export_category("Visual Feedback") +@export var feedback_enabled := false: + set(value): + feedback_enabled = value + _sync_feedback() + +@export var default_color := Color.GRAY +@export var active_color := Color.DARK_GREEN + +var _delegate: Node +var _switch_poly: Polygon2D +var _switch_shape: CollisionShape2D + + +func _ready() -> void: + super() + + _switch = $Switch + _switch_poly = $Switch/Polygon2D + _switch_shape = $Switch/CollisionShape2D + _delegate = $SignalDelegate + + if !Engine.is_editor_hint(): + _delegate.configure(self, _switch_poly) + + _sync_feedback() + _sync_sensor() + + +func _process(_delta: float) -> void: + if Engine.is_editor_hint(): + _switch_poly.visible = feedback_enabled + return + + if track_variable != "": + # TODO: this is probably not super performant but good enough for now + _delegate.set_activation(Dialogic.VAR.get_variable(track_variable)) + + +func _sync_feedback() -> void: + if _switch_poly != null: + _switch_poly.visible = feedback_enabled + + +func _sync_sensor() -> void: + var x := sensor_size.x / 2 + var y := sensor_size.y / 2 + if _switch_poly != null: + _switch_poly.polygon = [ + Vector2(-x, -y), + Vector2(x, -y), + Vector2(x, y), + Vector2(-x, y), + ] + if _switch_shape != null: + # TODO: is conversion finished? + var rs2d := RectangleShape2D.new() + rs2d.size = sensor_size + _switch_shape.shape = rs2d diff --git a/Scripts/Components/SimpleSwitchSignalDelegate.gd b/Scripts/Components/SimpleSwitchSignalDelegate.gd new file mode 100644 index 0000000..859c0e7 --- /dev/null +++ b/Scripts/Components/SimpleSwitchSignalDelegate.gd @@ -0,0 +1,26 @@ +class_name SimpleSwitchSignalDelegate +extends Node + +var _cfg: SimpleSwitchConfig +var _poly: Polygon2D + + +func configure(cfg: SimpleSwitchConfig, switch_poly: Polygon2D) -> void: + _cfg = cfg + _poly = switch_poly + if !_cfg.triggered.is_connected(_on_triggered): + _cfg.triggered.connect(_on_triggered) + + ## set initial pressed state based on the current state of the switch + set_activation(cfg.is_pressed) + + +func _on_triggered(_id: String, state: bool) -> void: + set_activation(state) + + +func set_activation(state: bool) -> void: + if state: + _poly.color = _cfg.active_color + else: + _poly.color = _cfg.default_color diff --git a/Scripts/Components/Switch.gd b/Scripts/Components/Switch.gd index a722380..a33b52e 100644 --- a/Scripts/Components/Switch.gd +++ b/Scripts/Components/Switch.gd @@ -22,27 +22,6 @@ class_name Switch extends Area2D -signal triggered(id: String, state: bool) -signal failed_trigger(id: String, reason: Enums.TriggerFailure) - -## Checked as part of an evaluation if some actor can press a switch -@export var conditions: Array[TriggerCondition] = [] - -## If set a switch may only be triggered once and will not be released when -## the trigger actors are removed. May be reset only via [reset]. -@export var single_fire: bool = false - -## If set only an actor with one of the listed IDs can activate a switch. -@export var id_mask: Array[String] = [] - -## A list of effects to perform when a switch is pressed -@export var on_pressed_effects: Array[Effect] = [] -## A list of effects to perform when a switch is released -@export var on_released_effects: Array[Effect] = [] - -## This is set when the switch has been pressed by one or more actors -var is_pressed: bool = false - ## Tracks the full set of ids that are present in this switch area and have ## triggered an activation (or can keep it activated) var _activation_stack: Array[String] @@ -50,19 +29,15 @@ var _activation_stack: Array[String] ## Tracks the level that the action is taking place in var _cur_level: LevelBase +var _config: SwitchConfig + func _ready() -> void: _cur_level = Utils.get_level_parent(self) -## Reset switch state. That means: -## a. clears the activation stack -## b. sets is_pressed to false. -## Does not emit triggered(false) or activate on_released_effects chain. If a -## switch was previously single_fire it remains single_fire after a reset. -func reset() -> void: - _activation_stack.clear() - is_pressed = false +func set_config(cfg: SwitchConfig) -> void: + _config = cfg func _on_enter(area: Area2D) -> void: @@ -94,26 +69,26 @@ func _on_exit_body(body: Node2D) -> void: func _on_enter_id(id: String) -> void: - if id_mask != null && id_mask.size() > 0: - if !(id in id_mask): + if _config.id_mask != null && _config.id_mask.size() > 0: + if !(id in _config.id_mask): # Because the switch is already pressed this activation didn't really # fail to press it so much it didn't get into the activation stack. - if !is_pressed: - failed_trigger.emit(id, Enums.TriggerFailure.ID_MASK) + if !_config.is_pressed: + _config.failed_trigger.emit(id, Enums.TriggerFailure.ID_MASK) return if id in _activation_stack: printerr("%s: ID %s attempting to activate but already in stack" % [name, id]) return - for c in conditions: + for c in _config.conditions: if !c.evaluate(id): - failed_trigger.emit(id, Enums.TriggerFailure.CONDITIONS) + _config.failed_trigger.emit(id, Enums.TriggerFailure.CONDITIONS) return _activation_stack.push_back(id) - if !is_pressed: + if !_config.is_pressed: _do_press(id) @@ -131,11 +106,11 @@ func _on_exit_id(id: String) -> void: ## internal state, emits triggered signals, and fires any configured effects. ## If a switch is already pressed bails without any changes / side effects. func _do_press(id: String) -> void: - if is_pressed: + if _config.is_pressed: return - is_pressed = true - triggered.emit(id, true) - for e in on_pressed_effects: + _config.is_pressed = true + _config.triggered.emit(id, true) + for e in _config.on_pressed_effects: e.act(id, _cur_level) @@ -143,10 +118,10 @@ func _do_press(id: String) -> void: ## emits a triggered signal, and fires any configured effects. If a switch is ## single_fire then it does not make any changes. func _do_release(id: String) -> void: - if single_fire: + if _config.single_fire: return - is_pressed = false - triggered.emit(id, false) - for e in on_released_effects: + _config.is_pressed = false + _config.triggered.emit(id, false) + for e in _config.on_released_effects: e.act(id, _cur_level) diff --git a/Scripts/Components/SwitchConfig.gd b/Scripts/Components/SwitchConfig.gd new file mode 100644 index 0000000..9a1b787 --- /dev/null +++ b/Scripts/Components/SwitchConfig.gd @@ -0,0 +1,43 @@ +class_name SwitchConfig +extends Node2D + +signal triggered(id: String, state: bool) +signal failed_trigger(id: String, reason: Enums.TriggerFailure) + +## Checked as part of an evaluation if some actor can press a switch +@export var conditions: Array[TriggerCondition] = [] + +## If set a switch may only be triggered once and will not be released when +## the trigger actors are removed. May be reset only via [reset]. +@export var single_fire: bool = false + +## If set only an actor with one of the listed IDs can activate a switch. +@export var id_mask: Array[String] = [] + +## A list of effects to perform when a switch is pressed +@export var on_pressed_effects: Array[Effect] = [] +## A list of effects to perform when a switch is released +@export var on_released_effects: Array[Effect] = [] + +## This is set when the switch has been pressed by one or more actors. +## Do not set directly, @exported to get this data saved. +@export var is_pressed: bool = false + +@onready var _switch: Switch = $Switch + + +func _ready() -> void: + if Engine.is_editor_hint(): + return + + _switch.set_config(self) + + +## Reset switch state. That means: +## a. clears the activation stack +## b. sets is_pressed to false. +## Does not emit triggered(false) or activate on_released_effects chain. If a +## switch was previously single_fire it remains single_fire after a reset. +func reset() -> void: + _switch._activation_stack.clear() + is_pressed = false diff --git a/addons/tgo_greyboxing/plugin.gd b/addons/tgo_greyboxing/plugin.gd index 65ed75a..4174750 100644 --- a/addons/tgo_greyboxing/plugin.gd +++ b/addons/tgo_greyboxing/plugin.gd @@ -10,6 +10,8 @@ var _editor: EditorInterface = null var _interactable_plugin: EditorInspectorPlugin func _enter_tree() -> void: + if !Engine.is_editor_hint(): + return _load_scene() _editor = get_editor_interface() _interactable_plugin = load("res://addons_tgo/editors/tgo_inspector_interactable.gd").new() @@ -17,7 +19,9 @@ func _enter_tree() -> void: func _load_scene() -> void: - var control_scene_res := preload("res://addons_tgo/greyboxing/UI/TGOControlDock.tscn") + if !Engine.is_editor_hint(): + return + var control_scene_res := load("res://addons_tgo/greyboxing/UI/TGOControlDock.tscn") _control_scene = control_scene_res.instantiate() as TGOControlDock add_control_to_dock(DOCK_SLOT_LEFT_BR, _control_scene) _control_scene.setup(self) diff --git a/addons_tgo/greyboxing/UI/ObjectsHelperSwitchDetails.gd b/addons_tgo/greyboxing/UI/ObjectsHelperSwitchDetails.gd index f939c48..aa256f0 100644 --- a/addons_tgo/greyboxing/UI/ObjectsHelperSwitchDetails.gd +++ b/addons_tgo/greyboxing/UI/ObjectsHelperSwitchDetails.gd @@ -109,8 +109,8 @@ func _list_variables_and_type_helper(path_prefix: String, var_dict: Dictionary) return res -func build() -> Switch: - var scn: SimpleSwitch = SWITCH_SCENE.instantiate() +func build() -> SimpleSwitchConfig: + var scn: SimpleSwitchConfig = SWITCH_SCENE.instantiate() scn.single_fire = single_fire.button_pressed match _get_template(): diff --git a/addons_tgo/greyboxing/UI/ObjectsHelperSwitchDetails.tscn b/addons_tgo/greyboxing/UI/ObjectsHelperSwitchDetails.tscn index 5e64ae6..86840b6 100644 --- a/addons_tgo/greyboxing/UI/ObjectsHelperSwitchDetails.tscn +++ b/addons_tgo/greyboxing/UI/ObjectsHelperSwitchDetails.tscn @@ -86,7 +86,7 @@ layout_mode = 2 [node name="Label1" type="Label" parent="ColorMargin/ColorHBox"] layout_mode = 2 -text = "Default Color" +text = "Default" [node name="DefaultColor" type="ColorPickerButton" parent="ColorMargin/ColorHBox"] layout_mode = 2 @@ -96,7 +96,7 @@ color = Color(0.61339, 0.61339, 0.61339, 1) [node name="Label2" type="Label" parent="ColorMargin/ColorHBox"] layout_mode = 2 -text = "Active Color" +text = "Active" [node name="ActiveColor" type="ColorPickerButton" parent="ColorMargin/ColorHBox"] layout_mode = 2