forked from Apancore.Studio/simple-makes-complex
Remove GlobalSpace, domains and extends methods in Mod
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
Api = {}
|
||||
|
||||
--[[
|
||||
---@alias Domain table<string,Mod|SubDomain> Global table for accessing public classes provided by mods.
|
||||
---@alias SubDomain table<string,Mod>
|
||||
|
||||
@@ -46,7 +46,7 @@ Api.addModToGlobalSpace = function(mod, location, force)
|
||||
-- TODO: баг: ликвидные имена не определяются шаблоном
|
||||
--[[if not location:match('^[%a_][%w_]*([%.][%a_][%w_]*)*$') then
|
||||
error('bad argument #2 to \'Api.addModToGlobalSpace\' (invalid format)')
|
||||
end--]]
|
||||
end --] ]
|
||||
|
||||
-- Split `location` into fields -- TODO: !!!Make a String function!!!
|
||||
local fields = {}
|
||||
@@ -88,4 +88,4 @@ Api.addModToGlobalSpace = function(mod, location, force)
|
||||
error(string.format('field \'%s\' already exists in \'%s\'', last_field, location))
|
||||
end
|
||||
current[last_field] = mod
|
||||
end
|
||||
end --]]
|
||||
@@ -28,6 +28,7 @@ function Mod.getInfo(modname)
|
||||
return {name = name, shortName = shortName, path = path, require = require}
|
||||
end
|
||||
|
||||
--[[
|
||||
function Mod:new()
|
||||
---@type Mod
|
||||
local instance = setmetatable(Mod.getInfo(), { __index = self })
|
||||
@@ -61,6 +62,6 @@ function Mod:getModClassExtended(ChildClass)
|
||||
local childClass = Mod:getClassExtended(self.Class, ChildClass or {})
|
||||
|
||||
return childClass
|
||||
end
|
||||
end --]]
|
||||
|
||||
return Mod
|
||||
Reference in New Issue
Block a user