Merge pull request #744 from 132nd-etcher/RAT_trace

RAT Trace
This commit is contained in:
Sven Van de Velde 2017-11-30 12:29:15 +01:00 committed by GitHub
commit c81e9e5a5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -515,17 +515,17 @@ RAT.version="2.0.2"
-- @usage yak2:RAT("RAT_YAK", "Yak2") will create a RAT object "yak2". The template group in the mission editor must have the name "RAT_YAK" but the group will be called "Yak2" in e.g. the F10 menu. -- @usage yak2:RAT("RAT_YAK", "Yak2") will create a RAT object "yak2". The template group in the mission editor must have the name "RAT_YAK" but the group will be called "Yak2" in e.g. the F10 menu.
function RAT:New(groupname, alias) function RAT:New(groupname, alias)
-- Inherit SPAWN class.
local self=BASE:Inherit(self, SPAWN:NewWithAlias(groupname, alias)) -- #RAT
-- Version info. -- Version info.
env.info(RAT.id.."Version "..RAT.version) self:F(RAT.id.."Version "..RAT.version)
-- Welcome message. -- Welcome message.
env.info(RAT.id.."Creating new RAT object from template: "..groupname) self:F(RAT.id.."Creating new RAT object from template: "..groupname)
-- Set alias. -- Set alias.
alias=alias or groupname alias=alias or groupname
-- Inherit SPAWN class.
local self=BASE:Inherit(self, SPAWN:NewWithAlias(groupname, alias)) -- #RAT
-- Alias of groupname. -- Alias of groupname.
self.alias=alias self.alias=alias
@ -535,7 +535,7 @@ function RAT:New(groupname, alias)
-- Check the group actually exists. -- Check the group actually exists.
if DCSgroup==nil then if DCSgroup==nil then
env.error(RAT.id.."Group with name "..groupname.." does not exist in the mission editor!") self:E(RAT.id.."ERROR: Group with name "..groupname.." does not exist in the mission editor!")
return nil return nil
end end
@ -564,7 +564,7 @@ function RAT:Spawn(naircraft)
-- Make sure that this function is only been called once per RAT object. -- Make sure that this function is only been called once per RAT object.
if self.spawninitialized==true then if self.spawninitialized==true then
env.error("Spawn function should only be called once per RAT object! Exiting and returning nil.") self:E("ERROR: Spawn function should only be called once per RAT object! Exiting and returning nil.")
return nil return nil
else else
self.spawninitialized=true self.spawninitialized=true
@ -686,7 +686,7 @@ function RAT:Spawn(naircraft)
end end
end end
text=text..string.format("******************************************************\n") text=text..string.format("******************************************************\n")
env.info(RAT.id..text) self:T(RAT.id..text)
-- Create submenus. -- Create submenus.
if self.f10menu then if self.f10menu then
@ -744,13 +744,13 @@ function RAT:_CheckConsistency()
-- Only zones but not takeoff air == > Enable takeoff air. -- Only zones but not takeoff air == > Enable takeoff air.
if self.Ndeparture_Zones>0 and self.takeoff~=RAT.wp.air then if self.Ndeparture_Zones>0 and self.takeoff~=RAT.wp.air then
self.takeoff=RAT.wp.air self.takeoff=RAT.wp.air
env.error(RAT.id.."At least one zone defined as departure and takeoff is NOT set to air. Enabling air start!") self:E(RAT.id.."ERROR: At least one zone defined as departure and takeoff is NOT set to air. Enabling air start!")
end end
-- No airport and no zone specified. -- No airport and no zone specified.
if self.Ndeparture_Airports==0 and self.Ndeparture_Zone==0 then if self.Ndeparture_Airports==0 and self.Ndeparture_Zone==0 then
self.random_departure=true self.random_departure=true
local text="No airports or zones found given in SetDeparture(). Enabling random departure airports!" local text="No airports or zones found given in SetDeparture(). Enabling random departure airports!"
env.error(RAT.id..text) self:E(RAT.id.."ERROR: "..text)
MESSAGE:New(text, 30):ToAll() MESSAGE:New(text, 30):ToAll()
end end
end end
@ -772,20 +772,20 @@ function RAT:_CheckConsistency()
if self.Ndestination_Zones>0 and self.landing~=RAT.wp.air and not self.returnzone then if self.Ndestination_Zones>0 and self.landing~=RAT.wp.air and not self.returnzone then
self.landing=RAT.wp.air self.landing=RAT.wp.air
self.destinationzone=true self.destinationzone=true
env.error(RAT.id.."At least one zone defined as destination and landing is NOT set to air. Enabling destination zone!") self:E(RAT.id.."ERROR: At least one zone defined as destination and landing is NOT set to air. Enabling destination zone!")
end end
-- No specified airport and no zone found at all. -- No specified airport and no zone found at all.
if self.Ndestination_Airports==0 and self.Ndestination_Zones==0 then if self.Ndestination_Airports==0 and self.Ndestination_Zones==0 then
self.random_destination=true self.random_destination=true
local text="No airports or zones found given in SetDestination(). Enabling random destination airports!" local text="No airports or zones found given in SetDestination(). Enabling random destination airports!"
env.error(RAT.id..text) self:E(RAT.id.."ERROR: "..text)
MESSAGE:New(text, 30):ToAll() MESSAGE:New(text, 30):ToAll()
end end
end end
-- Destination zone and return zone should not be used together. -- Destination zone and return zone should not be used together.
if self.destinationzone and self.returnzone then if self.destinationzone and self.returnzone then
env.error(RAT.id.."Destination zone _and_ return to zone not possible! Disabling return to zone.") self:E(RAT.id.."ERROR: Destination zone _and_ return to zone not possible! Disabling return to zone.")
self.returnzone=false self.returnzone=false
end end
-- If returning to a zone, we set the landing type to "air" if takeoff is in air. -- If returning to a zone, we set the landing type to "air" if takeoff is in air.
@ -921,7 +921,7 @@ function RAT:SetDeparture(departurenames)
names={departurenames} names={departurenames}
else else
-- error message -- error message
env.error(RAT.id.."Input parameter must be a string or a table in SetDeparture()!") self:E(RAT.id.."ERROR: Input parameter must be a string or a table in SetDeparture()!")
end end
-- Put names into arrays. -- Put names into arrays.
@ -934,7 +934,7 @@ function RAT:SetDeparture(departurenames)
-- If it is not an airport, we assume it is a zone. -- If it is not an airport, we assume it is a zone.
table.insert(self.departure_ports, name) table.insert(self.departure_ports, name)
else else
env.error(RAT.id.."ERROR! No departure airport or zone found with name "..name) self:E(RAT.id.."ERROR: No departure airport or zone found with name "..name)
end end
end end
@ -958,7 +958,7 @@ function RAT:SetDestination(destinationnames)
names={destinationnames} names={destinationnames}
else else
-- Error message. -- Error message.
env.error(RAT.id.."Input parameter must be a string or a table in SetDestination()!") self:E(RAT.id.."ERROR: Input parameter must be a string or a table in SetDestination()!")
end end
-- Put names into arrays. -- Put names into arrays.
@ -971,7 +971,7 @@ function RAT:SetDestination(destinationnames)
-- If it is not an airport, we assume it is a zone. -- If it is not an airport, we assume it is a zone.
table.insert(self.destination_ports, name) table.insert(self.destination_ports, name)
else else
env.error(RAT.id.."ERROR! No destination airport or zone found with name "..name) self:E(RAT.id.."ERROR: No destination airport or zone found with name "..name)
end end
end end
@ -1135,7 +1135,7 @@ end
-- @param #string id Parking ID of the aircraft. -- @param #string id Parking ID of the aircraft.
function RAT:SetParkingID(id) function RAT:SetParkingID(id)
self.parking_id=id self.parking_id=id
env.info(RAT.id.."Setting parking ID to "..self.parking_id) self:T(RAT.id.."Setting parking ID to "..self.parking_id)
end end
--- Enable Radio. Overrules the ME setting. --- Enable Radio. Overrules the ME setting.
@ -1403,7 +1403,7 @@ function RAT:_InitAircraft(DCSgroup)
self.category=RAT.cat.heli self.category=RAT.cat.heli
else else
self.category="other" self.category="other"
env.error(RAT.id.."Group of RAT is neither airplane nor helicopter!") self:E(RAT.id.."ERROR: Group of RAT is neither airplane nor helicopter!")
end end
-- Get type of aircraft. -- Get type of aircraft.
@ -1441,7 +1441,7 @@ function RAT:_InitAircraft(DCSgroup)
text=text..string.format("Eff range = %6.1f km (with 95 percent initial fuel amount)\n", self.aircraft.Reff/1000) text=text..string.format("Eff range = %6.1f km (with 95 percent initial fuel amount)\n", self.aircraft.Reff/1000)
text=text..string.format("Ceiling = %6.1f km = FL%3.0f\n", self.aircraft.ceiling/1000, self.aircraft.ceiling/RAT.unit.FL2m) text=text..string.format("Ceiling = %6.1f km = FL%3.0f\n", self.aircraft.ceiling/1000, self.aircraft.ceiling/RAT.unit.FL2m)
text=text..string.format("******************************************************\n") text=text..string.format("******************************************************\n")
env.info(RAT.id..text) self:T(RAT.id..text)
end end
@ -1493,7 +1493,7 @@ function RAT:_SpawnWithRoute(_departure, _destination, _takeoff, _landing, _live
-- Choose random livery. -- Choose random livery.
livery=self.livery[math.random(#self.livery)] livery=self.livery[math.random(#self.livery)]
local text=string.format("Chosen livery for group %s: %s", self:_AnticipatedGroupName(), livery) local text=string.format("Chosen livery for group %s: %s", self:_AnticipatedGroupName(), livery)
env.info(RAT.id..text) self:T(RAT.id..text)
else else
livery=nil livery=nil
end end
@ -1603,7 +1603,7 @@ end
function RAT:ClearForLanding(name) function RAT:ClearForLanding(name)
trigger.action.setUserFlag(name, 1) trigger.action.setUserFlag(name, 1)
local flagvalue=trigger.misc.getUserFlag(name) local flagvalue=trigger.misc.getUserFlag(name)
env.info(RAT.id.."ATC: User flag value (landing) for "..name.." set to "..flagvalue) self:T(RAT.id.."ATC: User flag value (landing) for "..name.." set to "..flagvalue)
end end
--- Respawn a group. --- Respawn a group.
@ -1722,8 +1722,9 @@ function RAT:_Respawn(group)
end end
if self.Debug then if self.Debug then
env.info(RAT.id..string.format("self.takeoff, takeoff, _takeoff = %s, %s, %s", tostring(self.takeoff), tostring(takeoff), tostring(_takeoff))) text=string.format("self.takeoff, takeoff, _takeoff = %s, %s, %s", tostring(self.takeoff), tostring(takeoff), tostring(_takeoff))
env.info(RAT.id..string.format("self.landing, landing, _landing = %s, %s, %s", tostring(self.landing), tostring(landing), tostring(_landing))) text=text.."\n"..string.format("self.landing, landing, _landing = %s, %s, %s", tostring(self.landing), tostring(landing), tostring(_landing))
self:T(RAT.id..text)
end end
-- Spawn new group. -- Spawn new group.
@ -1806,7 +1807,7 @@ function RAT:_SetRoute(takeoff, landing, _departure, _destination, _waypoint)
departure=ZONE:New(_departure) departure=ZONE:New(_departure)
else else
local text=string.format("ERROR: Specified departure airport %s does not exist for %s!", _departure, self.alias) local text=string.format("ERROR: Specified departure airport %s does not exist for %s!", _departure, self.alias)
env.error(RAT.id..text) self:E(RAT.id.."ERROR: "..text)
end end
else else
@ -1817,7 +1818,7 @@ function RAT:_SetRoute(takeoff, landing, _departure, _destination, _waypoint)
if not departure then if not departure then
local text=string.format("No valid departure airport could be found for %s.", self.alias) local text=string.format("No valid departure airport could be found for %s.", self.alias)
MESSAGE:New(text, 60):ToAll() MESSAGE:New(text, 60):ToAll()
env.error(RAT.id..text) self:E(RAT.id.."ERROR: "..text)
return nil return nil
end end
@ -1884,7 +1885,7 @@ function RAT:_SetRoute(takeoff, landing, _departure, _destination, _waypoint)
mindist=math.max(self.mindist, mindist) mindist=math.max(self.mindist, mindist)
local text=string.format("Adjusting min distance to %d km (for given min FL%03d)", mindist/1000, self.FLminuser/RAT.unit.FL2m) local text=string.format("Adjusting min distance to %d km (for given min FL%03d)", mindist/1000, self.FLminuser/RAT.unit.FL2m)
env.info(RAT.id..text) self:T(RAT.id..text)
end end
-- DESTINATION AIRPORT -- DESTINATION AIRPORT
@ -1902,7 +1903,7 @@ function RAT:_SetRoute(takeoff, landing, _departure, _destination, _waypoint)
destination=ZONE:New(_destination) destination=ZONE:New(_destination)
else else
local text=string.format("ERROR: Specified destination airport/zone %s does not exist for %s!", _destination, self.alias) local text=string.format("ERROR: Specified destination airport/zone %s does not exist for %s!", _destination, self.alias)
env.error(RAT.id..text) self:E(RAT.id.."ERROR: "..text)
end end
else else
@ -1931,7 +1932,7 @@ function RAT:_SetRoute(takeoff, landing, _departure, _destination, _waypoint)
if not destination then if not destination then
local text=string.format("No valid destination airport could be found for %s!", self.alias) local text=string.format("No valid destination airport could be found for %s!", self.alias)
MESSAGE:New(text, 60):ToAll() MESSAGE:New(text, 60):ToAll()
env.error(RAT.id..text) self:E(RAT.id.."ERROR: "..text)
return nil return nil
end end
@ -1939,7 +1940,7 @@ function RAT:_SetRoute(takeoff, landing, _departure, _destination, _waypoint)
if destination:GetName()==departure:GetName() then if destination:GetName()==departure:GetName() then
local text=string.format("%s: Destination and departure are identical. Airport/zone %s.", self.alias, destination:GetName()) local text=string.format("%s: Destination and departure are identical. Airport/zone %s.", self.alias, destination:GetName())
MESSAGE:New(text, 30):ToAll() MESSAGE:New(text, 30):ToAll()
env.error(RAT.id..text) self:E(RAT.id.."ERROR: "..text)
end end
-- Get a random point inside zone return zone. -- Get a random point inside zone return zone.
@ -2201,7 +2202,7 @@ function RAT:_SetRoute(takeoff, landing, _departure, _destination, _waypoint)
text=text..string.format("h_descent_max = %6.1f m\n", h_descent_max) text=text..string.format("h_descent_max = %6.1f m\n", h_descent_max)
end end
text=text..string.format("******************************************************\n") text=text..string.format("******************************************************\n")
env.info(RAT.id..text) self:T(RAT.id..text)
-- Ensure that cruise distance is positve. Can be slightly negative in special cases. And we don't want to turn back. -- Ensure that cruise distance is positve. Can be slightly negative in special cases. And we don't want to turn back.
if d_cruise<0 then if d_cruise<0 then
@ -2387,10 +2388,10 @@ function RAT:_PickDeparture(takeoff)
if takeoff==RAT.wp.air then if takeoff==RAT.wp.air then
dep=ZONE:New(name) dep=ZONE:New(name)
else else
env.error(RAT.id.."Takeoff is not in air. Cannot use "..name.." as departure!") self:E(RAT.id.."ERROR: Takeoff is not in air. Cannot use "..name.." as departure!")
end end
else else
env.error(RAT.id.."No airport or zone found with name "..name) self:E(RAT.id.."ERROR: No airport or zone found with name "..name)
end end
-- Add to departures table. -- Add to departures table.
@ -2403,7 +2404,7 @@ function RAT:_PickDeparture(takeoff)
end end
-- Info message. -- Info message.
env.info(RAT.id.."Number of possible departures = "..#departures) self:T(RAT.id.."Number of possible departures = "..#departures)
-- Select departure airport or zone. -- Select departure airport or zone.
local departure=departures[math.random(#departures)] local departure=departures[math.random(#departures)]
@ -2415,12 +2416,12 @@ function RAT:_PickDeparture(takeoff)
else else
text="Chosen departure airport: "..departure:GetName().." (ID "..departure:GetID()..")" text="Chosen departure airport: "..departure:GetName().." (ID "..departure:GetID()..")"
end end
env.info(RAT.id..text) self:T(RAT.id..text)
if self.Debug then if self.Debug then
MESSAGE:New(text, 30):ToAll() MESSAGE:New(text, 30):ToAll()
end end
else else
env.error(RAT.id.."No departure airport or zone found.") self:E(RAT.id.."ERROR: No departure airport or zone found.")
departure=nil departure=nil
end end
@ -2485,10 +2486,10 @@ function RAT:_PickDestination(departure, q, minrange, maxrange, random, landing)
if landing==RAT.wp.air then if landing==RAT.wp.air then
dest=ZONE:New(name) dest=ZONE:New(name)
else else
env.error(RAT.id.."Landing is not in air. Cannot use zone "..name.." as destination!") self:E(RAT.id.."ERROR: Landing is not in air. Cannot use zone "..name.." as destination!")
end end
else else
env.error(RAT.id.."No airport or zone found with name "..name) self:E(RAT.id.."ERROR: No airport or zone found with name "..name)
end end
if dest then if dest then
@ -2500,7 +2501,7 @@ function RAT:_PickDestination(departure, q, minrange, maxrange, random, landing)
table.insert(destinations, dest) table.insert(destinations, dest)
else else
local text=string.format("Destination %s is ouside range. Distance = %5.1f km, min = %5.1f km, max = %5.1f km.", name, distance, minrange, maxrange) local text=string.format("Destination %s is ouside range. Distance = %5.1f km, min = %5.1f km, max = %5.1f km.", name, distance, minrange, maxrange)
env.info(RAT.id..text) self:T(RAT.id..text)
end end
end end
@ -2509,7 +2510,7 @@ function RAT:_PickDestination(departure, q, minrange, maxrange, random, landing)
end end
-- Info message. -- Info message.
env.info(RAT.id.."Number of possible destinations = "..#destinations) self:T(RAT.id.."Number of possible destinations = "..#destinations)
if #destinations > 0 then if #destinations > 0 then
--- Compare distance of destination airports. --- Compare distance of destination airports.
@ -2541,13 +2542,13 @@ function RAT:_PickDestination(departure, q, minrange, maxrange, random, landing)
else else
text=string.format("Chosen destination airport: %s (ID %d).", destination:GetName(), destination:GetID()) text=string.format("Chosen destination airport: %s (ID %d).", destination:GetName(), destination:GetID())
end end
env.info(RAT.id..text) self:T(RAT.id..text)
if self.Debug then if self.Debug then
MESSAGE:New(text, 30):ToAll() MESSAGE:New(text, 30):ToAll()
end end
else else
env.error(RAT.id.."No destination airport or zone found.") self:E(RAT.id.."ERROR: No destination airport or zone found.")
destination=nil destination=nil
end end
@ -2635,8 +2636,8 @@ function RAT:_GetAirportsOfMap()
if self.Debug then if self.Debug then
local text1="MOOSE: Airport ID = ".._myab:GetID().." and Name = ".._myab:GetName()..", Category = ".._myab:GetCategory()..", TypeName = ".._myab:GetTypeName() local text1="MOOSE: Airport ID = ".._myab:GetID().." and Name = ".._myab:GetName()..", Category = ".._myab:GetCategory()..", TypeName = ".._myab:GetTypeName()
--local text2="DCS : Airport ID = "..airbase:getID().." and Name = "..airbase:getName()..", Category = "..airbase:getCategory()..", TypeName = "..airbase:getTypeName() --local text2="DCS : Airport ID = "..airbase:getID().." and Name = "..airbase:getName()..", Category = "..airbase:getCategory()..", TypeName = "..airbase:getTypeName()
env.info(RAT.id..text1) self:T(RAT.id..text1)
--env.info(RAT.id..text2) --self:T(RAT.id..text2)
end end
end end
@ -2664,7 +2665,7 @@ function RAT:_GetAirportsOfCoalition()
if #self.airports==0 then if #self.airports==0 then
local text="No possible departure/destination airports found!" local text="No possible departure/destination airports found!"
MESSAGE:New(text, 60):ToAll() MESSAGE:New(text, 60):ToAll()
env.error(RAT.id..text) self:E(RAT.id.."ERROR: "..text)
end end
end end
@ -2795,7 +2796,7 @@ function RAT:Status(message, forID)
text=text..string.format("Position change = %8.1f m since %3.0f seconds.", Dg, dTlast) text=text..string.format("Position change = %8.1f m since %3.0f seconds.", Dg, dTlast)
end end
if self.Debug then if self.Debug then
env.info(RAT.id..text) self:T(RAT.id..text)
end end
if message then if message then
MESSAGE:New(text, 20):ToAll() MESSAGE:New(text, 20):ToAll()
@ -2808,7 +2809,7 @@ function RAT:Status(message, forID)
-- Despawn unit if it did not move more then 50 m in the last 180 seconds. -- Despawn unit if it did not move more then 50 m in the last 180 seconds.
if stationary then if stationary then
local text=string.format("Group %s is despawned after being %4.0f seconds inaktive on ground.", self.alias, dTlast) local text=string.format("Group %s is despawned after being %4.0f seconds inaktive on ground.", self.alias, dTlast)
env.info(RAT.id..text) self:T(RAT.id..text)
self:_Despawn(group) self:_Despawn(group)
end end
-- Despawn group if life is < 10% and distance travelled < 100 m. -- Despawn group if life is < 10% and distance travelled < 100 m.
@ -2820,7 +2821,7 @@ function RAT:Status(message, forID)
if self.ratcraft[i].despawnme then if self.ratcraft[i].despawnme then
local text=string.format("Flight %s will be despawned NOW!", self.alias) local text=string.format("Flight %s will be despawned NOW!", self.alias)
env.info(RAT.id..text) self:T(RAT.id..text)
-- Despawn old group. -- Despawn old group.
self:_Respawn(self.ratcraft[i].group) self:_Respawn(self.ratcraft[i].group)
self:_Despawn(self.ratcraft[i].group) self:_Despawn(self.ratcraft[i].group)
@ -2829,14 +2830,14 @@ function RAT:Status(message, forID)
else else
if self.Debug then if self.Debug then
local text=string.format("Group %i does not exist.", i) local text=string.format("Group %i does not exist.", i)
env.info(RAT.id..text) self:T(RAT.id..text)
end end
end end
end end
if (message and not forID) then if (message and not forID) then
local text=string.format("Alive groups of %s: %d", self.alias, self.alive) local text=string.format("Alive groups of %s: %d", self.alias, self.alive)
env.info(RAT.id..text) self:T(RAT.id..text)
MESSAGE:New(text, 20):ToAll() MESSAGE:New(text, 20):ToAll()
end end
@ -2854,12 +2855,12 @@ function RAT:_GetLife(group)
life=unit:GetLife()/unit:GetLife0()*100 life=unit:GetLife()/unit:GetLife0()*100
else else
if self.Debug then if self.Debug then
env.error(RAT.id.."Unit does not exist in RAT_Getlife(). Returning zero.") self:E(RAT.id.."ERROR: Unit does not exist in RAT_Getlife(). Returning zero.")
end end
end end
else else
if self.Debug then if self.Debug then
env.error(RAT.id.."Group does not exist in RAT_Getlife(). Returning zero.") self:E(RAT.id.."ERROR: Group does not exist in RAT_Getlife(). Returning zero.")
end end
end end
return life return life
@ -2881,7 +2882,7 @@ function RAT:_SetStatus(group, status)
local no3 = status==RAT.status.Holding local no3 = status==RAT.status.Holding
local text=string.format("Flight %s: %s.", group:GetName(), status) local text=string.format("Flight %s: %s.", group:GetName(), status)
env.info(RAT.id..text) self:T(RAT.id..text)
if (not (no1 or no2 or no3)) then if (not (no1 or no2 or no3)) then
MESSAGE:New(text, 10):ToAllIf(self.reportstatus) MESSAGE:New(text, 10):ToAllIf(self.reportstatus)
@ -2908,7 +2909,7 @@ function RAT:_OnBirth(EventData)
if EventPrefix == self.alias then if EventPrefix == self.alias then
local text="Event: Group "..SpawnGroup:GetName().." was born." local text="Event: Group "..SpawnGroup:GetName().." was born."
env.info(RAT.id..text) self:T(RAT.id..text)
-- Set status. -- Set status.
local status local status
@ -2925,7 +2926,7 @@ function RAT:_OnBirth(EventData)
end end
else else
if self.Debug then if self.Debug then
env.error("Group does not exist in RAT:_OnBirthDay().") self:E(RAT.id.."ERROR: Group does not exist in RAT:_OnBirthDay().")
end end
end end
end end
@ -2947,7 +2948,7 @@ function RAT:_EngineStartup(EventData)
if EventPrefix == self.alias then if EventPrefix == self.alias then
local text="Event: Group "..SpawnGroup:GetName().." started engines." local text="Event: Group "..SpawnGroup:GetName().." started engines."
env.info(RAT.id..text) self:T(RAT.id..text)
-- Set status. -- Set status.
local status local status
@ -2964,7 +2965,7 @@ function RAT:_EngineStartup(EventData)
else else
if self.Debug then if self.Debug then
env.error("Group does not exist in RAT:_EngineStartup().") self:E(RAT.id.."ERROR: Group does not exist in RAT:_EngineStartup().")
end end
end end
end end
@ -2986,7 +2987,7 @@ function RAT:_OnTakeoff(EventData)
if EventPrefix == self.alias then if EventPrefix == self.alias then
local text="Event: Group "..SpawnGroup:GetName().." is airborne." local text="Event: Group "..SpawnGroup:GetName().." is airborne."
env.info(RAT.id..text) self:T(RAT.id..text)
-- Set status. -- Set status.
local status=RAT.status.EventTakeoff local status=RAT.status.EventTakeoff
@ -2995,7 +2996,7 @@ function RAT:_OnTakeoff(EventData)
if self.respawn_after_takeoff then if self.respawn_after_takeoff then
text="Event: Group "..SpawnGroup:GetName().." will be respawned." text="Event: Group "..SpawnGroup:GetName().." will be respawned."
env.info(RAT.id..text) self:T(RAT.id..text)
-- Respawn group. -- Respawn group.
self:_Respawn(SpawnGroup) self:_Respawn(SpawnGroup)
@ -3006,7 +3007,7 @@ function RAT:_OnTakeoff(EventData)
else else
if self.Debug then if self.Debug then
env.error("Group does not exist in RAT:_OnTakeoff().") self:E(RAT.id.."ERROR: Group does not exist in RAT:_OnTakeoff().")
end end
end end
end end
@ -3028,7 +3029,7 @@ function RAT:_OnLand(EventData)
if EventPrefix == self.alias then if EventPrefix == self.alias then
local text="Event: Group "..SpawnGroup:GetName().." landed." local text="Event: Group "..SpawnGroup:GetName().." landed."
env.info(RAT.id..text) self:T(RAT.id..text)
-- Set status. -- Set status.
--self:_SetStatus(SpawnGroup, "Taxiing (after landing)") --self:_SetStatus(SpawnGroup, "Taxiing (after landing)")
@ -3042,7 +3043,7 @@ function RAT:_OnLand(EventData)
if self.respawn_at_landing and not self.norespawn then if self.respawn_at_landing and not self.norespawn then
text="Event: Group "..SpawnGroup:GetName().." will be respawned." text="Event: Group "..SpawnGroup:GetName().." will be respawned."
env.info(RAT.id..text) self:T(RAT.id..text)
-- Respawn group. -- Respawn group.
self:_Respawn(SpawnGroup) self:_Respawn(SpawnGroup)
@ -3053,7 +3054,7 @@ function RAT:_OnLand(EventData)
else else
if self.Debug then if self.Debug then
env.error("Group does not exist in RAT:_OnLand().") self:E(RAT.id.."ERROR: Group does not exist in RAT:_OnLand().")
end end
end end
end end
@ -3075,7 +3076,7 @@ function RAT:_OnEngineShutdown(EventData)
if EventPrefix == self.alias then if EventPrefix == self.alias then
local text="Event: Group "..SpawnGroup:GetName().." shut down its engines." local text="Event: Group "..SpawnGroup:GetName().." shut down its engines."
env.info(RAT.id..text) self:T(RAT.id..text)
-- Set status. -- Set status.
--self:_SetStatus(SpawnGroup, "Parking (shutting down engines)") --self:_SetStatus(SpawnGroup, "Parking (shutting down engines)")
@ -3084,7 +3085,7 @@ function RAT:_OnEngineShutdown(EventData)
if not self.respawn_at_landing and not self.norespawn then if not self.respawn_at_landing and not self.norespawn then
text="Event: Group "..SpawnGroup:GetName().." will be respawned." text="Event: Group "..SpawnGroup:GetName().." will be respawned."
env.info(RAT.id..text) self:T(RAT.id..text)
-- Respawn group. -- Respawn group.
self:_Respawn(SpawnGroup) self:_Respawn(SpawnGroup)
@ -3092,7 +3093,7 @@ function RAT:_OnEngineShutdown(EventData)
-- Despawn group. -- Despawn group.
text="Event: Group "..SpawnGroup:GetName().." will be destroyed now." text="Event: Group "..SpawnGroup:GetName().." will be destroyed now."
env.info(RAT.id..text) self:T(RAT.id..text)
self:_Despawn(SpawnGroup) self:_Despawn(SpawnGroup)
end end
@ -3100,7 +3101,7 @@ function RAT:_OnEngineShutdown(EventData)
else else
if self.Debug then if self.Debug then
env.error("Group does not exist in RAT:_OnEngineShutdown().") self:E(RAT.id.."ERROR: Group does not exist in RAT:_OnEngineShutdown().")
end end
end end
end end
@ -3122,7 +3123,7 @@ function RAT:_OnDead(EventData)
if EventPrefix == self.alias then if EventPrefix == self.alias then
local text="Event: Group "..SpawnGroup:GetName().." died." local text="Event: Group "..SpawnGroup:GetName().." died."
env.info(RAT.id..text) self:T(RAT.id..text)
-- Set status. -- Set status.
--self:_SetStatus(SpawnGroup, "Destroyed (after dead)") --self:_SetStatus(SpawnGroup, "Destroyed (after dead)")
@ -3134,7 +3135,7 @@ function RAT:_OnDead(EventData)
else else
if self.Debug then if self.Debug then
env.error("Group does not exist in RAT:_OnDead().") self:E(RAT.id.."ERROR: Group does not exist in RAT:_OnDead().")
end end
end end
end end
@ -3147,7 +3148,7 @@ function RAT:_OnCrash(EventData)
if SpawnGroup then if SpawnGroup then
env.info(string.format("%sGroup %s crashed!", RAT.id, SpawnGroup:GetName())) self:T(string.format("%sGroup %s crashed!", RAT.id, SpawnGroup:GetName()))
-- Get the template name of the group. This can be nil if this was not a spawned group. -- Get the template name of the group. This can be nil if this was not a spawned group.
local EventPrefix = self:_GetPrefixFromGroup(SpawnGroup) local EventPrefix = self:_GetPrefixFromGroup(SpawnGroup)
@ -3158,7 +3159,7 @@ function RAT:_OnCrash(EventData)
if EventPrefix == self.alias then if EventPrefix == self.alias then
local text="Event: Group "..SpawnGroup:GetName().." crashed." local text="Event: Group "..SpawnGroup:GetName().." crashed."
env.info(RAT.id..text) self:T(RAT.id..text)
-- Set status. -- Set status.
--self:_SetStatus(SpawnGroup, "Crashed") --self:_SetStatus(SpawnGroup, "Crashed")
@ -3174,7 +3175,7 @@ function RAT:_OnCrash(EventData)
else else
if self.Debug then if self.Debug then
env.error("Group does not exist in RAT:_OnCrash().") self:E(RAT.id.."ERROR: Group does not exist in RAT:_OnCrash().")
end end
end end
end end
@ -3276,7 +3277,7 @@ function RAT:_Waypoint(index, Type, Coord, Speed, Altitude, Airport)
_Action="Turning Point" _Action="Turning Point"
_alttype="BARO" _alttype="BARO"
else else
env.error("Unknown waypoint type in RAT:Waypoint() function!") self:E(RAT.id.."ERROR: Unknown waypoint type in RAT:Waypoint() function!")
_Type="Turning Point" _Type="Turning Point"
_Action="Turning Point" _Action="Turning Point"
_alttype="RADIO" _alttype="RADIO"
@ -3305,7 +3306,7 @@ function RAT:_Waypoint(index, Type, Coord, Speed, Altitude, Airport)
end end
text=text.."******************************************************\n" text=text.."******************************************************\n"
if self.Debug then if self.Debug then
env.info(RAT.id..text) self:T(RAT.id..text)
end end
-- define waypoint -- define waypoint
@ -3334,16 +3335,16 @@ function RAT:_Waypoint(index, Type, Coord, Speed, Altitude, Airport)
if AirbaseCategory == Airbase.Category.SHIP then if AirbaseCategory == Airbase.Category.SHIP then
RoutePoint.linkUnit = AirbaseID RoutePoint.linkUnit = AirbaseID
RoutePoint.helipadId = AirbaseID RoutePoint.helipadId = AirbaseID
--env.info(RAT.id.."WP: Ship id = "..AirbaseID) --self:T(RAT.id.."WP: Ship id = "..AirbaseID)
elseif AirbaseCategory == Airbase.Category.HELIPAD then elseif AirbaseCategory == Airbase.Category.HELIPAD then
RoutePoint.linkUnit = AirbaseID RoutePoint.linkUnit = AirbaseID
RoutePoint.helipadId = AirbaseID RoutePoint.helipadId = AirbaseID
--env.info(RAT.id.."WP: Helipad id = "..AirbaseID) --self:T(RAT.id.."WP: Helipad id = "..AirbaseID)
elseif AirbaseCategory == Airbase.Category.AIRDROME then elseif AirbaseCategory == Airbase.Category.AIRDROME then
RoutePoint.airdromeId = AirbaseID RoutePoint.airdromeId = AirbaseID
--env.info(RAT.id.."WP: Airdrome id = "..AirbaseID) --self:T(RAT.id.."WP: Airdrome id = "..AirbaseID)
else else
--env.error(RAT.id.."Unknown Airport categoryin _Waypoint()!") --self:E(RAT.id.."Unknown Airport categoryin _Waypoint()!")
end end
end end
-- properties -- properties
@ -3412,9 +3413,9 @@ function RAT:_Routeinfo(waypoints, comment)
-- send message -- send message
if self.Debug then if self.Debug then
--env.info(RAT.id..text) --self:T(RAT.id..text)
end end
env.info(RAT.id..text) self:T(RAT.id..text)
-- return total route length in meters -- return total route length in meters
return total return total
@ -3497,7 +3498,7 @@ function RAT._WaypointFunction(group, rat, wp)
-- Info on passing waypoint. -- Info on passing waypoint.
text=string.format("Flight %s passing waypoint #%d %s.", group:GetName(), wp, rat.waypointdescriptions[wp]) text=string.format("Flight %s passing waypoint #%d %s.", group:GetName(), wp, rat.waypointdescriptions[wp])
env.info(RAT.id..text) self:T(RAT.id..text)
-- New status. -- New status.
local status=rat.waypointstatus[wp] local status=rat.waypointstatus[wp]
@ -3521,12 +3522,12 @@ function RAT._WaypointFunction(group, rat, wp)
if wp==WPfinal then if wp==WPfinal then
text=string.format("Flight %s arrived at final destination %s.", group:GetName(), destination) text=string.format("Flight %s arrived at final destination %s.", group:GetName(), destination)
MESSAGE:New(text, 10):ToAllIf(rat.reportstatus) MESSAGE:New(text, 10):ToAllIf(rat.reportstatus)
env.info(RAT.id..text) self:T(RAT.id..text)
if landing==RAT.wp.air then if landing==RAT.wp.air then
text=string.format("Activating despawn switch for flight %s! Group will be detroyed soon.", group:GetName()) text=string.format("Activating despawn switch for flight %s! Group will be detroyed soon.", group:GetName())
MESSAGE:New(text, 30):ToAllIf(rat.Debug) MESSAGE:New(text, 30):ToAllIf(rat.Debug)
env.info(RAT.id..text) self:T(RAT.id..text)
-- Enable despawn switch. Next time the status function is called, the aircraft will be despawned. -- Enable despawn switch. Next time the status function is called, the aircraft will be despawned.
rat.ratcraft[sdx].despawnme=true rat.ratcraft[sdx].despawnme=true
end end
@ -3562,7 +3563,7 @@ function RAT:_TaskFunction(FunctionString, ... )
DCSTask = self.templategroup:TaskWrappedAction(self.templategroup:CommandDoScript(table.concat(DCSScript))) DCSTask = self.templategroup:TaskWrappedAction(self.templategroup:CommandDoScript(table.concat(DCSScript)))
--env.info(RAT.id.."Taskfunction:") --self:T(RAT.id.."Taskfunction:")
--self:E( DCSTask ) --self:E( DCSTask )
return DCSTask return DCSTask
@ -3604,7 +3605,7 @@ function RAT:_FLmax(alpha, beta, d, phi, h0)
text=text..string.format( "FLmax = FL%3.0f = %6.1f m.\n", h2/RAT.unit.FL2m, h2) text=text..string.format( "FLmax = FL%3.0f = %6.1f m.\n", h2/RAT.unit.FL2m, h2)
text=text..string.format( "FLmax = FL%3.0f = %6.1f m.", h3/RAT.unit.FL2m, h3) text=text..string.format( "FLmax = FL%3.0f = %6.1f m.", h3/RAT.unit.FL2m, h3)
if self.Debug then if self.Debug then
env.info(RAT.id..text) self:T(RAT.id..text)
end end
return h3+h0 return h3+h0
end end
@ -3680,7 +3681,7 @@ end
-- @param Wrapper.Group#GROUP group Group for which the ROE is set. -- @param Wrapper.Group#GROUP group Group for which the ROE is set.
-- @param #string roe ROE of group. -- @param #string roe ROE of group.
function RAT:_SetROE(group, roe) function RAT:_SetROE(group, roe)
env.info(RAT.id.."Setting ROE to "..roe.." for group "..group:GetName()) self:T(RAT.id.."Setting ROE to "..roe.." for group "..group:GetName())
if self.roe==RAT.ROE.returnfire then if self.roe==RAT.ROE.returnfire then
group:OptionROEReturnFire() group:OptionROEReturnFire()
elseif self.roe==RAT.ROE.weaponfree then elseif self.roe==RAT.ROE.weaponfree then
@ -3696,7 +3697,7 @@ end
-- @param Wrapper.Group#GROUP group Group for which the ROT is set. -- @param Wrapper.Group#GROUP group Group for which the ROT is set.
-- @param #string rot ROT of group. -- @param #string rot ROT of group.
function RAT:_SetROT(group, rot) function RAT:_SetROT(group, rot)
env.info(RAT.id.."Setting ROT to "..rot.." for group "..group:GetName()) self:T(RAT.id.."Setting ROT to "..rot.." for group "..group:GetName())
if self.rot==RAT.ROT.passive then if self.rot==RAT.ROT.passive then
group:OptionROTPassiveDefense() group:OptionROTPassiveDefense()
elseif self.rot==RAT.ROT.evade then elseif self.rot==RAT.ROT.evade then
@ -3718,7 +3719,7 @@ function RAT:_SetCoalitionTable()
elseif self.friendly==RAT.coal.sameonly then elseif self.friendly==RAT.coal.sameonly then
self.ctable={self.coalition} self.ctable={self.coalition}
else else
env.error("Unknown friendly coalition in _SetCoalitionTable(). Defaulting to NEUTRAL.") self:E(RAT.id.."ERROR: Unknown friendly coalition in _SetCoalitionTable(). Defaulting to NEUTRAL.")
self.ctable={self.coalition, coalition.side.NEUTRAL} self.ctable={self.coalition, coalition.side.NEUTRAL}
end end
end end
@ -3795,7 +3796,7 @@ function RAT:_Randomize(value, fac, lower, upper)
-- debug info -- debug info
if self.Debug then if self.Debug then
local text=string.format("Random: value = %6.2f, fac = %4.2f, min = %6.2f, max = %6.2f, r = %6.2f", value, fac, min, max, r) local text=string.format("Random: value = %6.2f, fac = %4.2f, min = %6.2f, max = %6.2f, r = %6.2f", value, fac, min, max, r)
env.info(RAT.id..text) self:T(RAT.id..text)
end end
return r return r
@ -3843,7 +3844,7 @@ function RAT:_PlaceMarkers(waypoints, index)
self:_SetMarker(self.waypointdescriptions[i], waypoints[i], index) self:_SetMarker(self.waypointdescriptions[i], waypoints[i], index)
if self.Debug then if self.Debug then
local text=string.format("Marker at waypoint #%d: %s for flight #%d", i, self.waypointdescriptions[i], index) local text=string.format("Marker at waypoint #%d: %s for flight #%d", i, self.waypointdescriptions[i], index)
env.info(RAT.id..text) self:T(RAT.id..text)
end end
end end
end end
@ -3858,7 +3859,7 @@ function RAT:_SetMarker(text, wp, index)
RAT.markerid=RAT.markerid+1 RAT.markerid=RAT.markerid+1
self.markerids[#self.markerids+1]=RAT.markerid self.markerids[#self.markerids+1]=RAT.markerid
if self.Debug then if self.Debug then
env.info(RAT.id..self.SpawnTemplatePrefix..": placing marker with ID "..RAT.markerid..": "..text) self:T(RAT.id..self.SpawnTemplatePrefix..": placing marker with ID "..RAT.markerid..": "..text)
end end
-- Convert to coordinate. -- Convert to coordinate.
local vec={x=wp.x, y=wp.alt, z=wp.y} local vec={x=wp.x, y=wp.alt, z=wp.y}
@ -3951,7 +3952,7 @@ function RAT:_ModifySpawnTemplate(waypoints, livery)
-- Parking spot. -- Parking spot.
UnitTemplate.parking = nil UnitTemplate.parking = nil
UnitTemplate.parking_id = self.parking_id UnitTemplate.parking_id = self.parking_id
--env.info(RAT.id.."Parking ID "..tostring(self.parking_id)) --self:T(RAT.id.."Parking ID "..tostring(self.parking_id))
-- Initial altitude -- Initial altitude
UnitTemplate.alt=PointVec3.y UnitTemplate.alt=PointVec3.y
@ -3999,9 +4000,9 @@ end
-- @param #table airports_map List of all airports of the map. -- @param #table airports_map List of all airports of the map.
function RAT:_ATCInit(airports_map) function RAT:_ATCInit(airports_map)
if not RAT.ATC.init then if not RAT.ATC.init then
env.info(RAT.id.."Starting RAT ATC.") local text
env.info(RAT.id.."Simultanious = "..RAT.ATC.Nclearance) text="Starting RAT ATC.\nSimultanious = "..RAT.ATC.Nclearance.."\n".."Delay = "..RAT.ATC.delay)
env.info(RAT.id.."Delay = "..RAT.ATC.delay) self:T(RAT.id..text)
RAT.ATC.init=true RAT.ATC.init=true
for _,ap in pairs(airports_map) do for _,ap in pairs(airports_map) do
local name=ap:GetName() local name=ap:GetName()
@ -4024,7 +4025,7 @@ end
-- @param #string name Group name of the flight. -- @param #string name Group name of the flight.
-- @param #string dest Name of the destination airport. -- @param #string dest Name of the destination airport.
function RAT:_ATCAddFlight(name, dest) function RAT:_ATCAddFlight(name, dest)
env.info(string.format("%sATC %s: Adding flight %s with destination %s.", RAT.id, dest, name, dest)) self:T(string.format("%sATC %s: Adding flight %s with destination %s.", RAT.id, dest, name, dest))
RAT.ATC.flight[name]={} RAT.ATC.flight[name]={}
RAT.ATC.flight[name].destination=dest RAT.ATC.flight[name].destination=dest
RAT.ATC.flight[name].Tarrive=-1 RAT.ATC.flight[name].Tarrive=-1
@ -4049,7 +4050,7 @@ end
-- @param #string name Group name of the flight. -- @param #string name Group name of the flight.
-- @param #number time Time the fight first registered. -- @param #number time Time the fight first registered.
function RAT:_ATCRegisterFlight(name, time) function RAT:_ATCRegisterFlight(name, time)
env.info(RAT.id.."Flight ".. name.." registered at ATC for landing clearance.") self:T(RAT.id.."Flight ".. name.." registered at ATC for landing clearance.")
RAT.ATC.flight[name].Tarrive=time RAT.ATC.flight[name].Tarrive=time
RAT.ATC.flight[name].holding=0 RAT.ATC.flight[name].holding=0
end end
@ -4080,7 +4081,7 @@ function RAT:_ATCStatus()
-- Aircraft is holding. -- Aircraft is holding.
local text=string.format("ATC %s: Flight %s is holding for %i:%02d. %s.", dest, name, hold/60, hold%60, busy) local text=string.format("ATC %s: Flight %s is holding for %i:%02d. %s.", dest, name, hold/60, hold%60, busy)
env.info(RAT.id..text) self:T(RAT.id..text)
elseif hold==RAT.ATC.onfinal then elseif hold==RAT.ATC.onfinal then
@ -4088,15 +4089,15 @@ function RAT:_ATCStatus()
local Tfinal=Tnow-RAT.ATC.flight[name].Tonfinal local Tfinal=Tnow-RAT.ATC.flight[name].Tonfinal
local text=string.format("ATC %s: Flight %s is on final. Waiting %i:%02d for landing event.", dest, name, Tfinal/60, Tfinal%60) local text=string.format("ATC %s: Flight %s is on final. Waiting %i:%02d for landing event.", dest, name, Tfinal/60, Tfinal%60)
env.info(RAT.id..text) self:T(RAT.id..text)
elseif hold==RAT.ATC.unregistered then elseif hold==RAT.ATC.unregistered then
-- Aircraft has not arrived at holding point. -- Aircraft has not arrived at holding point.
--env.info(string.format("ATC %s: Flight %s is not registered yet (hold %d).", dest, name, hold)) --self:T(string.format("ATC %s: Flight %s is not registered yet (hold %d).", dest, name, hold))
else else
env.error(RAT.id.."Unknown holding time in RAT:_ATCStatus().") self:E(RAT.id.."ERROR: Unknown holding time in RAT:_ATCStatus().")
end end
end end
@ -4138,12 +4139,12 @@ function RAT:_ATCCheck()
-- Debug message. -- Debug message.
local text=string.format("ATC %s: Flight %s runway is busy. You are #%d of %d in landing queue. Your holding time is %i:%02d.", name, flight,qID, nqueue, RAT.ATC.flight[flight].holding/60, RAT.ATC.flight[flight].holding%60) local text=string.format("ATC %s: Flight %s runway is busy. You are #%d of %d in landing queue. Your holding time is %i:%02d.", name, flight,qID, nqueue, RAT.ATC.flight[flight].holding/60, RAT.ATC.flight[flight].holding%60)
env.info(RAT.id..text) self:T(RAT.id..text)
else else
local text=string.format("ATC %s: Flight %s was cleared for landing. Your holding time was %i:%02d.", name, flight, RAT.ATC.flight[flight].holding/60, RAT.ATC.flight[flight].holding%60) local text=string.format("ATC %s: Flight %s was cleared for landing. Your holding time was %i:%02d.", name, flight, RAT.ATC.flight[flight].holding/60, RAT.ATC.flight[flight].holding%60)
env.info(RAT.id..text) self:T(RAT.id..text)
-- Clear flight for landing. -- Clear flight for landing.
RAT:_ATCClearForLanding(name, flight) RAT:_ATCClearForLanding(name, flight)
@ -4183,7 +4184,7 @@ function RAT:_ATCClearForLanding(airport, flight)
-- Debug message. -- Debug message.
local text1=string.format("ATC %s: Flight %s cleared for landing (flag=%d).", airport, flight, flagvalue) local text1=string.format("ATC %s: Flight %s cleared for landing (flag=%d).", airport, flight, flagvalue)
local text2=string.format("ATC %s: Flight %s you are cleared for landing.", airport, flight) local text2=string.format("ATC %s: Flight %s you are cleared for landing.", airport, flight)
env.info( RAT.id..text1) self:T( RAT.id..text1)
MESSAGE:New(text2, 10):ToAllIf(RAT.ATC.messages) MESSAGE:New(text2, 10):ToAllIf(RAT.ATC.messages)
end end
@ -4225,9 +4226,9 @@ function RAT:_ATCFlightLanded(name)
local text2=string.format("ATC %s: Number of flights still on final %d.", dest, RAT.ATC.airport[dest].Nonfinal) local text2=string.format("ATC %s: Number of flights still on final %d.", dest, RAT.ATC.airport[dest].Nonfinal)
local text3=string.format("ATC %s: Traffic report: Number of planes landed in total %d. Flights/hour = %3.2f.", dest, RAT.ATC.airport[dest].traffic, TrafficPerHour) local text3=string.format("ATC %s: Traffic report: Number of planes landed in total %d. Flights/hour = %3.2f.", dest, RAT.ATC.airport[dest].traffic, TrafficPerHour)
local text4=string.format("ATC %s: Flight %s landed. Welcome to %s.", dest, name, dest) local text4=string.format("ATC %s: Flight %s landed. Welcome to %s.", dest, name, dest)
env.info(RAT.id..text1) self:T(RAT.id..text1)
env.info(RAT.id..text2) self:T(RAT.id..text2)
env.info(RAT.id..text3) self:T(RAT.id..text3)
MESSAGE:New(text4, 10):ToAllIf(RAT.ATC.messages) MESSAGE:New(text4, 10):ToAllIf(RAT.ATC.messages)
end end
@ -4280,5 +4281,3 @@ function RAT:_ATCQueue()
end end
end end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------