diff options
Diffstat (limited to 'Archipelago/load.gd')
-rw-r--r-- | Archipelago/load.gd | 12 |
1 files changed, 12 insertions, 0 deletions
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(): | |||
38 | "answer_correct", location, "handle_correct" | 38 | "answer_correct", location, "handle_correct" |
39 | ) | 39 | ) |
40 | 40 | ||
41 | # Attach a script to every panel so that we can do things like conditionally | ||
42 | # disable them. | ||
43 | var gamedata = apclient.get_node("Gamedata") | ||
44 | var panel_script = ResourceLoader.load("user://maps/Archipelago/panel.gd") | ||
45 | for panel in gamedata.panels: | ||
46 | var panel_node = panels_parent.get_node(panel["id"]) | ||
47 | var script_instance = panel_script.new() | ||
48 | script_instance.name = "AP_Panel" | ||
49 | script_instance.data = panel | ||
50 | panel_node.add_child(script_instance) | ||
51 | apclient.connect("evaluate_solvability", script_instance, "evaluate_solvability") | ||
52 | |||
41 | # Hook up the goal panel. | 53 | # Hook up the goal panel. |
42 | if apclient._victory_condition == 1: | 54 | if apclient._victory_condition == 1: |
43 | var the_master = self.get_node("Panels/Countdown Panels/Panel_master_master") | 55 | var the_master = self.get_node("Panels/Countdown Panels/Panel_master_master") |