mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-24 12:05:27 +00:00
AB 0.9.8w
This commit is contained in:
@@ -150,6 +150,7 @@
|
|||||||
-- @field #number parkingscanradius Radius in meters until which parking spots are scanned for obstacles like other units, statics or scenery.
|
-- @field #number parkingscanradius Radius in meters until which parking spots are scanned for obstacles like other units, statics or scenery.
|
||||||
-- @field #boolean parkingscanscenery If true, area around parking spots is scanned for scenery objects. Default is false.
|
-- @field #boolean parkingscanscenery If true, area around parking spots is scanned for scenery objects. Default is false.
|
||||||
-- @field #boolean parkingverysafe If true, parking spots are considered as non-free until a possible aircraft has left and taken off. Default false.
|
-- @field #boolean parkingverysafe If true, parking spots are considered as non-free until a possible aircraft has left and taken off. Default false.
|
||||||
|
-- @field #boolean despawnair If true, aircraft are despawned when they reach their destination zone. Default.
|
||||||
-- @extends Core.Spawn#SPAWN
|
-- @extends Core.Spawn#SPAWN
|
||||||
|
|
||||||
--- Implements an easy to use way to randomly fill your map with AI aircraft.
|
--- Implements an easy to use way to randomly fill your map with AI aircraft.
|
||||||
@@ -428,6 +429,7 @@ RAT={
|
|||||||
parkingscanradius=40, -- Scan radius.
|
parkingscanradius=40, -- Scan radius.
|
||||||
parkingscanscenery=false, -- Scan parking spots for scenery obstacles.
|
parkingscanscenery=false, -- Scan parking spots for scenery obstacles.
|
||||||
parkingverysafe=false, -- Very safe option.
|
parkingverysafe=false, -- Very safe option.
|
||||||
|
despawnair=true,
|
||||||
}
|
}
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
@@ -546,7 +548,7 @@ RAT.id="RAT | "
|
|||||||
--- RAT version.
|
--- RAT version.
|
||||||
-- @list version
|
-- @list version
|
||||||
RAT.version={
|
RAT.version={
|
||||||
version = "2.3.5",
|
version = "2.3.6",
|
||||||
print = true,
|
print = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1098,6 +1100,14 @@ function RAT:SetParkingSpotSafeOFF()
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Aircraft that reach their destination zone are not despawned. They will probably go the the nearest airbase and try to land.
|
||||||
|
-- @param #RAT self
|
||||||
|
-- @return #RAT RAT self object.
|
||||||
|
function RAT:SetDespawnAirOFF()
|
||||||
|
self.despawnair=false
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Set takeoff type. Starting cold at airport, starting hot at airport, starting at runway, starting in the air.
|
--- Set takeoff type. Starting cold at airport, starting hot at airport, starting at runway, starting in the air.
|
||||||
-- Default is "takeoff-coldorhot". So there is a 50% chance that the aircraft starts with cold engines and 50% that it starts with hot engines.
|
-- Default is "takeoff-coldorhot". So there is a 50% chance that the aircraft starts with cold engines and 50% that it starts with hot engines.
|
||||||
-- @param #RAT self
|
-- @param #RAT self
|
||||||
@@ -3604,13 +3614,18 @@ function RAT:Status(message, forID)
|
|||||||
|
|
||||||
local text=string.format("Flight %s will be despawned NOW!", self.alias)
|
local text=string.format("Flight %s will be despawned NOW!", self.alias)
|
||||||
self:T(RAT.id..text)
|
self:T(RAT.id..text)
|
||||||
-- Despawn old group.
|
|
||||||
|
-- Respawn group
|
||||||
if (not self.norespawn) and (not self.respawn_after_takeoff) then
|
if (not self.norespawn) and (not self.respawn_after_takeoff) then
|
||||||
local idx=self:GetSpawnIndexFromGroup(group)
|
local idx=self:GetSpawnIndexFromGroup(group)
|
||||||
local coord=group:GetCoordinate()
|
local coord=group:GetCoordinate()
|
||||||
self:_Respawn(idx, coord, 0)
|
self:_Respawn(idx, coord, 0)
|
||||||
end
|
end
|
||||||
self:_Despawn(group, 0)
|
|
||||||
|
-- Despawn old group.
|
||||||
|
if self.despawnair then
|
||||||
|
self:_Despawn(group, 0)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1206,7 +1206,7 @@ AIRBOSS.GroovePos={
|
|||||||
-- @field #AIRBOSS.RadioCall NOISE Static noise sound.
|
-- @field #AIRBOSS.RadioCall NOISE Static noise sound.
|
||||||
|
|
||||||
--- Marshal radio calls.
|
--- Marshal radio calls.
|
||||||
-- @type AIRBOSS.MarshalCall
|
-- @type AIRBOSS.MarshalCalls
|
||||||
-- @field #AIRBOSS.RadioCall RADIOCHECK "Radio check" call.
|
-- @field #AIRBOSS.RadioCall RADIOCHECK "Radio check" call.
|
||||||
-- @field #AIRBOSS.RadioCall SAYNEEDLES "Say needles" call.
|
-- @field #AIRBOSS.RadioCall SAYNEEDLES "Say needles" call.
|
||||||
-- @field #AIRBOSS.RadioCall FLYNEEDLES "Fly your needles" call.
|
-- @field #AIRBOSS.RadioCall FLYNEEDLES "Fly your needles" call.
|
||||||
@@ -1222,6 +1222,15 @@ AIRBOSS.GroovePos={
|
|||||||
-- @field #AIRBOSS.RadioCall N9 "Nine" call.
|
-- @field #AIRBOSS.RadioCall N9 "Nine" call.
|
||||||
-- @field #AIRBOSS.RadioCall CLICK Radio end transmission click sound.
|
-- @field #AIRBOSS.RadioCall CLICK Radio end transmission click sound.
|
||||||
-- @field #AIRBOSS.RadioCall NOISE Static noise sound.
|
-- @field #AIRBOSS.RadioCall NOISE Static noise sound.
|
||||||
|
-- @field #AIRBOSS.RadioCall CASE "Case" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall EXPECTED "Expected" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall BRC "BRC" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall CHARLIETIME "Charlie Time" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall REPORTSEEME "Report see me" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall HOLDAT "Hold at" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall ANGELS "Angels" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall ALTIMETER "Altimeter" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall POINT "Point" call.
|
||||||
|
|
||||||
--- Message for player.
|
--- Message for player.
|
||||||
-- @type AIRBOSS.PlayerMessage
|
-- @type AIRBOSS.PlayerMessage
|
||||||
@@ -3793,72 +3802,71 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
duration=0.9,
|
duration=0.9,
|
||||||
subduration=5,
|
subduration=5,
|
||||||
},
|
},
|
||||||
-- TODO: Other voice overs for marshal.
|
|
||||||
N0={
|
N0={
|
||||||
file="LSO-N0",
|
file="MARSHAL-N0",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.40,
|
duration=0.40,
|
||||||
},
|
},
|
||||||
N1={
|
N1={
|
||||||
file="LSO-N1",
|
file="MARSHAL-N1",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.25,
|
duration=0.25,
|
||||||
},
|
},
|
||||||
N2={
|
N2={
|
||||||
file="LSO-N2",
|
file="MARSHAL-N2",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.37,
|
duration=0.37,
|
||||||
},
|
},
|
||||||
N3={
|
N3={
|
||||||
file="LSO-N3",
|
file="MARSHAL-N3",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.37,
|
duration=0.37,
|
||||||
},
|
},
|
||||||
N4={
|
N4={
|
||||||
file="LSO-N4",
|
file="MARSHAL-N4",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.39,
|
duration=0.39,
|
||||||
},
|
},
|
||||||
N5={
|
N5={
|
||||||
file="LSO-N5",
|
file="MARSHAL-N5",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.39,
|
duration=0.39,
|
||||||
},
|
},
|
||||||
N6={
|
N6={
|
||||||
file="LSO-N6",
|
file="MARSHAL-N6",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.40,
|
duration=0.40,
|
||||||
},
|
},
|
||||||
N7={
|
N7={
|
||||||
file="LSO-N7",
|
file="MARSHAL-N7",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.40,
|
duration=0.40,
|
||||||
},
|
},
|
||||||
N8={
|
N8={
|
||||||
file="LSO-N8",
|
file="MARSHAL-N8",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.37,
|
duration=0.37,
|
||||||
},
|
},
|
||||||
N9={
|
N9={
|
||||||
file="LSO-N9",
|
file="MARSHAL-N9",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
@@ -5146,11 +5154,14 @@ function AIRBOSS:_AddMarshalGroup(flight, stack)
|
|||||||
local Ccharlie=UTILS.SecondsToClock(flight.Tcharlie)
|
local Ccharlie=UTILS.SecondsToClock(flight.Tcharlie)
|
||||||
|
|
||||||
-- Marshal message.
|
-- Marshal message.
|
||||||
local text=string.format("Case %d, expected BRC %03d°, hold at %d. Expected Charlie Time %s.\n", flight.case, brc, alt, tostring(Ccharlie))
|
--local text=string.format("Case %d, expected BRC %03d°, hold at %d. Expected Charlie Time %s.\n", flight.case, brc, alt, tostring(Ccharlie))
|
||||||
text=text..string.format("Altimeter %.2f. Report see me.", P)
|
--text=text..string.format("Altimeter %.2f. Report see me.", P)
|
||||||
|
|
||||||
-- Message to all players.
|
-- Message to all players.
|
||||||
self:MessageToMarshal(text, "MARSHAL", flight.onboard)
|
--self:MessageToMarshal(text, "MARSHAL", flight.onboard)
|
||||||
|
|
||||||
|
-- Combined marshal call.
|
||||||
|
self:_MarshalCallArrived(flight.onboard, flight.case, brc, alt, Ccharlie, P)
|
||||||
|
|
||||||
-- Hint about TACAN bearing.
|
-- Hint about TACAN bearing.
|
||||||
if self.TACANon and (not flight.ai) and flight.difficulty==AIRBOSS.Difficulty.EASY then
|
if self.TACANon and (not flight.ai) and flight.difficulty==AIRBOSS.Difficulty.EASY then
|
||||||
@@ -5895,7 +5906,7 @@ function AIRBOSS:_CheckSectionRecovered(flight)
|
|||||||
|
|
||||||
-- Check all elements of the lead flight group.
|
-- Check all elements of the lead flight group.
|
||||||
for _,_element in pairs(lead.elements) do
|
for _,_element in pairs(lead.elements) do
|
||||||
local element=_element --#AIROBSS.FlightElement
|
local element=_element --#AIRBOSS.FlightElement
|
||||||
if not element.recovered then
|
if not element.recovered then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@@ -12557,6 +12568,65 @@ function AIRBOSS:_Number2Radio(radio, number, delay)
|
|||||||
return wait
|
return wait
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Compile a radio call when Marshal tells a flight the holding alitude.
|
||||||
|
-- @param #AIRBOSS self
|
||||||
|
-- @param #string modex Tail number.
|
||||||
|
-- @param #number case Recovery case.
|
||||||
|
-- @param #number brc Base recovery course.
|
||||||
|
-- @param #number altitude Holding alitude.
|
||||||
|
-- @param #string charlie Charlie Time estimate.
|
||||||
|
-- @param #string qfe Alitmeter inHg.
|
||||||
|
function AIRBOSS:_MarshalCallArrived(modex, case, brc, altitude, charlie, qfe)
|
||||||
|
|
||||||
|
-- Split strings etc.
|
||||||
|
local angels=self:_GetAngels(altitude)
|
||||||
|
local QFE=UTILS.Split(tostring(qfe), ".")
|
||||||
|
local CT=UTILS.Split(select(1, UTILS.Split(alitmeter, "+")), ":")
|
||||||
|
|
||||||
|
-- Subtitle text.
|
||||||
|
local text=string.format("Case %d, expected BRC %03d°, hold at angels %d. Expected Charlie Time %s.\n", case, brc, angels, charlie)
|
||||||
|
text=text..string.format("Altimeter %.2f. Report see me.", qfe)
|
||||||
|
|
||||||
|
-- Create new call to display complete subtitle.
|
||||||
|
local casecall=self:_NewRadioCall(self.MarshalCall.CASE, "MARSHAL", text, self.Tmessage, modex)
|
||||||
|
|
||||||
|
-- Case..
|
||||||
|
self:RadioTransmission(self.MarshalRadio, casecall)
|
||||||
|
-- X..
|
||||||
|
self:_Number2Radio(self.MarshalRadio, tostring(case))
|
||||||
|
-- expected..
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.EXPECTED)
|
||||||
|
-- BRC..
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.BRC)
|
||||||
|
-- XYZ..
|
||||||
|
self:_Number2Radio(self.MarshalRadio, string.format("%d03", brc))
|
||||||
|
-- hold at..
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.HOLDAT)
|
||||||
|
-- angels..
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.ANGELS)
|
||||||
|
-- X..
|
||||||
|
self:_Number2Radio(self.MarshalRadio, tostring(angels))
|
||||||
|
-- Expected..
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.EXPECTED)
|
||||||
|
-- Charlie time..
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.CHARLIETIME)
|
||||||
|
-- XY.. (hours)
|
||||||
|
self:_Number2Radio(self.MarshalRadio, CT[1])
|
||||||
|
-- XY.. (minutes)
|
||||||
|
self:_Number2Radio(self.MarshalRadio, CT[2])
|
||||||
|
-- Altimeter..
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.ALTIMETER)
|
||||||
|
-- XY..
|
||||||
|
self:_Number2Radio(self.MarshalRadio, QFE[1])
|
||||||
|
-- Point..
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.POINT)
|
||||||
|
-- XY..
|
||||||
|
self:_Number2Radio(self.MarshalRadio, QFE[2])
|
||||||
|
-- Report see me.
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.REPORTSEEME)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- RADIO MENU Functions
|
-- RADIO MENU Functions
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user