Module:Chemistry Lookup: Difference between revisions

From Space Station 14 Wiki
No edit summary
No edit summary
Line 1: Line 1:
local prototypes = mw.loadData("Module:Prototype Lookup/data")
local prototypes = mw.loadData("Module:Prototype Lookup/data")
mw.log(prototypes)


local p = {}
local p = {}
p.prototypes = prototypes


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


return p
return p

Revision as of 00:11, 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)
	mw.logObject(prototypes)
	return prototypes[frame.args[0]][frame.args[1]]
end

return p