feat: stat screen on toilet with Focus overlay, screen draw callback added to manager, meter decay now only on timer revolution, timer visible on stat screen not minigames, Meter.get_timer_decay_percentage() added, Context.stat_screen_active flag added
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Zoltan Timar
2026-02-26 16:54:00 +01:00
parent 2d25537abb
commit aaf1479a78
6 changed files with 89 additions and 8 deletions

View File

@@ -11,6 +11,7 @@ local _screens = {}
--- @param[opt] screen_data.situations table Array of situation ID strings. Defaults to {}.
--- @param[opt] screen_data.init function Called when the screen is entered. Defaults to noop.
--- @param[opt] screen_data.update function Called each frame while screen is active. Defaults to noop.
--- @param[opt] screen_data.draw function Called after the focus overlay to draw screen-specific overlays. Defaults to noop.
function Screen.register(screen_data)
if _screens[screen_data.id] then
trace("Warning: Overwriting screen with id: " .. screen_data.id)
@@ -24,6 +25,9 @@ function Screen.register(screen_data)
if not screen_data.update then
screen_data.update = function() end
end
if not screen_data.draw then
screen_data.draw = function() end
end
_screens[screen_data.id] = screen_data
end