diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-01-05 08:14:25 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-01-05 08:14:25 -0500 |
commit | 44e7b3c844fe2d2e54c118648e30c2c5a693203c (patch) | |
tree | 8b81bcb090d0004035d5f7456e85ff05be6ec3f2 /randomizer/load.gd | |
parent | 011b91751445587308c558d860b8f8378f58977f (diff) | |
download | lingo-randomizer-44e7b3c844fe2d2e54c118648e30c2c5a693203c.tar.gz lingo-randomizer-44e7b3c844fe2d2e54c118648e30c2c5a693203c.tar.bz2 lingo-randomizer-44e7b3c844fe2d2e54c118648e30c2c5a693203c.zip |
Copy panel proxying from AP
Diffstat (limited to 'randomizer/load.gd')
-rw-r--r-- | randomizer/load.gd | 20 |
1 files changed, 20 insertions, 0 deletions
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(): | |||
104 | "../../../Panels/Countdown Panels/Panel_1234567890_wanderlust" | 104 | "../../../Panels/Countdown Panels/Panel_1234567890_wanderlust" |
105 | ] | 105 | ] |
106 | 106 | ||
107 | # Make stack/double puzzles into proxies. | ||
108 | var proxyscript = load("res://scripts/panelProxy.gd") | ||
109 | |||
110 | var extradata_proxies = randomizer.get_node("Extradata").proxies | ||
111 | for truepanel in extradata_proxies: | ||
112 | var proxies = extradata_proxies[truepanel] | ||
113 | for proxypanel in proxies: | ||
114 | var proxynode = panels_parent.get_node(proxypanel) | ||
115 | var oldparent = proxynode.get_parent() | ||
116 | oldparent.remove_child(proxynode) | ||
117 | var oldtext = proxynode.text | ||
118 | var oldanswer = proxynode.answer | ||
119 | proxynode.set_script(proxyscript) | ||
120 | proxynode.text = oldtext | ||
121 | proxynode.answer = oldanswer | ||
122 | proxynode.proxied_panels = ["../../%s" % truepanel] | ||
123 | proxynode.exact_proxy = true | ||
124 | proxynode.request_ready() | ||
125 | oldparent.add_child(proxynode) | ||
126 | |||
107 | # Proceed with the rest of the load. | 127 | # Proceed with the rest of the load. |
108 | global._print("Hooked Load End") | 128 | global._print("Hooked Load End") |
109 | ._load() | 129 | ._load() |