Add missing __index
This commit is contained in:
parent
90f537d6bf
commit
14bd08b16c
|
@ -7,6 +7,7 @@ local driver = {}
|
|||
--------------------------------------------------------------------------------
|
||||
|
||||
local ItemStack = {}
|
||||
ItemStack.__index = ItemStack
|
||||
|
||||
local function ItemStack_new(item)
|
||||
checkArg(1, item, "table");
|
||||
|
@ -14,9 +15,7 @@ local function ItemStack_new(item)
|
|||
data = item.getValue1(),
|
||||
quantity = item.getValue2()
|
||||
}
|
||||
for k,v in pairs(ItemStack) do
|
||||
out[k] = v
|
||||
end
|
||||
setmetatable(out, ItemStack)
|
||||
return out
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue