2024-01-08 20:58:07 +00:00
---
-- `openmw.menu` can be used only in menu scripts.
-- @module menu
-- @usage local menu = require('openmw.menu')
---
-- @type STATE
-- @field [parent=#STATE] NoGame
-- @field [parent=#STATE] Running
-- @field [parent=#STATE] Ended
2024-01-14 12:38:35 +00:00
---
-- All possible game states returned by @{#menu.getState}
-- @field [parent=#menu] #STATE STATE
2024-01-08 20:58:07 +00:00
---
-- Current game state
-- @function [parent=#menu] getState
-- @return #STATE
---
-- Start a new game
-- @function [parent=#menu] newGame
---
-- Load the game from a save slot
-- @function [parent=#menu] loadGame
-- @param #string directory name of the save directory (e. g. character)
-- @param #string slotName name of the save slot
---
-- Delete a saved game
-- @function [parent=#menu] deleteGame
-- @param #string directory name of the save directory (e. g. character)
-- @param #string slotName name of the save slot
---
-- Current save directory
-- @function [parent=#menu] getCurrentSaveDir
-- @return #string
---
-- Save the game
-- @function [parent=#menu] saveGame
-- @param #string description human readable description of the save
-- @param #string slotName name of the save slot
---
-- @type SaveInfo
-- @field #string description
-- @field #string playerName
-- @field #string playerLevel
2024-01-14 15:40:46 +00:00
-- @field #number timePlayed Gameplay time for this saved game. Note: available even with [time played](../modding/settings/saves.html#timeplayed) turned off
2024-01-30 21:05:41 +00:00
-- @field #number creationTime Time at which the game was saved, as a timestamp in seconds. Can be passed as the second argument to `os.data`.
2024-01-08 20:58:07 +00:00
-- @field #list<#string> contentFiles
---
-- List of all saves for the given directory
-- @function [parent=#menu] getSaves
-- @param #string directory name of the save directory (e. g. character)
-- @return #list<#SaveInfo>
---
2024-01-14 15:40:46 +00:00
-- List of all available saves, grouped by directory
2024-01-08 20:58:07 +00:00
-- @function [parent=#menu] getAllSaves
2024-01-14 15:40:46 +00:00
-- @return #map<#string, #list<#SaveInfo>>
2024-01-08 20:58:07 +00:00
---
-- Exit the game
-- @function [parent=#menu] quit
2024-01-14 12:38:35 +00:00
return nil