Update lawnmower.lua (#275)

This commit is contained in:
2024-01-31 08:07:31 +09:00
committed by GitHub
parent d1eb104f4d
commit f3edf43bbd

View File

@@ -13,10 +13,12 @@ Commands.new_command('lawnmower', 'Clean up biter corpse, decoratives and nuclea
player.surface.destroy_decoratives({position=player.position, radius=range}) player.surface.destroy_decoratives({position=player.position, radius=range})
local entities = player.surface.find_entities_filtered{position=player.position, radius=range, type='corpse', name={'transport-caution-corpse', 'invisible-transport-caution-corpse'}} local entities = player.surface.find_entities_filtered{position=player.position, radius=range, type='corpse'}
for _, entity in pairs(entities) do for _, entity in pairs(entities) do
entity.destroy() if not (entity.name == 'transport-caution-corpse') and not (entity.name == 'invisible-transport-caution-corpse') then
entity.destroy()
end
end end
local tiles = player.surface.find_tiles_filtered{position=player.position, radius=range, name={'nuclear-ground'}} local tiles = player.surface.find_tiles_filtered{position=player.position, radius=range, name={'nuclear-ground'}}