1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-19 17:41:33 +00:00

SaveInfo.timePlayed field

This commit is contained in:
uramer 2024-01-14 16:40:46 +01:00
parent 94d782c4be
commit 0a2adfee16
2 changed files with 4 additions and 2 deletions

View file

@ -85,6 +85,7 @@ namespace MWLua
slotInfo["description"] = slot.mProfile.mDescription; slotInfo["description"] = slot.mProfile.mDescription;
slotInfo["playerName"] = slot.mProfile.mPlayerName; slotInfo["playerName"] = slot.mProfile.mPlayerName;
slotInfo["playerLevel"] = slot.mProfile.mPlayerLevel; slotInfo["playerLevel"] = slot.mProfile.mPlayerLevel;
slotInfo["timePlayed"] = slot.mProfile.mTimePlayed;
sol::table contentFiles(lua, sol::create); sol::table contentFiles(lua, sol::create);
for (size_t i = 0; i < slot.mProfile.mContentFiles.size(); ++i) for (size_t i = 0; i < slot.mProfile.mContentFiles.size(); ++i)
contentFiles[i + 1] = Misc::StringUtils::lowerCase(slot.mProfile.mContentFiles[i]); contentFiles[i + 1] = Misc::StringUtils::lowerCase(slot.mProfile.mContentFiles[i]);

View file

@ -50,6 +50,7 @@
-- @field #string description -- @field #string description
-- @field #string playerName -- @field #string playerName
-- @field #string playerLevel -- @field #string playerLevel
-- @field #number timePlayed Gameplay time for this saved game. Note: available even with [time played](../modding/settings/saves.html#timeplayed) turned off
-- @field #list<#string> contentFiles -- @field #list<#string> contentFiles
--- ---
@ -59,9 +60,9 @@
-- @return #list<#SaveInfo> -- @return #list<#SaveInfo>
--- ---
-- List of all available saves -- List of all available saves, grouped by directory
-- @function [parent=#menu] getAllSaves -- @function [parent=#menu] getAllSaves
-- @return #list<#SaveInfo> -- @return #map<#string, #list<#SaveInfo>>
--- ---
-- Exit the game -- Exit the game