Module:RecipeDetails/Pull: Difference between revisions

From IdleOn MMO Wiki
mNo edit summary
mNo edit summary
Line 1: Line 1:
local metat = mw.loadData("Module:RecipeDetails/data").allRecipes  
local metat = mw.loadData("Module:RecipeDetails/data").allRecipes  
local t = {}
local t = {}
function recFormat(tab)
function recFormat(metat)
local inner = {}
for k, v in pairs(tab) do
for k, v in pairs(tab) do
inner[k] = recFormat(v)
local inner = {}
for a, b in pairs(v) do
inner[a] = b
end
t[k] = inner
end
end
return inner
end
end
t = recFormat(metat)
recFormat(metat)
return t
return t

Revision as of 00:57, 13 April 2024

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

local metat = mw.loadData("Module:RecipeDetails/data").allRecipes 
local t = {}
function recFormat(metat)
	for k, v in pairs(tab) do
		local inner = {}
		for a, b in pairs(v) do
			inner[a] = b
		end
		t[k] = inner
	end
end
recFormat(metat)
return t