1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-03-17 20:58:13 +02:00

fix for entities on other surfaces

This commit is contained in:
MewMew 2019-11-23 11:21:37 +01:00
parent 6a606b88f8
commit d920970921

View File

@ -40,6 +40,11 @@ end
local function add_entity(entity)
local wave_defense_table = WD.get_table()
--skip entities that are on another surface
if entity.surface.index ~= wave_defense_table.surface_index then return end
--add entity to the side target list
table.insert(wave_defense_table.side_targets, entity)
wave_defense_table.side_target_count = wave_defense_table.side_target_count + 1
end