Mod: fix annotations
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
---@field public name string Technical name of the mod.
|
---@field public name string Technical name of the mod.
|
||||||
---@field public path string Path to the mod folder.
|
---@field public path string Path to the mod folder.
|
||||||
---@field public Class table A public class that provides a mod.
|
---@field public Class table A public class that provides a mod.
|
||||||
---@field public require fun(FileName:string)
|
---@field public require fun(FileName:string):table
|
||||||
Mod = {}
|
Mod = {}
|
||||||
|
|
||||||
|
|
||||||
@@ -25,11 +25,12 @@ function Mod:new()
|
|||||||
end
|
end
|
||||||
|
|
||||||
--- Get an instance of a public class provided by a mod
|
--- Get an instance of a public class provided by a mod
|
||||||
|
---@param ... any?
|
||||||
---@return table
|
---@return table
|
||||||
-- TODO: возможно стоит создать какой-то абстрактный класс,
|
-- TODO: возможно стоит создать какой-то абстрактный класс,
|
||||||
-- который будет является алеасом на table и будет обозначать наш класс
|
-- который будет является алеасом на table и будет обозначать наш класс
|
||||||
function Mod:getModClassInstance()
|
function Mod:getModClassInstance(...)
|
||||||
local instance = self.Class:new()
|
local instance = self.Class:new(...)
|
||||||
|
|
||||||
return instance
|
return instance
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user