mirror of
https://github.com/BlackMATov/evolved.lua.git
synced 2025-12-16 22:19:25 +07:00
style fixes
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
## Thoughts
|
## Thoughts
|
||||||
|
|
||||||
- We can return deferred status from modifying operations and spawn/clone methods.
|
- We can return deferred status from modifying operations and spawn/clone methods.
|
||||||
|
- We should have a way to not copy components on deferred spawn/clone.
|
||||||
|
|
||||||
## Known Issues
|
## Known Issues
|
||||||
|
|
||||||
|
|||||||
12
evolved.lua
12
evolved.lua
@@ -3971,12 +3971,12 @@ end
|
|||||||
|
|
||||||
---@param prefab evolved.entity
|
---@param prefab evolved.entity
|
||||||
---@param entity evolved.entity
|
---@param entity evolved.entity
|
||||||
---@param components table<evolved.fragment, evolved.component>
|
---@param component_map table<evolved.fragment, evolved.component>
|
||||||
function __defer_clone_entity(prefab, entity, components)
|
function __defer_clone_entity(prefab, entity, component_map)
|
||||||
---@type table<evolved.fragment, evolved.component>
|
---@type table<evolved.fragment, evolved.component>
|
||||||
local component_map_dup = __acquire_table(__table_pool_tag.component_map)
|
local component_map_dup = __acquire_table(__table_pool_tag.component_map)
|
||||||
|
|
||||||
for fragment, component in __lua_next, components do
|
for fragment, component in __lua_next, component_map do
|
||||||
component_map_dup[fragment] = component
|
component_map_dup[fragment] = component
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -4009,8 +4009,8 @@ end
|
|||||||
---@param prefab evolved.entity
|
---@param prefab evolved.entity
|
||||||
---@param entity_list evolved.entity[]
|
---@param entity_list evolved.entity[]
|
||||||
---@param entity_count integer
|
---@param entity_count integer
|
||||||
---@param components table<evolved.fragment, evolved.component>
|
---@param component_map table<evolved.fragment, evolved.component>
|
||||||
function __defer_multi_clone_entity(prefab, entity_list, entity_count, components)
|
function __defer_multi_clone_entity(prefab, entity_list, entity_count, component_map)
|
||||||
---@type evolved.entity[]
|
---@type evolved.entity[]
|
||||||
local entity_list_dup = __acquire_table(__table_pool_tag.entity_list)
|
local entity_list_dup = __acquire_table(__table_pool_tag.entity_list)
|
||||||
|
|
||||||
@@ -4021,7 +4021,7 @@ function __defer_multi_clone_entity(prefab, entity_list, entity_count, component
|
|||||||
---@type table<evolved.fragment, evolved.component>
|
---@type table<evolved.fragment, evolved.component>
|
||||||
local component_map_dup = __acquire_table(__table_pool_tag.component_map)
|
local component_map_dup = __acquire_table(__table_pool_tag.component_map)
|
||||||
|
|
||||||
for fragment, component in __lua_next, components do
|
for fragment, component in __lua_next, component_map do
|
||||||
component_map_dup[fragment] = component
|
component_map_dup[fragment] = component
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user