Module:EcoVersionString: Difference between revisions
From Eco - English Wiki
[unchecked revision] | [checked revision] |
No edit summary Tag: Reverted |
No edit summary |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p.main() | function p.main() | ||
assert(VersionData. | local VersionData = mw.loadData("Module:EcoVersionData") | ||
assert(VersionData.game, "Failed to load Data from Module:EcoVersionData!") | |||
local | local EcoVersionString = VersionData.game["eco"]["VersionNumber"] | ||
if | if EcoVersionString then | ||
return | return '[https://steamcommunity.com/app/382310/announcements/ ' .. EcoVersionString .. ']' | ||
else | else | ||
return "<span style=\"color:red\">ERROR: Failed to load Eco version from | return "<span style=\"color:red\">ERROR: Failed to load Eco version from Data.</span>" | ||
end | |||
end | end | ||
return p | return p | ||
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