diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-03-17 12:27:50 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-03-17 12:27:50 -0400 |
commit | 09ec745987d0b156c4628b12eb409003572eef13 (patch) | |
tree | c8b71ff3757ed296b6a2aff128d9d7ffbcbb36ff /Archipelago/load.gd | |
parent | 2b286074992e3ae76b48c4c033b2a81fc8913377 (diff) | |
parent | 38004bc2cd3d27b40ab9942488ed0257751337e0 (diff) | |
download | lingo-archipelago-09ec745987d0b156c4628b12eb409003572eef13.tar.gz lingo-archipelago-09ec745987d0b156c4628b12eb409003572eef13.tar.bz2 lingo-archipelago-09ec745987d0b156c4628b12eb409003572eef13.zip |
Merge branch 'future' into sunwarps
Diffstat (limited to 'Archipelago/load.gd')
-rw-r--r-- | Archipelago/load.gd | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 0750247..673c762 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd | |||
@@ -14,7 +14,8 @@ const EXCLUDED_PAINTINGS = [ | |||
14 | "scenery_3.tscn", | 14 | "scenery_3.tscn", |
15 | "scenery_4.tscn", | 15 | "scenery_4.tscn", |
16 | "scenery_5.tscn", | 16 | "scenery_5.tscn", |
17 | "pilgrim.tscn" | 17 | "pilgrim.tscn", |
18 | "so_pearl_bk.tscn" | ||
18 | ] | 19 | ] |
19 | 20 | ||
20 | 21 | ||
@@ -24,6 +25,15 @@ func _load(): | |||
24 | var apclient = global.get_node("Archipelago") | 25 | var apclient = global.get_node("Archipelago") |
25 | var panels_parent = self.get_node("Panels") | 26 | var panels_parent = self.get_node("Panels") |
26 | 27 | ||
28 | # Add a wall-blocked raycast to the player. | ||
29 | var wallcast = RayCast.new() | ||
30 | wallcast.name = "wallcast" | ||
31 | wallcast.cast_to = Vector3(0, 0, -15) | ||
32 | wallcast.set_collision_mask_bit(1, true) | ||
33 | wallcast.set_collision_mask_bit(3, true) | ||
34 | wallcast.collide_with_areas = true | ||
35 | $player/pivot/camera.add_child(wallcast) | ||
36 | |||
27 | # Override the YOU panel with the AP slot name. | 37 | # Override the YOU panel with the AP slot name. |
28 | if self.get_node_or_null("Panels/Color Arrow Room/Panel_you") != null: | 38 | if self.get_node_or_null("Panels/Color Arrow Room/Panel_you") != null: |
29 | self.get_node("Panels/Color Arrow Room/Panel_you").answer = apclient.ap_user | 39 | self.get_node("Panels/Color Arrow Room/Panel_you").answer = apclient.ap_user |
@@ -198,6 +208,10 @@ func _load(): | |||
198 | set_gridmap_tile(-88.5, 4.5, -41.5, "MeshInstance8") | 208 | set_gridmap_tile(-88.5, 4.5, -41.5, "MeshInstance8") |
199 | set_gridmap_tile(-89.5, 4.5, -41.5, "MeshInstance4") | 209 | set_gridmap_tile(-89.5, 4.5, -41.5, "MeshInstance4") |
200 | 210 | ||
211 | # Remove black block from THE RED. | ||
212 | clear_gridmap_tile(68.5, 6.5, 76.5) | ||
213 | get_node("Decorations/PanelSign/sign19").queue_free() | ||
214 | |||
201 | if apclient.confusify_world: | 215 | if apclient.confusify_world: |
202 | # Remove welcome back / color hallway / sunwarp indicators. | 216 | # Remove welcome back / color hallway / sunwarp indicators. |
203 | get_node("Decorations/Signs/Welcome Back Signs").queue_free() | 217 | get_node("Decorations/Signs/Welcome Back Signs").queue_free() |
@@ -245,12 +259,12 @@ func _load(): | |||
245 | 259 | ||
246 | if apclient._panel_shuffle != apclient.kNO_PANEL_SHUFFLE: | 260 | if apclient._panel_shuffle != apclient.kNO_PANEL_SHUFFLE: |
247 | # Make The Wondrous's FIRE solely midred. | 261 | # Make The Wondrous's FIRE solely midred. |
248 | set_gridmap_tile(-76.5, 1.5, -73.5, "MeshInstance18") | 262 | clear_gridmap_tile(-76.5, 1.5, -73.5) |
249 | 263 | ||
250 | # Reduce double/triple length puzzles in Knight/Night. | 264 | # Reduce double/triple length puzzles in Knight/Night. |
251 | set_gridmap_tile(24.5, 1.5, 11.5, "MeshInstance18") | 265 | clear_gridmap_tile(24.5, 1.5, 11.5) |
252 | set_gridmap_tile(25.5, 1.5, 11.5, "MeshInstance18") | 266 | clear_gridmap_tile(25.5, 1.5, 11.5) |
253 | set_gridmap_tile(47.5, 1.5, 11.5, "MeshInstance18") | 267 | clear_gridmap_tile(47.5, 1.5, 11.5) |
254 | 268 | ||
255 | if apclient._panel_shuffle == apclient.kREARRANGE_PANELS: | 269 | if apclient._panel_shuffle == apclient.kREARRANGE_PANELS: |
256 | # Do the actual shuffling. | 270 | # Do the actual shuffling. |
@@ -638,6 +652,15 @@ func _load(): | |||
638 | global._print("Hooked Load End") | 652 | global._print("Hooked Load End") |
639 | ._load() | 653 | ._load() |
640 | 654 | ||
655 | # Activate any cached traps. | ||
656 | if apclient._cached_slowness > 0: | ||
657 | effects.trigger_slowness_trap(apclient._cached_slowness) | ||
658 | if apclient._cached_iceland > 0: | ||
659 | effects.trigger_iceland_trap(apclient._cached_iceland) | ||
660 | if apclient._cached_atbash > 0: | ||
661 | for _i in range(0, apclient._cached_atbash): | ||
662 | effects.trigger_atbash_trap() | ||
663 | |||
641 | # Process any items received while the map was loading, and send the checks | 664 | # Process any items received while the map was loading, and send the checks |
642 | # from the save load. | 665 | # from the save load. |
643 | apclient.mapFinishedLoading() | 666 | apclient.mapFinishedLoading() |
@@ -708,6 +731,14 @@ func set_gridmap_tile(x, y, z, tile): | |||
708 | gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, mesh_library.find_item_by_name(tile)) | 731 | gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, mesh_library.find_item_by_name(tile)) |
709 | 732 | ||
710 | 733 | ||
734 | func clear_gridmap_tile(x, y, z): | ||
735 | var gridmap = self.get_node("GridMap") | ||
736 | var mesh_library = gridmap.mesh_library | ||
737 | var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z))) | ||
738 | |||
739 | gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, GridMap.INVALID_CELL_ITEM) | ||
740 | |||
741 | |||
711 | func set_small_gridmap_tile(x, y, z, tile): | 742 | func set_small_gridmap_tile(x, y, z, tile): |
712 | var gridmap = self.get_node("GridMapSmall") | 743 | var gridmap = self.get_node("GridMapSmall") |
713 | var mesh_library = gridmap.mesh_library | 744 | var mesh_library = gridmap.mesh_library |