Update OpsGroup.lua

This commit is contained in:
Frank 2021-01-15 23:42:30 +01:00
parent 8f56299380
commit 209b7a64ed

View File

@ -2327,7 +2327,7 @@ function OPSGROUP:onafterTaskDone(From, Event, To, Task)
-- Debug message.
local text=string.format("Task done: %s ID=%d", Task.description, Task.id)
self:I(self.lid..text)
self:T(self.lid..text)
-- No current task.
if Task.id==self.taskcurrent then
@ -2647,7 +2647,7 @@ function OPSGROUP:onafterPauseMission(From, Event, To)
local Task=Mission:GetGroupWaypointTask(self)
-- Debug message.
self:I(self.lid..string.format("Pausing current mission %s. Task=%s", tostring(Mission.name), tostring(Task and Task.description or "WTF")))
self:T(self.lid..string.format("Pausing current mission %s. Task=%s", tostring(Mission.name), tostring(Task and Task.description or "WTF")))
-- Cancelling the mission is actually cancelling the current task.
self:TaskCancel(Task)
@ -2666,7 +2666,8 @@ end
-- @param #string To To state.
function OPSGROUP:onafterUnpauseMission(From, Event, To)
self:I(self.lid..string.format("Unpausing mission"))
-- Debug info.
self:T(self.lid..string.format("Unpausing mission"))
if self.missionpaused then
@ -4796,6 +4797,8 @@ function OPSGROUP:SwitchAlarmstate(alarmstate)
if self:IsAlive() or self:IsInUtero() then
if self.isArmygroup or self.isNavygroup then
self.option.Alarm=alarmstate or self.optionDefault.Alarm
if self:IsInUtero() then
@ -4817,6 +4820,8 @@ function OPSGROUP:SwitchAlarmstate(alarmstate)
self:T(self.lid..string.format("Setting current Alarm State=%d (0=Auto, 1=Green, 2=Red)", self.option.Alarm))
end
end
else
self:E(self.lid.."WARNING: Cannot switch Alarm State! Group is not alive.")
end