From 7aa62e5c0ac0d86e5aed2ead2a7116ea0edbffde Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 16 Apr 2023 16:09:37 -0400 Subject: Implemented color shuffle --- Archipelago/load.gd | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Archipelago/load.gd') diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 7b7e648..f9dc65f 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -38,6 +38,18 @@ func _load(): "answer_correct", location, "handle_correct" ) + # Attach a script to every panel so that we can do things like conditionally + # disable them. + var gamedata = apclient.get_node("Gamedata") + var panel_script = ResourceLoader.load("user://maps/Archipelago/panel.gd") + for panel in gamedata.panels: + var panel_node = panels_parent.get_node(panel["id"]) + var script_instance = panel_script.new() + script_instance.name = "AP_Panel" + script_instance.data = panel + panel_node.add_child(script_instance) + apclient.connect("evaluate_solvability", script_instance, "evaluate_solvability") + # Hook up the goal panel. if apclient._victory_condition == 1: var the_master = self.get_node("Panels/Countdown Panels/Panel_master_master") -- cgit 1.4.1