Module:Having: Difference between revisions

Rebecca (talk | contribs)
No edit summary
Rebecca (talk | contribs)
No edit summary
Line 1: Line 1:
local p = {}
local p = {}
local function ugh(x) return type(x) == "bool" and x or nil,x.error end
local function ugh(x) return type(x) == "boolean" and x or nil,x.error end
function p.register(frame)
function p.register(frame)
local aa = frame:getParent().args
local aa = frame:getParent().args

Revision as of 19:55, 11 October 2025

Documentation for this module may be created at Module:Having/doc

local p = {}
local function ugh(x) return type(x) == "boolean" and x or nil,x.error end
function p.register(frame)
	local aa = frame:getParent().args
	for e in aa[1]:gmatch"[^,]+" do 
		local obj = {}
		obj['Had by'] = 'The Having Game/Museum'
		obj['Object type'] = (aa.type or 'object')..' title'
		obj['Emoji'] = mw.text.trim(e)
		obj['Given by'] = aa[4]
		assert(ugh(mw.smw.subobject(obj))) end end
return p