Module:Having: Difference between revisions

Rebecca (talk | contribs)
No edit summary
Tag: Manual revert
Rebecca (talk | contribs)
No edit summary
Line 9: Line 9:
obj['Emoji'] = mw.text.trim(e)
obj['Emoji'] = mw.text.trim(e)
obj['Given by'] = aa[4]
obj['Given by'] = aa[4]
assert(ugh(mw.smw.subobject(obj))) end end
assert(ugh(mw.smw.subobject(obj, nil))) end end
return p
return p

Revision as of 21:27, 11 October 2025

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

local p = {}
local function ugh(x) if x == true then return x else return nil,x.error end 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, nil))) end end
return p