1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-22 03:38:48 +02:00

planet_prison fixes

This commit is contained in:
Gerkiz 2021-03-30 16:11:39 +02:00
parent bbb5b4f5e2
commit 61462ddd80
2 changed files with 6 additions and 4 deletions

View File

@ -669,7 +669,7 @@ local function print_merchant_position(player)
perks = assign_perks(player)
end
if perks and perks.minimap then
player.print(string.format('>> You received a broadcast with [gps=%d,%d,%d] coordinates', position.x, position.y, player.surface))
player.print(string.format('>> You received a broadcast with [gps=%d,%d,%d] coordinates', position.x, position.y, player.surface.name))
else
player.print(string.format('>> You were able to spot him %s from your location', CommonFunctions.get_readable_direction(player.position, position)))
end

View File

@ -181,9 +181,11 @@ Public.clear_player_base = function(player)
for i = 1, #entities do
local e = entities[i]
if e and e.valid then
e.health = e.health - random(30, 180)
if e.health <= 0 then
e.die('enemy')
if e.health then
e.health = e.health - random(30, 180)
if e.health <= 0 then
e.die('enemy')
end
end
end
end