mirror of
https://github.com/BlackMATov/evolved.lua.git
synced 2026-09-18 09:34:36 +07:00
remove/clear/multi_remove return success for dead entities now
This commit is contained in:
+5
-3
@@ -2587,7 +2587,7 @@ do
|
||||
end)
|
||||
:on_remove(function(e, f, c)
|
||||
f2_remove_count = f2_remove_count + 1
|
||||
assert(evo.is_alive(e))
|
||||
assert(evo.get(e, f) == nil)
|
||||
assert(evo.is_alive(f))
|
||||
assert(c == 82)
|
||||
end)
|
||||
@@ -5065,11 +5065,13 @@ do
|
||||
assert(not evo.set(e, f1, 11))
|
||||
assert(not evo.assign(e, f1, 11))
|
||||
assert(not evo.insert(e, f1, 11))
|
||||
assert(evo.remove(e, f1))
|
||||
assert(evo.clear(e))
|
||||
|
||||
assert(not evo.multi_set(e, { f1 }, { 11 }))
|
||||
assert(not evo.multi_assign(e, { f1 }, { 11 }))
|
||||
assert(not evo.multi_insert(e, { f1 }, { 11 }))
|
||||
assert(not evo.multi_remove(e, { f1 }))
|
||||
assert(evo.multi_remove(e, { f1 }))
|
||||
end
|
||||
|
||||
do
|
||||
@@ -5080,7 +5082,7 @@ do
|
||||
assert(evo.set(e, f1, 11))
|
||||
assert(evo.clear(e) and evo.clear(e))
|
||||
assert(evo.destroy(e) and evo.destroy(e))
|
||||
assert(not evo.clear(e))
|
||||
assert(evo.clear(e))
|
||||
end
|
||||
|
||||
do
|
||||
|
||||
+3
-3
@@ -3908,7 +3908,7 @@ function evolved.remove(entity, ...)
|
||||
local entity_index = entity % 0x100000
|
||||
|
||||
if __freelist_ids[entity_index] ~= entity then
|
||||
return false, false
|
||||
return true, false
|
||||
end
|
||||
|
||||
local entity_chunks = __entity_chunks
|
||||
@@ -4007,7 +4007,7 @@ function evolved.clear(entity)
|
||||
local entity_index = entity % 0x100000
|
||||
|
||||
if __freelist_ids[entity_index] ~= entity then
|
||||
return false, false
|
||||
return true, false
|
||||
end
|
||||
|
||||
local entity_chunks = __entity_chunks
|
||||
@@ -4533,7 +4533,7 @@ function evolved.multi_remove(entity, fragments)
|
||||
local entity_index = entity % 0x100000
|
||||
|
||||
if __freelist_ids[entity_index] ~= entity then
|
||||
return false, false
|
||||
return true, false
|
||||
end
|
||||
|
||||
local entity_chunks = __entity_chunks
|
||||
|
||||
Reference in New Issue
Block a user