Anonymous

Module:GameData: Difference between revisions

From Melvor Idle
Implement data version functions
(Update for v1.3)
(Implement data version functions)
 
Line 233: Line 233:
table.sort(resultTable, orderFunc)
table.sort(resultTable, orderFunc)
return resultTable
return resultTable
end
-- Returns the current game data version & file version
function p.getDataVersion()
local dv = GameData._dataVersion
if dv == nil then
return 'Unknown', 'Unknown'
end
return (dv.gameVersion or 'Unknown'), (dv.fileVersion or 'Unknown')
end
function p.getDataVersionText()
local gameVersion, fileVersion = p.getDataVersion()
return 'V' .. gameVersion .. ' (?' .. fileVersion .. ')'
end
end


return p
return p