diff options
Diffstat (limited to 'randomizer/load.gd')
-rw-r--r-- | randomizer/load.gd | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/randomizer/load.gd b/randomizer/load.gd index 9fcd038..7f08814 100644 --- a/randomizer/load.gd +++ b/randomizer/load.gd | |||
@@ -12,6 +12,46 @@ func _load(): | |||
12 | if child.is_class("Spatial"): | 12 | if child.is_class("Spatial"): |
13 | child.get_node(child.replace_with).translation.y -= 100.0 | 13 | child.get_node(child.replace_with).translation.y -= 100.0 |
14 | 14 | ||
15 | # Create "The Wanderer". | ||
16 | set_gridmap_tile(-4.5, 6.5, 56.5, "MeshInstance4") | ||
17 | set_gridmap_tile(-3.5, 6.5, 56.5, "MeshInstance18") | ||
18 | set_gridmap_tile(-3.5, 6.5, 57.5, "MeshInstance5") | ||
19 | |||
20 | var door_scene = load("res://nodes/door.tscn") | ||
21 | var door_script = load("res://scripts/doorControl.gd") | ||
22 | var wanderer_entrance = door_scene.instance() | ||
23 | wanderer_entrance.name = "Door_wanderer_entrance" | ||
24 | wanderer_entrance.translation = Vector3(7.5, 5, 53) | ||
25 | wanderer_entrance.rotation = Vector3(0, -PI / 2, 0) | ||
26 | wanderer_entrance.scale = Vector3(1, 1.5, 1) | ||
27 | wanderer_entrance.set_script(door_script) | ||
28 | wanderer_entrance.panels.append("../../../Panels/Tower Room/Panel_wanderlust_1234567890") | ||
29 | get_node("Doors/Tower Room Area Doors").add_child(wanderer_entrance) | ||
30 | |||
31 | var wanderer_achieve = get_node("Panels/Tower Room/Panel_1234567890_wanderlust") | ||
32 | wanderer_achieve.get_parent().remove_child(wanderer_achieve) | ||
33 | get_node("Panels/Countdown Panels").add_child(wanderer_achieve) | ||
34 | |||
35 | var countdown_scene = load("res://nodes/panel_countdown.tscn") | ||
36 | var wanderer_cdp = countdown_scene.instance() | ||
37 | wanderer_cdp.name = "CountdownPanel_wanderer" | ||
38 | wanderer_cdp.panels = [ | ||
39 | "../../Panels/Tower Room/Panel_wanderlust_1234567890", | ||
40 | "../../Panels/Orange Room/Panel_lust", | ||
41 | "../../Panels/Orange Room/Panel_read", | ||
42 | "../../Panels/Orange Room/Panel_sew", | ||
43 | "../../Panels/Orange Room/Panel_dead", | ||
44 | "../../Panels/Orange Room/Panel_learn", | ||
45 | "../../Panels/Orange Room/Panel_dust", | ||
46 | "../../Panels/Orange Room/Panel_star", | ||
47 | "../../Panels/Orange Room/Panel_wander" | ||
48 | ] | ||
49 | wanderer_cdp.translation = wanderer_achieve.translation | ||
50 | wanderer_cdp.rotation = wanderer_achieve.rotation | ||
51 | get_node("CountdownPanels").add_child(wanderer_cdp) | ||
52 | |||
53 | wanderer_achieve.translation = Vector3(-51, -33, 35) # way under the map | ||
54 | |||
15 | # Apply the randomized panels. | 55 | # Apply the randomized panels. |
16 | randomizer.generator.apply(self) | 56 | randomizer.generator.apply(self) |
17 | 57 | ||
@@ -51,9 +91,19 @@ func _load(): | |||
51 | sign_low.queue_free() | 91 | sign_low.queue_free() |
52 | 92 | ||
53 | # Require LOW/LOW for opening the second door. | 93 | # Require LOW/LOW for opening the second door. |
54 | get_node("Doors/Entry Room Area Doors/Door_hi_high").panels.append("../../../Panels/Entry Room/Panel_low_low") | 94 | get_node("Doors/Entry Room Area Doors/Door_hi_high").panels.append( |
95 | "../../../Panels/Entry Room/Panel_low_low" | ||
96 | ) | ||
55 | get_node("Doors/Entry Room Area Doors/Door_hi_high")._ready() | 97 | get_node("Doors/Entry Room Area Doors/Door_hi_high")._ready() |
56 | 98 | ||
99 | # Finish up with The Wanderer. | ||
100 | wanderer_achieve.achieved_text = "the wanderer" | ||
101 | wanderer_cdp.replace_with = "../../Panels/Countdown Panels/Panel_1234567890_wanderlust" | ||
102 | |||
103 | get_node("Doors/Tower Room Area Doors/Door_wanderlust_start").panels = [ | ||
104 | "../../../Panels/Countdown Panels/Panel_1234567890_wanderlust" | ||
105 | ] | ||
106 | |||
57 | # Proceed with the rest of the load. | 107 | # Proceed with the rest of the load. |
58 | global._print("Hooked Load End") | 108 | global._print("Hooked Load End") |
59 | ._load() | 109 | ._load() |