about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/load.gd59
1 files changed, 59 insertions, 0 deletions
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 76015e9..56991fb 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -18,6 +18,46 @@ func _load():
18 if "answer" in node: 18 if "answer" in node:
19 node.answer = apclient.ap_user 19 node.answer = apclient.ap_user
20 20
21 # Create "The Wanderer".
22 set_gridmap_tile(-4.5, 6.5, 56.5, "MeshInstance4")
23 set_gridmap_tile(-3.5, 6.5, 56.5, "MeshInstance18")
24 set_gridmap_tile(-3.5, 6.5, 57.5, "MeshInstance5")
25
26 var door_scene = load("res://nodes/door.tscn")
27 var door_script = load("user://maps/Archipelago/doorControl.gd")
28 var wanderer_entrance = door_scene.instance()
29 wanderer_entrance.name = "Door_wanderer_entrance"
30 wanderer_entrance.translation = Vector3(7.5, 5, 53)
31 wanderer_entrance.rotation = Vector3(0, -PI / 2, 0)
32 wanderer_entrance.scale = Vector3(1, 1.5, 1)
33 wanderer_entrance.set_script(door_script)
34 wanderer_entrance.panels.append("../../../Panels/Tower Room/Panel_wanderlust_1234567890")
35 get_node("Doors/Tower Room Area Doors").add_child(wanderer_entrance)
36
37 var wanderer_achieve = get_node("Panels/Tower Room/Panel_1234567890_wanderlust")
38 wanderer_achieve.get_parent().remove_child(wanderer_achieve)
39 get_node("Panels/Countdown Panels").add_child(wanderer_achieve)
40
41 var countdown_scene = load("res://nodes/panel_countdown.tscn")
42 var wanderer_cdp = countdown_scene.instance()
43 wanderer_cdp.name = "CountdownPanel_wanderer"
44 wanderer_cdp.panels = [
45 "../../Panels/Tower Room/Panel_wanderlust_1234567890",
46 "../../Panels/Orange Room/Panel_lust",
47 "../../Panels/Orange Room/Panel_read",
48 "../../Panels/Orange Room/Panel_sew",
49 "../../Panels/Orange Room/Panel_dead",
50 "../../Panels/Orange Room/Panel_learn",
51 "../../Panels/Orange Room/Panel_dust",
52 "../../Panels/Orange Room/Panel_star",
53 "../../Panels/Orange Room/Panel_wander"
54 ]
55 wanderer_cdp.translation = wanderer_achieve.translation
56 wanderer_cdp.rotation = wanderer_achieve.rotation
57 get_node("CountdownPanels").add_child(wanderer_cdp)
58
59 wanderer_achieve.translation = Vector3(-51, -33, 35) # way under the map
60
21 # This is the best time to create the location nodes, since the map is now 61 # This is the best time to create the location nodes, since the map is now
22 # loaded but the panels haven't been solved from the save file yet. 62 # loaded but the panels haven't been solved from the save file yet.
23 var panels_parent = self.get_node("Panels") 63 var panels_parent = self.get_node("Panels")
@@ -129,6 +169,17 @@ func _load():
129 set_static_panel("Entry Room/Panel_low_low", "serendipity", "luck") 169 set_static_panel("Entry Room/Panel_low_low", "serendipity", "luck")
130 set_static_panel("Shuffle Room/Panel_secret_secret", "trans rights", "human rights") 170 set_static_panel("Shuffle Room/Panel_secret_secret", "trans rights", "human rights")
131 171
172 # Finish up with The Wanderer.
173 wanderer_achieve.text = "12345656"
174 wanderer_achieve.answer = "the wanderer"
175 wanderer_achieve.achieved_text = "the wanderer"
176
177 wanderer_cdp.replace_with = "../../Panels/Countdown Panels/Panel_1234567890_wanderlust"
178
179 get_node("Doors/Tower Room Area Doors/Door_wanderlust_start").panels = [
180 "../../../Panels/Countdown Panels/Panel_1234567890_wanderlust"
181 ]
182
132 # Randomize the paintings, if necessary. 183 # Randomize the paintings, if necessary.
133 if apclient._painting_shuffle: 184 if apclient._painting_shuffle:
134 var pd_script = ResourceLoader.load("user://maps/Archipelago/paintingdata.gd") 185 var pd_script = ResourceLoader.load("user://maps/Archipelago/paintingdata.gd")
@@ -293,6 +344,14 @@ func instantiate_painting(name, scene):
293 return mps_inst 344 return mps_inst
294 345
295 346
347func set_gridmap_tile(x, y, z, tile):
348 var gridmap = self.get_node("GridMap")
349 var mesh_library = gridmap.mesh_library
350 var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z)))
351
352 gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, mesh_library.find_item_by_name(tile))
353
354
296func archipelago_disconnected(reason): 355func archipelago_disconnected(reason):
297 var messages_node = self.get_node("AP_Messages") 356 var messages_node = self.get_node("AP_Messages")
298 messages_node.show_message(reason) 357 messages_node.show_message(reason)