diff --git a/maps/planet_prison.lua b/maps/planet_prison.lua index 1b07cd08..2e071c23 100644 --- a/maps/planet_prison.lua +++ b/maps/planet_prison.lua @@ -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 diff --git a/maps/planet_prison/mod/claims.lua b/maps/planet_prison/mod/claims.lua index 42763553..97cef628 100644 --- a/maps/planet_prison/mod/claims.lua +++ b/maps/planet_prison/mod/claims.lua @@ -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