Module:GasIcon: Difference between revisions
From Stationeers Community Wiki
More actions
No edit summary |
Move Gas name parsing to the more robust Module:Gas |
||
| Line 1: | Line 1: | ||
local GasData = mw.loadData("Module:Gas/data") | local GasData = mw.loadData("Module:Gas/data") | ||
local Gas = require("Module:Gas") | |||
local p = {} | local p = {} | ||
function p.GetIcon(frame) | function p.GetIcon(frame) | ||
local args = frame:getParent().args | local args = frame:getParent().args | ||
local gas = | local gas = Gas.GetGas(args[1]) | ||
mw.logObject(args) | mw.logObject(args) | ||
local size = args.Size or "32px" | local size = args.Size or "32px" | ||
Latest revision as of 18:11, 15 March 2026
Documentation for this module may be created at Module:GasIcon/doc
local GasData = mw.loadData("Module:Gas/data")
local Gas = require("Module:Gas")
local p = {}
function p.GetIcon(frame)
local args = frame:getParent().args
local gas = Gas.GetGas(args[1])
mw.logObject(args)
local size = args.Size or "32px"
return "[["..gas.Image.."|"..size.."|link="..gas.HumanReadableName.."]]"
end
return p