docs for table properties
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Zsolt Tasnadi
2026-02-26 10:21:48 +01:00
parent 64de41a940
commit 8f34cbf875
7 changed files with 99 additions and 4 deletions

View File

@@ -4,6 +4,13 @@ local _screens = {}
--- Registers a screen definition.
--- @within Screen
-- @param screen_data table The screen data table.
-- @param screen_data.id string Unique screen identifier.
-- @param screen_data.name string Display name of the screen.
-- @param screen_data.decisions table Array of decision ID strings available on this screen.
-- @param screen_data.background string Map ID used as background.
-- @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.
function Screen.register(screen_data)
if _screens[screen_data.id] then
trace("Warning: Overwriting screen with id: " .. screen_data.id)