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) mw.log(x) return type(x) == "boolean" and x or nil,x.error end
local function ugh(x) mw.log(x) return type(x) == "boolean" and x or nil,x.error end
function p.register(frame)
function p.register(frame) return p.real_register(frame:getParent().args) end
local aa = frame:getParent().args
function p.real_register(aa)
for e in aa[1]:gmatch"[^,]+" do  
for e in aa[1]:gmatch"[^,]+" do  
local obj = {}
local obj = {}

Revision as of 19:57, 11 October 2025

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

local p = {}
local function ugh(x) mw.log(x) return type(x) == "boolean" and x or nil,x.error end
function p.register(frame) return p.real_register(frame:getParent().args) end
function p.real_register(aa)
	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