mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 12:24:11 -04:00
Added optional table for output for entity:getComponents
This commit is contained in:
parent
8e1b14d53b
commit
61720312cb
1 changed files with 3 additions and 2 deletions
|
@ -188,8 +188,9 @@ end
|
|||
-- Warning: Do not modify this table.
|
||||
-- Use Entity:give/ensure/remove instead
|
||||
-- @treturn table Table of all Components the Entity has
|
||||
function Entity:getComponents()
|
||||
local components = Utils.shallowCopy(self)
|
||||
function Entity:getComponents(output)
|
||||
output = output or {}
|
||||
local components = Utils.shallowCopy(self, output)
|
||||
components.__world = nil
|
||||
components.__isEntity = nil
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue