Module:Crafting: Difference between revisions

Add support for `Arrow`
No edit summary
(Add support for `Arrow`)
Line 1: Line 1:
p = {}
p = {}


local slot = require([[Module:InventorySlot]])
function Grid(args, w, h)
return require([[Module:InventorySlot]]).call(args,w,h)
end


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


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


Line 18: Line 20:
end
end


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


Line 27: Line 29:
end
end


return slot.Call(args, 5, 1)
return Grid(args, 5, 1)
end
 
function p.Arrow( f )
local args = f.args
if #args == 0 then
args = f:getParent().args
end
return require([[Module:Sprite]])
:new("crafting_arrow")
:setItem(mw.text.trim(args[1]))
:GenerateHTML()
end
end


return p
return p
Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator, Widget editors
154

edits