diff options
Diffstat (limited to 'client/Archipelago/player.gd')
-rw-r--r-- | client/Archipelago/player.gd | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/client/Archipelago/player.gd b/client/Archipelago/player.gd index f0b214f..583d5d6 100644 --- a/client/Archipelago/player.gd +++ b/client/Archipelago/player.gd | |||
@@ -225,6 +225,109 @@ func _ready(): | |||
225 | sign2.material = load("res://assets/materials/%s.material" % sign2_color) | 225 | sign2.material = load("res://assets/materials/%s.material" % sign2_color) |
226 | get_parent().add_child.call_deferred(sign2) | 226 | get_parent().add_child.call_deferred(sign2) |
227 | 227 | ||
228 | # Add the strict purple ending validation. | ||
229 | if global.map == "the_sun_temple" and ap.strict_purple_ending: | ||
230 | var panel_prefab = preload("res://objects/nodes/panel.tscn") | ||
231 | var tpl_prefab = preload("res://objects/nodes/listeners/teleportListener.tscn") | ||
232 | var reverse_prefab = preload("res://objects/nodes/listeners/reversingListener.tscn") | ||
233 | |||
234 | var previous_panel = null | ||
235 | var next_y = -100 | ||
236 | var words = ["quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"] | ||
237 | for word in words: | ||
238 | var panel = panel_prefab.instantiate() | ||
239 | panel.position = Vector3(0, next_y, 0) | ||
240 | next_y -= 10 | ||
241 | panel.clue = word | ||
242 | panel.symbol = "" | ||
243 | panel.answer = word | ||
244 | panel.name = "EndCheck_%s" % word | ||
245 | |||
246 | var tpl = tpl_prefab.instantiate() | ||
247 | tpl.teleport_point = Vector3(0, 1, 0) | ||
248 | tpl.teleport_rotate = Vector3(-45, 180, 0) | ||
249 | tpl.target_path = panel | ||
250 | tpl.name = "Teleport" | ||
251 | |||
252 | if previous_panel == null: | ||
253 | tpl.senders.append(NodePath("/root/scene/Panels/End/panel_24")) | ||
254 | else: | ||
255 | tpl.senders.append(NodePath("../../%s" % previous_panel.name)) | ||
256 | |||
257 | var reversing = reverse_prefab.instantiate() | ||
258 | reversing.senders.append(NodePath("..")) | ||
259 | reversing.name = "Reversing" | ||
260 | tpl.senders.append(NodePath("../Reversing")) | ||
261 | |||
262 | panel.add_child.call_deferred(tpl) | ||
263 | panel.add_child.call_deferred(reversing) | ||
264 | get_parent().get_node("Panels").add_child.call_deferred(panel) | ||
265 | |||
266 | previous_panel = panel | ||
267 | |||
268 | # Duplicate the doors that usually wait on EQUINOX. We can't set the senders | ||
269 | # here for some reason so we actually set them in the door ready function. | ||
270 | var endplat = get_node("/root/scene/Components/Doors/EndPlatform") | ||
271 | var endplat2 = endplat.duplicate() | ||
272 | endplat2.name = "spe_EndPlatform" | ||
273 | endplat.get_parent().add_child.call_deferred(endplat2) | ||
274 | endplat.queue_free() | ||
275 | |||
276 | var entry2 = get_node("/root/scene/Components/Doors/entry_2") | ||
277 | var entry22 = entry2.duplicate() | ||
278 | entry22.name = "spe_entry_2" | ||
279 | entry2.get_parent().add_child.call_deferred(entry22) | ||
280 | entry2.queue_free() | ||
281 | |||
282 | # Add the strict cyan ending validation. | ||
283 | if global.map == "the_parthenon" and ap.strict_cyan_ending: | ||
284 | var panel_prefab = preload("res://objects/nodes/panel.tscn") | ||
285 | var tpl_prefab = preload("res://objects/nodes/listeners/teleportListener.tscn") | ||
286 | var reverse_prefab = preload("res://objects/nodes/listeners/reversingListener.tscn") | ||
287 | |||
288 | var previous_panel = null | ||
289 | var next_y = -100 | ||
290 | var words = ["quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"] | ||
291 | for word in words: | ||
292 | var panel = panel_prefab.instantiate() | ||
293 | panel.position = Vector3(0, next_y, 0) | ||
294 | next_y -= 10 | ||
295 | panel.clue = word | ||
296 | panel.symbol = "." | ||
297 | panel.answer = "%s%s" % [word, word] | ||
298 | panel.name = "EndCheck_%s" % word | ||
299 | |||
300 | var tpl = tpl_prefab.instantiate() | ||
301 | tpl.teleport_point = Vector3(0, 1, -11) | ||
302 | tpl.teleport_rotate = Vector3(-45, 0, 0) | ||
303 | tpl.target_path = panel | ||
304 | tpl.name = "Teleport" | ||
305 | |||
306 | if previous_panel == null: | ||
307 | tpl.senderGroup.append(NodePath("/root/scene/Panels/Rulers")) | ||
308 | else: | ||
309 | tpl.senders.append(NodePath("../../%s" % previous_panel.name)) | ||
310 | |||
311 | var reversing = reverse_prefab.instantiate() | ||
312 | reversing.senders.append(NodePath("..")) | ||
313 | reversing.name = "Reversing" | ||
314 | tpl.senders.append(NodePath("../Reversing")) | ||
315 | |||
316 | panel.add_child.call_deferred(tpl) | ||
317 | panel.add_child.call_deferred(reversing) | ||
318 | get_parent().get_node("Panels").add_child.call_deferred(panel) | ||
319 | |||
320 | previous_panel = panel | ||
321 | |||
322 | # Duplicate the door that usually waits on the rulers. We can't set the | ||
323 | # senders here for some reason so we actually set them in the door ready | ||
324 | # function. | ||
325 | var entry1 = get_node("/root/scene/Components/Doors/entry_1") | ||
326 | var entry12 = entry1.duplicate() | ||
327 | entry12.name = "spe_entry_1" | ||
328 | entry1.get_parent().add_child.call_deferred(entry12) | ||
329 | entry1.queue_free() | ||
330 | |||
228 | super._ready() | 331 | super._ready() |
229 | 332 | ||
230 | await get_tree().process_frame | 333 | await get_tree().process_frame |