about summary refs log tree commit diff stats
path: root/Archipelago/load.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-08-01 23:47:06 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-08-01 23:47:06 -0400
commit115f89b0ae2dc80b739e539465e66192d3a7ffb6 (patch)
treecb77f095a17ff434367289c4e9ef7cf2b2e8e8cc /Archipelago/load.gd
parent0688a5e009458c65ef95b60c065f31e2f03264b2 (diff)
downloadlingo-archipelago-115f89b0ae2dc80b739e539465e66192d3a7ffb6.tar.gz
lingo-archipelago-115f89b0ae2dc80b739e539465e66192d3a7ffb6.tar.bz2
lingo-archipelago-115f89b0ae2dc80b739e539465e66192d3a7ffb6.zip
Automatic LEVEL 2 access when not win condition
Diffstat (limited to 'Archipelago/load.gd')
-rw-r--r--Archipelago/load.gd29
1 files changed, 25 insertions, 4 deletions
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 95f0fb8..57c7271 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -89,7 +89,23 @@ func _load():
89 89
90 # Configure AN OTHER WAY. 90 # Configure AN OTHER WAY.
91 var another_cdp = get_node("CountdownPanels/CountdownPanel_level2_0") 91 var another_cdp = get_node("CountdownPanels/CountdownPanel_level2_0")
92 another_cdp.maxlength = (apclient._level_2_requirement - 1) 92
93 if apclient._victory_condition == apclient.kLEVEL_2:
94 var new_another_cdp = cdp_auto_scene.instance()
95 new_another_cdp.name = "AP_variable_another"
96 new_another_cdp.replace_with = another_cdp.replace_with
97 new_another_cdp.panels = another_cdp.panels
98 new_another_cdp.translation = another_cdp.translation
99 new_another_cdp.rotation = another_cdp.rotation
100 new_another_cdp.maxlength = (apclient._level_2_requirement - 1)
101 new_another_cdp.nested = true
102 get_node("CountdownPanels").add_child(new_another_cdp)
103 another_cdp.queue_free()
104 else:
105 var another_replacement = another_cdp.get_node(another_cdp.replace_with)
106 another_replacement.translation = another_cdp.translation
107 another_replacement.rotation = another_cdp.rotation
108 another_cdp.queue_free()
93 109
94 # This is the best time to create the location nodes, since the map is now 110 # This is the best time to create the location nodes, since the map is now
95 # loaded but the panels haven't been solved from the save file yet. 111 # loaded but the panels haven't been solved from the save file yet.
@@ -182,14 +198,19 @@ func _load():
182 if not pool.has(subtag): 198 if not pool.has(subtag):
183 pool[subtag] = [] 199 pool[subtag] = []
184 200
185 var panel_node = panels_parent.get_node(panel["id"]) 201 var panel_node
202 if panel["id"].begins_with("EndPanel"):
203 panel_node = self.get_node("Decorations").get_node(panel["id"])
204 else:
205 panel_node = panels_parent.get_node(panel["id"])
206
186 pool[subtag].append( 207 pool[subtag].append(
187 { 208 {
188 "id": panel["id"], 209 "id": panel["id"],
189 "hint": panel_node.text, 210 "hint": panel_node.text,
190 "answer": panel_node.answer, 211 "answer": panel_node.answer,
191 "link": panel["link"], 212 "link": panel["link"] if panel.has("link") else "",
192 "copy_to_sign": panel["copy_to_sign"] 213 "copy_to_sign": panel["copy_to_sign"] if panel.has("copy_to_sign") else ""
193 } 214 }
194 ) 215 )
195 216