From 44e7b3c844fe2d2e54c118648e30c2c5a693203c Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 5 Jan 2024 08:14:25 -0500 Subject: Copy panel proxying from AP --- randomizer/load.gd | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'randomizer/load.gd') diff --git a/randomizer/load.gd b/randomizer/load.gd index 7f08814..c14332c 100644 --- a/randomizer/load.gd +++ b/randomizer/load.gd @@ -104,6 +104,26 @@ func _load(): "../../../Panels/Countdown Panels/Panel_1234567890_wanderlust" ] + # Make stack/double puzzles into proxies. + var proxyscript = load("res://scripts/panelProxy.gd") + + var extradata_proxies = randomizer.get_node("Extradata").proxies + for truepanel in extradata_proxies: + var proxies = extradata_proxies[truepanel] + for proxypanel in proxies: + var proxynode = panels_parent.get_node(proxypanel) + var oldparent = proxynode.get_parent() + oldparent.remove_child(proxynode) + var oldtext = proxynode.text + var oldanswer = proxynode.answer + proxynode.set_script(proxyscript) + proxynode.text = oldtext + proxynode.answer = oldanswer + proxynode.proxied_panels = ["../../%s" % truepanel] + proxynode.exact_proxy = true + proxynode.request_ready() + oldparent.add_child(proxynode) + # Proceed with the rest of the load. global._print("Hooked Load End") ._load() -- cgit 1.4.1