mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
OPS - making a couple of modules much less noisy as the logs on a large mission get rather big
This commit is contained in:
@@ -877,16 +877,16 @@ end
|
||||
-- @param #number Formation Formation of the group.
|
||||
function ARMYGROUP:onbeforeUpdateRoute(From, Event, To, n, N, Speed, Formation)
|
||||
if self:IsWaiting() then
|
||||
self:E(self.lid.."Update route denied. Group is WAIRING!")
|
||||
self:T(self.lid.."Update route denied. Group is WAIRING!")
|
||||
return false
|
||||
elseif self:IsInUtero() then
|
||||
self:E(self.lid.."Update route denied. Group is INUTERO!")
|
||||
self:T(self.lid.."Update route denied. Group is INUTERO!")
|
||||
return false
|
||||
elseif self:IsDead() then
|
||||
self:E(self.lid.."Update route denied. Group is DEAD!")
|
||||
self:T(self.lid.."Update route denied. Group is DEAD!")
|
||||
return false
|
||||
elseif self:IsStopped() then
|
||||
self:E(self.lid.."Update route denied. Group is STOPPED!")
|
||||
self:T(self.lid.."Update route denied. Group is STOPPED!")
|
||||
return false
|
||||
elseif self:IsHolding() then
|
||||
self:T(self.lid.."Update route denied. Group is holding position!")
|
||||
@@ -1030,7 +1030,7 @@ function ARMYGROUP:onafterUpdateRoute(From, Event, To, n, N, Speed, Formation)
|
||||
-- Passed final WP ==> Full Stop
|
||||
---
|
||||
|
||||
self:E(self.lid..string.format("WARNING: Passed final WP when UpdateRoute() ==> Full Stop!"))
|
||||
self:T(self.lid..string.format("WARNING: Passed final WP when UpdateRoute() ==> Full Stop!"))
|
||||
self:FullStop()
|
||||
|
||||
end
|
||||
@@ -1249,7 +1249,7 @@ function ARMYGROUP:onafterRTZ(From, Event, To, Zone, Formation)
|
||||
end
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: No RTZ zone given!")
|
||||
self:T(self.lid.."ERROR: No RTZ zone given!")
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1385,7 +1385,7 @@ function ARMYGROUP:onbeforeEngageTarget(From, Event, To, Target)
|
||||
local ammo=self:GetAmmoTot()
|
||||
|
||||
if ammo.Total==0 then
|
||||
self:E(self.lid.."WARNING: Cannot engage TARGET because no ammo left!")
|
||||
self:T(self.lid.."WARNING: Cannot engage TARGET because no ammo left!")
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -1683,7 +1683,7 @@ function ARMYGROUP:_InitGroup(Template)
|
||||
|
||||
-- Quick check.
|
||||
if #units~=size0 then
|
||||
self:E(self.lid..string.format("ERROR: Got #units=%d but group consists of %d units!", #units, size0))
|
||||
self:T(self.lid..string.format("ERROR: Got #units=%d but group consists of %d units!", #units, size0))
|
||||
end
|
||||
|
||||
-- Add elemets.
|
||||
@@ -1713,7 +1713,7 @@ function ARMYGROUP:SwitchFormation(Formation, Permanently, NoRouteUpdate)
|
||||
|
||||
if self:IsAlive() or self:IsInUtero() then
|
||||
|
||||
Formation=Formation or self.optionDefault.Formation
|
||||
Formation=Formation or (self.optionDefault.Formation or "Off road")
|
||||
Permanently = Permanently or false
|
||||
|
||||
if Permanently then
|
||||
@@ -1723,7 +1723,7 @@ function ARMYGROUP:SwitchFormation(Formation, Permanently, NoRouteUpdate)
|
||||
end
|
||||
|
||||
-- Set current formation.
|
||||
self.option.Formation=Formation
|
||||
self.option.Formation=Formation or "Off road"
|
||||
|
||||
if self:IsInUtero() then
|
||||
self:T(self.lid..string.format("Will switch formation to %s (permanently=%s) when group is spawned", self.option.Formation, tostring(Permanently)))
|
||||
|
||||
Reference in New Issue
Block a user