mirror of
https://github.com/bryanthaboi/gen1recomp
synced 2026-10-02 15:50:39 -04:00
more buggies CLOSES #960, CLOSES #961, CLOSES #968, CLOSES #995, CLOSES #1006, CLOSES #1009, CLOSES #1013, CLOSES #1021, CLOSES #1031, CLOSES #1044, CLOSES #1049, CLOSES #1050, CLOSES #1045,,
This commit is contained in:
+9
-3
@@ -164,8 +164,14 @@ local function toss(game)
|
||||
}))
|
||||
end
|
||||
|
||||
function PlayerPC.new(game)
|
||||
-- opts.direct marks the bedroom PC (OpenRedsPC), the one entry outside the main menu
|
||||
function PlayerPC.new(game, opts)
|
||||
game.save.pcItems = game.save.pcItems or {}
|
||||
-- ExitPlayerPC (players_pc.asm) rings SFX_TURN_OFF_PC only while
|
||||
-- BIT_USING_GENERIC_PC is clear (#960)
|
||||
local logOff = function()
|
||||
if opts and opts.direct then Sound.play(game.data, "Turn_Off_PC") end
|
||||
end
|
||||
return Menu.new(game, {
|
||||
-- keepOpen so B in the item lists returns here instead of dropping the
|
||||
-- whole PC session (players_pc.asm re-shows the PC menu); same pattern
|
||||
@@ -173,10 +179,10 @@ function PlayerPC.new(game)
|
||||
{ label = Strings("WITHDRAW ITEM"), keepOpen = true, onSelect = function() withdraw(game) end },
|
||||
{ label = Strings("DEPOSIT ITEM"), keepOpen = true, onSelect = function() deposit(game) end },
|
||||
{ label = Strings("TOSS ITEM"), keepOpen = true, onSelect = function() toss(game) end },
|
||||
{ label = Strings("LOG OFF") },
|
||||
{ label = Strings("LOG OFF"), onSelect = logOff },
|
||||
-- silent PC session (BIT_NO_MENU_BUTTON_SOUND); players_pc.asm
|
||||
-- PlayersPCMenu TextBoxBorder (0,0) b=8 c=14 → 16x10
|
||||
}, { tx = 0, ty = 0, tw = 16, th = 10, noSound = true })
|
||||
}, { tx = 0, ty = 0, tw = 16, th = 10, noSound = true, onCancel = logOff })
|
||||
end
|
||||
|
||||
return PlayerPC
|
||||
|
||||
Reference in New Issue
Block a user