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