Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Reagent Lookup: Difference between revisions

From Delta-V Wiki
(Created page with "local reagent = "User:Floofers/reagents.json" reagent = mw.text.jsonDecode(mw.title.new(reagent, "User"):getContent()) function recipe(frame) return reagent[frame.args[1]]["recipes"] end")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
local reagent = "User:Floofers/reagents.json"
local reagent = "User:Floofers/reagents.json"
reagent = mw.text.jsonDecode(mw.title.new(reagent, "User"):getContent())


reagent = mw.text.jsonDecode(mw.title.new(reagent, "User"):getContent())
local p = {}


function recipe(frame)
function p.recipe(frame)
return reagent[frame.args[1]]["recipes"]
return reagent[frame.args[1]]["recipes"]
end
end
return p

Latest revision as of 09:39, 25 December 2023

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

local reagent = "User:Floofers/reagents.json"
reagent = mw.text.jsonDecode(mw.title.new(reagent, "User"):getContent())

local p = {}

function p.recipe(frame)
	return reagent[frame.args[1]]["recipes"]
end

return p