remove limit (#446)

* Update surface.lua

* .

* .
This commit is contained in:
2026-06-28 21:53:43 +01:00
committed by GitHub
parent 4fe0e9c0a6
commit c4f9c97130
3 changed files with 0 additions and 14 deletions
@@ -28,14 +28,8 @@ commands.lawnmower = Commands.new("lawnmower", { "exp-commands_lawnmower.descrip
SelectArea:on_selection(function(event)
local player = assert(game.get_player(event.player_index))
local area = AABB.expand(event.area)
local area_size = AABB.size(area)
local surface = event.surface
if area_size > 1000 then
player.print({ "exp-commands_lawnmower.area-too-large", 1000, area_size }, Commands.print_settings.error)
return
end
local entities = surface.find_entities_filtered{ area = area, type = "corpse" }
for _, entity in pairs(entities) do
if (entity.name ~= "transport-caution-corpse" and entity.name ~= "invisible-transport-caution-corpse") then
-6
View File
@@ -75,14 +75,8 @@ commands.clear_blueprints = Commands.new("clear-blueprints", { "exp-commands_sur
SelectArea:on_selection(function(event)
local player = assert(game.get_player(event.player_index))
local area = AABB.expand(event.area)
local area_size = AABB.size(area)
local surface = event.surface
if area_size > 1000 then
player.print({ "exp-commands_surface.area-too-large", 1000, area_size }, Commands.print_settings.error)
return
end
local entities = surface.find_entities_filtered{ type = "entity-ghost", area = area }
for _, entity in ipairs(entities) do
entity.destroy()