1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

Update commands.lua

This commit is contained in:
Jayefuu 2020-11-25 21:35:16 +00:00
parent 4cee264d63
commit fd047c7868

View File

@ -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)