mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 20:33:54 -04:00
Automate naming process
This commit is contained in:
parent
e0f88025ba
commit
144a42dc9e
7 changed files with 78 additions and 53 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
local PATH = (...):gsub('%.[^%.]+$', '')
|
||||
|
||||
local Systems = require(PATH..".systems")
|
||||
local Pool = require(PATH..".pool")
|
||||
|
||||
local System = {}
|
||||
|
@ -36,20 +35,13 @@ System.mt = {
|
|||
--- Creates a new System prototype.
|
||||
-- @param ... Variable amounts of filters
|
||||
-- @return A new System prototype
|
||||
function System.new(name, ...)
|
||||
if (type(name) ~= "string") then
|
||||
error("bad argument #1 to 'System.new' (string expected, got "..type(name)..")", 2)
|
||||
end
|
||||
|
||||
function System.new(...)
|
||||
local baseSystem = setmetatable({
|
||||
__name = name,
|
||||
__isBaseSystem = true,
|
||||
__filter = {...},
|
||||
}, System.mt)
|
||||
baseSystem.__index = baseSystem
|
||||
|
||||
Systems.register(name, baseSystem)
|
||||
|
||||
return baseSystem
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue