mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-04 05:13:55 -04:00
Small fixes
This commit is contained in:
parent
f7a394f057
commit
6ddb28ffbc
10 changed files with 85 additions and 71 deletions
40
LICENSE
40
LICENSE
|
@ -1,21 +1,21 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2018 Justin van der Leij
|
Copyright (c) 2018 Justin van der Leij
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all
|
||||||
copies or substantial portions of the Software.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
78
README.md
78
README.md
|
@ -1,39 +1,39 @@
|
||||||
# Concord
|
# Concord
|
||||||
|
|
||||||
Concord is a feature complete ECS.
|
Concord is a feature complete ECS.
|
||||||
It's main focus is on speed and usage. You should be able to quickly write code that performs well.
|
It's main focus is on speed and usage. You should be able to quickly write code that performs well.
|
||||||
|
|
||||||
Documentation for Concord can be found in the [Wiki tab](https://github.com/Tjakka5/Concord/wiki).
|
Documentation for Concord can be found in the [Wiki tab](https://github.com/Tjakka5/Concord/wiki).
|
||||||
|
|
||||||
Auto generated docs for Concord can be found in the [Github page](https://tjakka5.github.io/Concord/). These are still work in progress and might be incomplete though.
|
Auto generated docs for Concord can be found in the [Github page](https://tjakka5.github.io/Concord/). These are still work in progress and might be incomplete though.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
Download the repository and drop it in your project, then simply require it as:
|
Download the repository and drop it in your project, then simply require it as:
|
||||||
```lua
|
```lua
|
||||||
local Concord = require(PathToConcord).init()
|
local Concord = require(PathToConcord).init()
|
||||||
|
|
||||||
You will only need to call .init once when you first require it.
|
You will only need to call .init once when you first require it.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Modules
|
## Modules
|
||||||
Below is a list of modules.
|
Below is a list of modules.
|
||||||
More information about what each done can be found in the Wiki
|
More information about what each done can be found in the Wiki
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
local Concord = require("concord")
|
local Concord = require("concord")
|
||||||
local Entity = require("concord.entity")
|
local Entity = require("concord.entity")
|
||||||
local Component = require("concord.component")
|
local Component = require("concord.component")
|
||||||
local System = require("concord.system")
|
local System = require("concord.system")
|
||||||
local Instance = require("concord.instance")
|
local Instance = require("concord.instance")
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
```
|
```
|
||||||
Positive07: Constant support and a good rubberduck
|
Positive07: Constant support and a good rubberduck
|
||||||
Brbl: Early testing and issue reporting
|
Brbl: Early testing and issue reporting
|
||||||
Josh: Squashed a few bugs and docs
|
Josh: Squashed a few bugs and docs
|
||||||
Erasio: Took inspiration from HooECS. Also introduced me to ECS.
|
Erasio: Took inspiration from HooECS. Also introduced me to ECS.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Licence
|
## Licence
|
||||||
MIT Licensed - Copyright Justin van der Leij (Tjakka5)
|
MIT Licensed - Copyright Justin van der Leij (Tjakka5)
|
||||||
|
|
|
@ -10,8 +10,6 @@ function Assemblage.new(assemble)
|
||||||
__isAssemblage = true,
|
__isAssemblage = true,
|
||||||
}, Assemblage)
|
}, Assemblage)
|
||||||
|
|
||||||
Assemblage.__mt = {__index = assemblage}
|
|
||||||
|
|
||||||
return assemblage
|
return assemblage
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -22,5 +20,7 @@ function Assemblage:assemble(e, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(Assemblage, {
|
return setmetatable(Assemblage, {
|
||||||
__call = function(_, ...) return Assemblage.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return Assemblage.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -33,5 +33,7 @@ function Component:__initialize(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(Component, {
|
return setmetatable(Component, {
|
||||||
__call = function(_, ...) return Component.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return Component.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -136,5 +136,7 @@ function Entity:has(component)
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(Entity, {
|
return setmetatable(Entity, {
|
||||||
__call = function(_, ...) return Entity.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return Entity.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -61,9 +61,11 @@ function Concord.init(settings)
|
||||||
error("bad argument #1 to 'Concord.addInstance' (Instance expected, got "..type(instance)..")", 2)
|
error("bad argument #1 to 'Concord.addInstance' (Instance expected, got "..type(instance)..")", 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
for i, instance in ipairs(Concord.instances) do
|
for i, _instance in ipairs(Concord.instances) do
|
||||||
table.remove(Concord.instances, i)
|
if (instance == _instance) then
|
||||||
break
|
table.remove(Concord.instances, i)
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -282,5 +282,7 @@ function Instance:onEntityRemoved(e) -- luacheck: ignore
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(Instance, {
|
return setmetatable(Instance, {
|
||||||
__call = function(_, ...) return Instance.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return Instance.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -77,5 +77,7 @@ function List:has(obj)
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(List, {
|
return setmetatable(List, {
|
||||||
__call = function() return List.new() end,
|
__call = function()
|
||||||
|
return List.new()
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -46,5 +46,7 @@ end
|
||||||
|
|
||||||
return setmetatable(Pool, {
|
return setmetatable(Pool, {
|
||||||
__index = List,
|
__index = List,
|
||||||
__call = function(_, ...) return Pool.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return Pool.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -156,5 +156,7 @@ function System:disabledCallback(callbackName) -- luacheck: ignore
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(System, {
|
return setmetatable(System, {
|
||||||
__call = function(_, ...) return System.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return System.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue