Module:UŊMAO

From Nguhcraft Wiki
Revision as of 13:27, 5 September 2025 by Annwan (talk | contribs) (Created page with "local def, _a do local u = require("Module:Utils") def, _a = u.def, u._a end local _m = {} _m.resource_table = function(frame) local out = [=[<table class="wikitable sortable"><tr><th>Code</th><th>Resource</th><th>Value (in slablets)</th><th>Traded at the Slab Exchange</th></tr>]=] local resources = require("Module:Data/UŊMAO/Resources") for _, v in ipairs(resources) do out = out .. "<tr><td>" .. v.code .. "</td><td>" .. v.name .. "</td><td>" .. v.value ....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Functions for the UŊMAO page


local def, _a do local u = require("Module:Utils") def, _a = u.def, u._a end

local _m = {}

_m.resource_table = function(frame)
	local out = [=[<table class="wikitable sortable"><tr><th>Code</th><th>Resource</th><th>Value (in [[slablet]]s)</th><th>Traded at the [[Slab Exchange]]</th></tr>]=]
	local resources = require("Module:Data/UŊMAO/Resources")
	for _, v in ipairs(resources) do
		out = out .. "<tr><td>" .. v.code .. "</td><td>" .. v.name .. "</td><td>" .. v.value .. "</td><td>" .. (v.sxg and "yes" or "no") .. "</td></tr>"
	end
	out = out .. "</table>"
	return out
end

return m