Module:Crafting: Difference between revisions

From Official Gamemode 4 Wiki
Jump to navigation Jump to search
(Created page with "p = {} function p.Grid( f ) local args = f.args if #args == 0 then args = f:getParent().args end return require(InventorySlot).Call(args, 3, 3) end function p.Cel...")
 
No edit summary
Line 1: Line 1:
p = {}
p = {}
local slot = require([[Module:InventorySlot]])


function p.Grid( f )
function p.Grid( f )
Line 7: Line 9:
end
end


return require([[InventorySlot]]).Call(args, 3, 3)
return slot.Call(args, 3, 3)
end
end


Line 16: Line 18:
end
end


return require([[InventorySlot]]).Call(args, 1, 1)
return slot.Call(args, 1, 1)
end
end


Line 25: Line 27:
end
end


return require([[InventorySlot]]).Call(args, 5, 1)
return slot.Call(args, 5, 1)
end
end


return p
return p

Revision as of 15:06, 10 November 2018

p = {}

local slot = require([[Module:InventorySlot]])

function p.Grid( f )
	local args = f.args
	if #args == 0 then
		args = f:getParent().args
	end

	return slot.Call(args, 3, 3)
end

function p.Cell( f )
	local args = f.args
	if #args == 0 then
		args = f:getParent().args
	end

	return slot.Call(args, 1, 1)
end

function p.Hopper( f )
	local args = f.args
	if #args == 0 then
		args = f:getParent().args
	end

	return slot.Call(args, 5, 1)
end

return p