Module:Chemistry Lookup: Difference between revisions

From Space Station 14 Wiki
No edit summary
No edit summary
Line 5: Line 5:


function p.readscalar(frame)
function p.readscalar(frame)
mw.logObject(prototypes)
local aaa = prototypes[frame.args[0]]
return prototypes[frame.args[0]][frame.args[1]]
mw.logObject(aaa)
return aaa[frame.args[1]]
end
end


return p
return p

Revision as of 00:12, 18 December 2021

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

local prototypes = mw.loadData("Module:Prototype Lookup/data")

local p = {}
p.prototypes = prototypes

function p.readscalar(frame)
	local aaa = prototypes[frame.args[0]]
	mw.logObject(aaa)
	return aaa[frame.args[1]]
end

return p