From fd047c7868eaac843e677d09200ff6fb092be943 Mon Sep 17 00:00:00 2001 From: Jayefuu Date: Wed, 25 Nov 2020 21:35:16 +0000 Subject: [PATCH] Update commands.lua --- map_gen/maps/crash_site/commands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/map_gen/maps/crash_site/commands.lua b/map_gen/maps/crash_site/commands.lua index 93dd3605..f71749d3 100644 --- a/map_gen/maps/crash_site/commands.lua +++ b/map_gen/maps/crash_site/commands.lua @@ -250,7 +250,7 @@ local function strike(args, player) -- Do a simple check to make sure the player isn't trying to grief the base --local enemyEntities = s.find_entities_filtered {position = {xpos, ypos}, radius = radius, force = "enemy"} - local enemyEntities = player.surface.count_entities_filtered {position = {xpos,ypos}, radius=radius+30, force = "enemy"} + local enemyEntities = player.surface.count_entities_filtered {position = {xpos,ypos}, radius=radius+30, force = "enemy", limit=1} if enemyEntities < 1 then player.print({'command_description.crash_site_airstrike_friendly_fire_error'}, Color.fail) Utils.print_admins(player.name .. " tried to airstrike the base here: [gps=" .. xpos .. "," .. ypos ..",redmew]", nil)