summary refs log tree commit diff stats
path: root/randomizer/load.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-02-06 13:32:24 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-02-06 13:32:24 -0500
commitad8243c74c1d718b94a2a4bf4f0fa56d4c9dbb45 (patch)
treeca03e7a2f780e38cdcc338308d329a6dc279e35a /randomizer/load.gd
parent6e04dbb1ebb811429bbfdb53bd8c4c079ef63732 (diff)
downloadlingo-randomizer-rewrite.tar.gz
lingo-randomizer-rewrite.tar.bz2
lingo-randomizer-rewrite.zip
Randomize sunwarps rewrite
Diffstat (limited to 'randomizer/load.gd')
-rw-r--r--randomizer/load.gd41
1 files changed, 41 insertions, 0 deletions
diff --git a/randomizer/load.gd b/randomizer/load.gd index 55e4efc..456e135 100644 --- a/randomizer/load.gd +++ b/randomizer/load.gd
@@ -214,6 +214,47 @@ func _load():
214 if !randomizer.steady._door_mapping.has(door.name) and door.name != "Door_hint": 214 if !randomizer.steady._door_mapping.has(door.name) and door.name != "Door_hint":
215 door.remap(["../../../Panels/Countdown Panels/Panel_steady_steady"]) 215 door.remap(["../../../Panels/Countdown Panels/Panel_steady_steady"])
216 216
217 # Sunwarps 1 and 6 are rotated differently from the rest, so we have to fix that.
218 get_node("Decorations/Teleporter Windows/localmap").rotation_degrees.y = 0
219 get_node("Decorations/Teleporter Windows/localmap2").rotation_degrees.y = 0
220 get_node("Decorations/Teleporter Windows/localmap11").rotation_degrees.y = 0
221 get_node("Decorations/Teleporter Windows/localmap12").rotation_degrees.y = 0
222 get_node("Decorations/Teleporter Windows/localmap13").rotation_degrees.y = -90
223
224 get_node("Warps/Teleporter Warps/Sunwarp_enter_1").translation.x = 19.5
225 get_node("Warps/Teleporter Warps/Sunwarp_exit_1").translation.x = -15.5
226 get_node("Warps/Teleporter Warps/Sunwarp_enter_6").translation.x = 4.5
227 get_node("Warps/Teleporter Warps/Sunwarp_exit_6").translation.x = -37.5
228 get_node("Warps/Teleporter Warps/Sunwarp_exit_7").translation.z = 23.5
229
230 # Randomize the sunwarps.
231 var sw_orig_translations = []
232 var sw_rotations = [0, 0, 90, 180, 0, 0, 0, 90, 270, 270, 0, 0]
233 var sw_text_translations = []
234 var sw_text_rotations = []
235 for i in range (1,7):
236 sw_orig_translations.append(get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).translation)
237 sw_text_translations.append(get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).translation)
238 sw_text_rotations.append(get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).rotation_degrees)
239 for i in range (1,7):
240 sw_orig_translations.append(get_node("Warps/Teleporter Warps/Sunwarp_exit_%d" % i).translation)
241 sw_text_translations.append(get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).translation)
242 sw_text_rotations.append(get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).rotation_degrees)
243 for i in range (1,7):
244 get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).translation = sw_orig_translations[randomizer.sunwarps[i-1]-1]
245 get_node("Warps/Teleporter Warps/Sunwarp_exit_%d" % i).translation = sw_orig_translations[randomizer.sunwarps[i+5]-1]
246
247 get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).translation = sw_text_translations[randomizer.sunwarps[i-1]-1]
248 get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).rotation_degrees = sw_text_rotations[randomizer.sunwarps[i-1]-1]
249
250 get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).translation = sw_text_translations[randomizer.sunwarps[i+5]-1]
251 get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).rotation_degrees = sw_text_rotations[randomizer.sunwarps[i+5]-1]
252
253 var final_rot = sw_rotations[randomizer.sunwarps[i-1]-1] - sw_rotations[randomizer.sunwarps[i+5]-1]
254 if final_rot < 0:
255 final_rot += 360
256 get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).rotate = str(final_rot)
257
217 # Proceed with the rest of the load. 258 # Proceed with the rest of the load.
218 global._print("Hooked Load End") 259 global._print("Hooked Load End")
219 ._load() 260 ._load()