1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-18 03:21:47 +02:00

Update commands.lua

Added suggested text fixes and cleared up lua check failures.
This commit is contained in:
Jayefuu 2020-10-10 13:07:22 +01:00 committed by GitHub
parent c674c1b5e5
commit 166186c11b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ local static_entities_to_check = {
'small-worm-turret', 'medium-worm-turret','big-worm-turret', 'behemoth-worm-turret',
'gun-turret', 'laser-turret', 'artillery-turret', 'flamethrower-turret'
}
local biter_entities_to_check = {
'small-spitter', 'medium-spitter', 'big-spitter', 'behemoth-spitter',
'small-biter', 'medium-biter', 'big-biter', 'behemoth-biter'
@ -70,7 +70,7 @@ local function map_cleared(player)
for i = 1, #static_entities_to_check do
local name = static_entities_to_check[i]
if get_entity_count(name) > 0 then
player.print('All enemy spawners, worms, buildings, biters and spitters must be cleared for non-admin restart.')
player.print('All enemy spawners, worms, buildings, biters and spitters must be cleared before crashsite can be restarted.')
return false
end
end
@ -78,13 +78,13 @@ local function map_cleared(player)
-- Count all the remaining biters and spitters
local biter_total = 0;
for i = 1, #biter_entities_to_check do
local name = biter_entities_to_check[i]
local name = biter_entities_to_check[i]
biter_total = biter_total + get_entity_count(name)
end
-- Return false if more than 20 left. Players have had problems finding the last few biters so set to a reasonable value.
if biter_total > 20 then
player.print('All enemy spawners, worms, buildings are dead. Crashsite can be restarted when more biters are killed.')
player.print('All enemy spawners, worms, buildings are dead. Crashsite can be restarted when all biters and spitters are killed.')
return false
end
return true