mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-21 05:00:43 +02:00
CLOSES #998, CLOSES #1472, CLOSES #1526, CLOSES #1529, CLOSES #1530, CLOSES #1532, CLOSES #1534, CLOSES #1547, CLOSES #1549, CLOSES #1550, CLOSES #1551
This commit is contained in:
@@ -537,6 +537,15 @@ function OverworldState:setMap(mapId, x, y, facing, opts)
|
||||
-- Route22Gate_Script rewrites wLastMap from the player's Y on entry
|
||||
-- too (not only on step), so a save/load mid-gate keeps exits correct
|
||||
if not (opts and opts.checkpoint) then self:syncLastMapRewrite() end
|
||||
-- home/overworld.asm:1821 (JoypadOverworld runs RunMapScript every frame);
|
||||
-- scripts/Route16Gate1F.asm:16, Route5Gate.asm:19, Route22Gate.asm:21
|
||||
if opts and opts.freshBoot and not opts.checkpoint then
|
||||
local standing = mapScripts and mapScripts.get(mapId)
|
||||
if not (standing and standing.onStep
|
||||
and standing.onStep(Game, self, self.player.cellX, self.player.cellY)) then
|
||||
self:checkBadgeGate()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Neighbor maps drawn at the composed connection offsets: at least the
|
||||
@@ -2910,7 +2919,15 @@ function OverworldState:openPC(onDone)
|
||||
keepOpen = true,
|
||||
onSelect = function()
|
||||
require("src.core.Sound").play(Game.data, "Enter_PC")
|
||||
Screens.push(Game, "BoxMenu")
|
||||
-- engine/menus/pc.asm:73 BillsPC prints the access text before the farcall
|
||||
local accessed = metBill
|
||||
and romText(Game.data, "_AccessedBillsPCText",
|
||||
"Accessed BILL's\nPC.\fAccessed POKéMON\nStorage System.")
|
||||
or romText(Game.data, "_AccessedSomeonesPCText",
|
||||
"Accessed someone's\nPC.\fAccessed POKéMON\nStorage System.")
|
||||
Game.stack:push(TextBox.new(Game, accessed, function()
|
||||
Screens.push(Game, "BoxMenu")
|
||||
end))
|
||||
done()
|
||||
end,
|
||||
})
|
||||
@@ -2920,9 +2937,13 @@ function OverworldState:openPC(onDone)
|
||||
label = (Game.save.player.name or "RED") .. "'s PC",
|
||||
keepOpen = true,
|
||||
onSelect = function()
|
||||
-- pc.asm .playersPC plays SFX_ENTER_PC before the farcall (#960)
|
||||
-- pc.asm .playersPC plays SFX_ENTER_PC then prints AccessedMyPCText
|
||||
-- before the farcall (engine/menus/pc.asm:54, #960)
|
||||
require("src.core.Sound").play(Game.data, "Enter_PC")
|
||||
Screens.push(Game, "PlayerPC")
|
||||
Game.stack:push(TextBox.new(Game,
|
||||
romText(Game.data, "_AccessedMyPCText",
|
||||
"Accessed my PC.\fAccessed Item\nStorage System."),
|
||||
function() Screens.push(Game, "PlayerPC") end))
|
||||
done()
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user