CLOSES #604, CLOSES #666, CLOSES #716, CLOSES #727, CLOSES #763, CLOSES #781, CLOSES #784, CLOSES #799, CLOSES #801, CLOSES #810, CLOSES #828, CLOSES #834, CLOSES #838, CLOSES #849, CLOSES #852, CLOSES #857, CLOSES #863, CLOSES #864, CLOSES #867, CLOSES #869, CLOSES #870, CLOSES #872, CLOSES #839

This commit is contained in:
bryanthaboi
2026-08-05 16:36:37 -04:00
parent f56970350a
commit e2820e02c5
36 changed files with 4046 additions and 64 deletions
+9 -2
View File
@@ -188,7 +188,7 @@ function PikachuFollower.current(ow)
return npc
end
function PikachuFollower.onMapEntered(game, ow, opts)
function PikachuFollower.onMapEntered(game, ow, opts, viaMapLoad)
-- Bill's House owns a short scripted scene that deliberately keeps
-- Pikachu off the normal trailing loop. A new map instance ends it.
ow.pikachuBillsScene = nil
@@ -200,7 +200,8 @@ function PikachuFollower.onMapEntered(game, ow, opts)
-- takes .normal_spawn_state -- map coords rebased, sprite data and
-- follow command buffer left alone. Re-list the same instance and let
-- rebase() shift its cell; a warp arrives without it and respawns
-- behind the player, the full spawn path of that same routine.
-- under the player, the full spawn path of that same routine (the
-- viaMapLoad spawn below, #863).
local keep = opts and opts.keepPikachu
if keep then
table.insert(ow.npcs, keep)
@@ -208,6 +209,12 @@ function PikachuFollower.onMapEntered(game, ow, opts)
return
end
local x, y = spawnCell(ow)
-- a fresh map entry (warp, boot) parks the follower ON the player's
-- cell instead: it stays hidden under him (the draw-sort tie-break in
-- OverworldController) and walks out of the warp behind him as the
-- trail opens up. Mid-map respawns (bike dismount, revive) keep the
-- behind-the-facing cell (#863)
if viaMapLoad then x, y = ow.player.cellX, ow.player.cellY end
local npc = makeFollower(game, ow, x, y, ow.player.facing)
table.insert(ow.npcs, npc)
-- entities is the draw list; passable keeps it out of collision