add entities.get_all(...), .get_all_in_box(...), .get_all_in_radius(...)
This commit is contained in:
@@ -307,6 +307,17 @@ end
|
||||
|
||||
stdcomp = require "core:internal/stdcomp"
|
||||
entities.get = stdcomp.get_Entity
|
||||
entities.get_all = function(uids)
|
||||
if uids == nil then
|
||||
local values = {}
|
||||
for k,v in pairs(stdcomp.get_all()) do
|
||||
values[k] = v
|
||||
end
|
||||
return values
|
||||
else
|
||||
return stdcomp.get_all(uids)
|
||||
end
|
||||
end
|
||||
|
||||
math.randomseed(time.uptime()*1536227939)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user