Module:Sandbox/Exaskliri/GearInfo/S3: Difference between revisions
From Inkipedia, the Splatoon wiki
(Created page with "local p = {} local cargo = mw.ext.cargo function boolTextToNum(a) if string.lower(a) == "true" then return 1 elseif string.lower(a) == "false" then return 0 end end function cargoStore(frame, args) local storeArgs = frame:getParent().args storeArgs["_table"] = "Gear_S3" storeArgs["adjustable"] = boolTextToNum(storeArgs["adjustable"]) storeArgs["sandbox"] = boolTextToNum(storeArgs["sandbox"]) frame:callParserFunction("#cargo_store:", storeArgs) end functi...") |
m (cargoStore(frame) directly used frame for args) |
||
Line 10: | Line 10: | ||
end | end | ||
function cargoStore(frame | function cargoStore(frame) | ||
local storeArgs = frame:getParent().args | local storeArgs = frame:getParent().args | ||
storeArgs["_table"] = "Gear_S3" | storeArgs["_table"] = "Gear_S3" | ||
Line 20: | Line 20: | ||
function p.invokeFromTemplate(frame) | function p.invokeFromTemplate(frame) | ||
cargoStore(frame | cargoStore(frame) | ||
end | end | ||
Revision as of 11:54, 24 March 2024
Documentation for this module may be created at Module:Sandbox/Exaskliri/GearInfo/S3/doc
local p = {} local cargo = mw.ext.cargo function boolTextToNum(a) if string.lower(a) == "true" then return 1 elseif string.lower(a) == "false" then return 0 end end function cargoStore(frame) local storeArgs = frame:getParent().args storeArgs["_table"] = "Gear_S3" storeArgs["adjustable"] = boolTextToNum(storeArgs["adjustable"]) storeArgs["sandbox"] = boolTextToNum(storeArgs["sandbox"]) frame:callParserFunction("#cargo_store:", storeArgs) end function p.invokeFromTemplate(frame) cargoStore(frame) end return p --Thanks for simplifying #cargo_store callParserFunction for User:Exaskliri. --https://pillarsofeternity.fandom.com/wiki/Module:Lootlist?action=edit&oldid=181089