Don't attempt to send message from a nonexistant ship

master
WKFO 2020-12-29 22:44:32 +03:00 committed by Webster Sheets
parent 8c33211cfc
commit 3c6df8947e
1 changed files with 5 additions and 3 deletions

View File

@ -62,7 +62,7 @@ end
local onJettison = function (ship, cargo)
if Game.system.name ~= "Rondel" then return end
if not jetissionedCargo then
if not jetissionedCargo and #patrol > 1 then
Comms.ImportantMessage(l_rondel.JETTISON_DEFENSIVE_PRECAUTION, patrol[1].label)
jetissionedCargo = true
end
@ -96,8 +96,10 @@ local onEnterSystem = function (player)
end)
Timer:CallAt(Game.time + 600*tolerance, function()
attackShip(player)
Comms.ImportantMessage(l_rondel.HOSTILE_ACTION_REPORTED, ship.label)
if #patrol > 1 then
attackShip(player)
Comms.ImportantMessage(l_rondel.HOSTILE_ACTION_REPORTED, ship.label)
end
end)
end