Module:EcoVersionString: Difference between revisions
From Eco - English Wiki
[checked revision] | [checked revision] |
No edit summary |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
function p.main() | function p.main() | ||
local VersionData = mw.loadData("Module:EcoVersionData") | local VersionData = mw.loadData("Module:EcoVersionData") | ||
assert(VersionData. | assert(VersionData.game, "Failed to load Data from Module:EcoVersionData!") | ||
local EcoVersionString = VersionData. | local EcoVersionString = VersionData.game["eco"]["VersionNumber"] | ||
if | if EcoVersionString then | ||
return EcoVersionString | return '[https://steamcommunity.com/app/382310/announcements/ ' .. EcoVersionString .. ']' | ||
else | else | ||
return "<span style=\"color:red\">ERROR: Failed to load Eco version from Data.</span>" | return "<span style=\"color:red\">ERROR: Failed to load Eco version from Data.</span>" |
Latest revision as of 08:19, 24 November 2024
local p = {}
function p.main()
local VersionData = mw.loadData("Module:EcoVersionData")
assert(VersionData.game, "Failed to load Data from Module:EcoVersionData!")
local EcoVersionString = VersionData.game["eco"]["VersionNumber"]
if EcoVersionString then
return '[https://steamcommunity.com/app/382310/announcements/ ' .. EcoVersionString .. ']'
else
return "<span style=\"color:red\">ERROR: Failed to load Eco version from Data.</span>"
end
end
return p