Changes in class constructors. close #18
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
local getInstance = Class.getInstance
|
||||
|
||||
---@class ItemFactory
|
||||
---@field defaultDef Item.ItemDefinition|Node.NodeDefinition
|
||||
---@field itemClass Item|Node
|
||||
@@ -8,10 +10,10 @@ local ItemFactory = {}
|
||||
---@return ItemFactory
|
||||
function ItemFactory:new(itemClass, defaultDef)
|
||||
---@type ItemFactory
|
||||
local instance = setmetatable({
|
||||
local instance =getInstance(self, {
|
||||
defaultDef = defaultDef,
|
||||
itemClass = itemClass,
|
||||
}, {__index = self})
|
||||
})
|
||||
|
||||
return instance
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user