[0.15.12] Find_entities_filtered does not find fire or smoke
Posted: Sat May 20, 2017 5:59 am
This code will return fire and smoke entities when they are within the search area
This code does not return fire or smoke elements.
Adding the type="fire" does not change the results.
Expected result:
find_entities_filtered should be able to find fire and smoke elements.
Code: Select all
local pos = entity.position
local size = 5
local area = {{pos.x -size, pos.y-size},{pos.x +size, pos.y+size}}
local flames = entity.surface.find_entities(area)
for _, f in pairs(flames) do
log(f.type)
end
Code: Select all
local flames = surface.find_entities_filtered{position = entity.position, area = {{-5,-5}, {5,5}}}
for _, f in pairs(flames) do
log(f.type)
end
Expected result:
find_entities_filtered should be able to find fire and smoke elements.