Module:EcoVersionString: Difference between revisions

From Eco - English Wiki
[checked revision][checked revision]
m StalEF moved page Module:Eco version string to Module:EcoVersionString without leaving a redirect
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
local p = {}
local p = {}
local VersionData = mw.loadData("Module:EcoVersion")


function p.main()
function p.main()
assert(VersionData.eco, "Failed to load data from Module:EcoVersion!")
local VersionData = mw.loadData("Module:EcoVersionData")
assert(VersionData.game, "Failed to load Data from Module:EcoVersionData!")


local ecoVersionString = VersionData.eco["eco"]["ecoVersion"]
local EcoVersionString = VersionData.game["eco"]["VersionNumber"]
if ecoVersionString then
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 file.</span>"
return "<span style=\"color:red\">ERROR: Failed to load Eco version from Data.</span>"
end
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