mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # Moose Development/Moose/Ops/Airboss.lua
This commit is contained in:
commit
f8f1547f27
@ -2847,7 +2847,7 @@ function AIRBOSS:SetGlideslopeErrorThresholds(_max,_min, High, HIGH, Low, LOW)
|
|||||||
|
|
||||||
--Check if V/STOL Carrier
|
--Check if V/STOL Carrier
|
||||||
if self.carriertype == AIRBOSS.CarrierType.INVINCIBLE or self.carriertype == AIRBOSS.CarrierType.HERMES or self.carriertype == AIRBOSS.CarrierType.TARAWA or self.carriertype == AIRBOSS.CarrierType.AMERICA or self.carriertype == AIRBOSS.CarrierType.JCARLOS or self.carriertype == AIRBOSS.CarrierType.CANBERRA then
|
if self.carriertype == AIRBOSS.CarrierType.INVINCIBLE or self.carriertype == AIRBOSS.CarrierType.HERMES or self.carriertype == AIRBOSS.CarrierType.TARAWA or self.carriertype == AIRBOSS.CarrierType.AMERICA or self.carriertype == AIRBOSS.CarrierType.JCARLOS or self.carriertype == AIRBOSS.CarrierType.CANBERRA then
|
||||||
|
|
||||||
-- allow a larger GSE for V/STOL operations --Pene Testing
|
-- allow a larger GSE for V/STOL operations --Pene Testing
|
||||||
self.gle._max=_max or 0.7
|
self.gle._max=_max or 0.7
|
||||||
self.gle.High=High or 1.4
|
self.gle.High=High or 1.4
|
||||||
@ -2864,7 +2864,7 @@ function AIRBOSS:SetGlideslopeErrorThresholds(_max,_min, High, HIGH, Low, LOW)
|
|||||||
self.gle.Low=Low or -0.6
|
self.gle.Low=Low or -0.6
|
||||||
self.gle.LOW=LOW or -0.9
|
self.gle.LOW=LOW or -0.9
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -2884,7 +2884,7 @@ function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LeftMed, LEFT, Right,
|
|||||||
|
|
||||||
--Check if V/STOL Carrier -- Pene testing
|
--Check if V/STOL Carrier -- Pene testing
|
||||||
if self.carriertype == AIRBOSS.CarrierType.INVINCIBLE or self.carriertype == AIRBOSS.CarrierType.HERMES or self.carriertype == AIRBOSS.CarrierType.TARAWA or self.carriertype == AIRBOSS.CarrierType.AMERICA or self.carriertype == AIRBOSS.CarrierType.JCARLOS or self.carriertype == AIRBOSS.CarrierType.CANBERRA then
|
if self.carriertype == AIRBOSS.CarrierType.INVINCIBLE or self.carriertype == AIRBOSS.CarrierType.HERMES or self.carriertype == AIRBOSS.CarrierType.TARAWA or self.carriertype == AIRBOSS.CarrierType.AMERICA or self.carriertype == AIRBOSS.CarrierType.JCARLOS or self.carriertype == AIRBOSS.CarrierType.CANBERRA then
|
||||||
|
|
||||||
-- V/STOL Values -- allow a larger LUE for V/STOL operations
|
-- V/STOL Values -- allow a larger LUE for V/STOL operations
|
||||||
self.lue._max=_max or 1.8
|
self.lue._max=_max or 1.8
|
||||||
self.lue._min=_min or -1.8
|
self.lue._min=_min or -1.8
|
||||||
@ -2905,7 +2905,7 @@ function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LeftMed, LEFT, Right,
|
|||||||
self.lue.RightMed=RightMed or 2.0
|
self.lue.RightMed=RightMed or 2.0
|
||||||
self.lue.RIGHT=RIGHT or 3.0
|
self.lue.RIGHT=RIGHT or 3.0
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -3268,7 +3268,7 @@ function AIRBOSS:SetExtraVoiceOversAI(status)
|
|||||||
self.xtVoiceOversAI=status
|
self.xtVoiceOversAI=status
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Do not handle AI aircraft.
|
--- Do not handle AI aircraft.
|
||||||
-- @param #AIRBOSS self
|
-- @param #AIRBOSS self
|
||||||
-- @return #AIRBOSS self
|
-- @return #AIRBOSS self
|
||||||
@ -3383,9 +3383,9 @@ end
|
|||||||
-- @param #string Host Host. Default `"127.0.0.1"`.
|
-- @param #string Host Host. Default `"127.0.0.1"`.
|
||||||
-- @return #AIRBOSS self
|
-- @return #AIRBOSS self
|
||||||
function AIRBOSS:SetFunkManOn(Port, Host)
|
function AIRBOSS:SetFunkManOn(Port, Host)
|
||||||
|
|
||||||
self.funkmanSocket=SOCKET:New(Port, Host)
|
self.funkmanSocket=SOCKET:New(Port, Host)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -6364,7 +6364,7 @@ function AIRBOSS:_LandAI( flight )
|
|||||||
-- Aircraft speed when flying the pattern.
|
-- Aircraft speed when flying the pattern.
|
||||||
local Speed = UTILS.KnotsToKmph( 200 )
|
local Speed = UTILS.KnotsToKmph( 200 )
|
||||||
|
|
||||||
if flight.actype == AIRBOSS.AircraftCarrier.HORNET
|
if flight.actype == AIRBOSS.AircraftCarrier.HORNET
|
||||||
or flight.actype == AIRBOSS.AircraftCarrier.FA18C
|
or flight.actype == AIRBOSS.AircraftCarrier.FA18C
|
||||||
or flight.actype == AIRBOSS.AircraftCarrier.RHINOE
|
or flight.actype == AIRBOSS.AircraftCarrier.RHINOE
|
||||||
or flight.actype == AIRBOSS.AircraftCarrier.RHINOF
|
or flight.actype == AIRBOSS.AircraftCarrier.RHINOF
|
||||||
@ -8102,7 +8102,7 @@ end
|
|||||||
-- @param Core.Event#EVENTDATA EventData
|
-- @param Core.Event#EVENTDATA EventData
|
||||||
function AIRBOSS:OnEventBirth( EventData )
|
function AIRBOSS:OnEventBirth( EventData )
|
||||||
self:F3( { eventbirth = EventData } )
|
self:F3( { eventbirth = EventData } )
|
||||||
|
|
||||||
-- Nil checks.
|
-- Nil checks.
|
||||||
if EventData == nil then
|
if EventData == nil then
|
||||||
self:E( self.lid .. "ERROR: EventData=nil in event BIRTH!" )
|
self:E( self.lid .. "ERROR: EventData=nil in event BIRTH!" )
|
||||||
@ -8114,9 +8114,9 @@ function AIRBOSS:OnEventBirth( EventData )
|
|||||||
self:E( EventData )
|
self:E( EventData )
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if EventData.IniObjectCategory ~= Object.Category.UNIT then return end
|
if EventData.IniObjectCategory ~= Object.Category.UNIT then return end
|
||||||
|
|
||||||
local _unitName = EventData.IniUnitName
|
local _unitName = EventData.IniUnitName
|
||||||
local _unit, _playername = self:_GetPlayerUnitAndName( _unitName )
|
local _unit, _playername = self:_GetPlayerUnitAndName( _unitName )
|
||||||
|
|
||||||
@ -9194,9 +9194,9 @@ function AIRBOSS:_DirtyUp( playerData )
|
|||||||
self:_PlayerHint( playerData )
|
self:_PlayerHint( playerData )
|
||||||
|
|
||||||
-- Radio call "Say/Fly needles". Delayed by 10/15 seconds.
|
-- Radio call "Say/Fly needles". Delayed by 10/15 seconds.
|
||||||
if playerData.actype == AIRBOSS.AircraftCarrier.HORNET
|
if playerData.actype == AIRBOSS.AircraftCarrier.HORNET
|
||||||
or playerData.actype == AIRBOSS.AircraftCarrier.F14A
|
or playerData.actype == AIRBOSS.AircraftCarrier.F14A
|
||||||
or playerData.actype == AIRBOSS.AircraftCarrier.F14B
|
or playerData.actype == AIRBOSS.AircraftCarrier.F14B
|
||||||
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOE
|
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOE
|
||||||
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOF
|
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOF
|
||||||
or playerData.actype == AIRBOSS.AircraftCarrier.GROWLER
|
or playerData.actype == AIRBOSS.AircraftCarrier.GROWLER
|
||||||
@ -9793,24 +9793,24 @@ function AIRBOSS:_Groove( playerData )
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Long V/STOL groove time Wave Off over 75 seconds to IC - TOPGUN level Only. --pene testing (WIP)--- Need to think more about this.
|
-- Long V/STOL groove time Wave Off over 75 seconds to IC - TOPGUN level Only. --pene testing (WIP)--- Need to think more about this.
|
||||||
|
|
||||||
--if rho>=RAR and rho<=RIC and not playerData.waveoff and playerData.difficulty==AIRBOSS.Difficulty.HARD and playerData.actype== AIRBOSS.AircraftCarrier.AV8B then
|
--if rho>=RAR and rho<=RIC and not playerData.waveoff and playerData.difficulty==AIRBOSS.Difficulty.HARD and playerData.actype== AIRBOSS.AircraftCarrier.AV8B then
|
||||||
-- Get groove time
|
-- Get groove time
|
||||||
--local vSlow=groovedata.time
|
--local vSlow=groovedata.time
|
||||||
-- If too slow wave off.
|
-- If too slow wave off.
|
||||||
--if vSlow >75 then
|
--if vSlow >75 then
|
||||||
|
|
||||||
-- LSO Wave off!
|
-- LSO Wave off!
|
||||||
--self:RadioTransmission(self.LSORadio, self.LSOCall.WAVEOFF, nil, nil, nil, true)
|
--self:RadioTransmission(self.LSORadio, self.LSOCall.WAVEOFF, nil, nil, nil, true)
|
||||||
--playerData.Tlso=timer.getTime()
|
--playerData.Tlso=timer.getTime()
|
||||||
|
|
||||||
-- Player was waved Off
|
-- Player was waved Off
|
||||||
--playerData.waveoff=true
|
--playerData.waveoff=true
|
||||||
--return
|
--return
|
||||||
--end
|
--end
|
||||||
--end
|
--end
|
||||||
|
|
||||||
-- Groovedata step.
|
-- Groovedata step.
|
||||||
@ -10008,7 +10008,7 @@ function AIRBOSS:_CheckWaveOff( glideslopeError, lineupError, AoA, playerData )
|
|||||||
waveoff = true
|
waveoff = true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Too slow or too fast? Only for pros.
|
-- Too slow or too fast? Only for pros.
|
||||||
|
|
||||||
if playerData.difficulty == AIRBOSS.Difficulty.HARD and playerData.actype ~= AIRBOSS.AircraftCarrier.AV8B then
|
if playerData.difficulty == AIRBOSS.Difficulty.HARD and playerData.actype ~= AIRBOSS.AircraftCarrier.AV8B then
|
||||||
-- Get aircraft specific AoA values. Not for AV-8B due to transition to Stable Hover.
|
-- Get aircraft specific AoA values. Not for AV-8B due to transition to Stable Hover.
|
||||||
@ -10313,7 +10313,7 @@ function AIRBOSS:_Trapped( playerData )
|
|||||||
|
|
||||||
-- Get current wire (estimate). This now based on the position where the player comes to a standstill which should reflect the trapped wire better.
|
-- Get current wire (estimate). This now based on the position where the player comes to a standstill which should reflect the trapped wire better.
|
||||||
local dcorr = 100
|
local dcorr = 100
|
||||||
if playerData.actype == AIRBOSS.AircraftCarrier.HORNET
|
if playerData.actype == AIRBOSS.AircraftCarrier.HORNET
|
||||||
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOE
|
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOE
|
||||||
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOF
|
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOF
|
||||||
or playerData.actype == AIRBOSS.AircraftCarrier.GROWLER then
|
or playerData.actype == AIRBOSS.AircraftCarrier.GROWLER then
|
||||||
@ -10838,7 +10838,7 @@ function AIRBOSS:_GetZoneAbeamLandingSpot()
|
|||||||
|
|
||||||
-- Coordinate array. Pene Testing extended Abeam landing spot V/STOL.
|
-- Coordinate array. Pene Testing extended Abeam landing spot V/STOL.
|
||||||
local p={}
|
local p={}
|
||||||
|
|
||||||
-- Points.
|
-- Points.
|
||||||
p[1] = S:Translate( 15, FB ):Translate( 15, FB + 90 ) -- Top-Right
|
p[1] = S:Translate( 15, FB ):Translate( 15, FB + 90 ) -- Top-Right
|
||||||
p[2] = S:Translate( -45, FB ):Translate( 15, FB + 90 ) -- Bottom-Right
|
p[2] = S:Translate( -45, FB ):Translate( 15, FB + 90 ) -- Bottom-Right
|
||||||
@ -11286,7 +11286,7 @@ function AIRBOSS:_GetOptLandingCoordinate()
|
|||||||
|
|
||||||
-- set Case III V/STOL abeam landing spot over deck -- Pene Testing
|
-- set Case III V/STOL abeam landing spot over deck -- Pene Testing
|
||||||
if self.carriertype==AIRBOSS.CarrierType.INVINCIBLE or self.carriertype==AIRBOSS.CarrierType.HERMES or self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
|
if self.carriertype==AIRBOSS.CarrierType.INVINCIBLE or self.carriertype==AIRBOSS.CarrierType.HERMES or self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
|
||||||
|
|
||||||
if case==3 then
|
if case==3 then
|
||||||
|
|
||||||
-- Landing coordinate.
|
-- Landing coordinate.
|
||||||
@ -11294,7 +11294,7 @@ function AIRBOSS:_GetOptLandingCoordinate()
|
|||||||
|
|
||||||
-- Altitude 120ft -- is this corect for Case III?
|
-- Altitude 120ft -- is this corect for Case III?
|
||||||
self.landingcoord:SetAltitude(UTILS.FeetToMeters(120))
|
self.landingcoord:SetAltitude(UTILS.FeetToMeters(120))
|
||||||
|
|
||||||
elseif case==2 or case==1 then
|
elseif case==2 or case==1 then
|
||||||
|
|
||||||
-- Landing 100 ft abeam, 120 ft alt.
|
-- Landing 100 ft abeam, 120 ft alt.
|
||||||
@ -11304,7 +11304,7 @@ function AIRBOSS:_GetOptLandingCoordinate()
|
|||||||
self.landingcoord:SetAltitude(UTILS.FeetToMeters(120))
|
self.landingcoord:SetAltitude(UTILS.FeetToMeters(120))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
-- Ideally we want to land between 2nd and 3rd wire.
|
-- Ideally we want to land between 2nd and 3rd wire.
|
||||||
@ -11899,7 +11899,7 @@ function AIRBOSS:_LSOgrade( playerData )
|
|||||||
local nS=count(G, '%(')
|
local nS=count(G, '%(')
|
||||||
local nN=N-nS-nL
|
local nN=N-nS-nL
|
||||||
local nNv=Nv-nS-nL
|
local nNv=Nv-nS-nL
|
||||||
|
|
||||||
-- Groove time 15-18.99 sec for a unicorn. Or 60-65 for V/STOL unicorn.
|
-- Groove time 15-18.99 sec for a unicorn. Or 60-65 for V/STOL unicorn.
|
||||||
local Tgroove=playerData.Tgroove
|
local Tgroove=playerData.Tgroove
|
||||||
local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false
|
local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false
|
||||||
@ -12016,7 +12016,7 @@ function AIRBOSS:_LSOgrade( playerData )
|
|||||||
|
|
||||||
elseif not playerData.hover and playerData.actype == AIRBOSS.AircraftCarrier.AV8B then
|
elseif not playerData.hover and playerData.actype == AIRBOSS.AircraftCarrier.AV8B then
|
||||||
-------------------------------
|
-------------------------------
|
||||||
-- AV-8B not cleared to land -- -- Landing clearence is carrier from LC to Landing
|
-- AV-8B not cleared to land -- -- Landing clearence is carrier from LC to Landing
|
||||||
-------------------------------
|
-------------------------------
|
||||||
if playerData.landed then
|
if playerData.landed then
|
||||||
-- AIRBOSS wants your balls!
|
-- AIRBOSS wants your balls!
|
||||||
@ -15246,13 +15246,13 @@ end
|
|||||||
-- @param #string modex Tail number.
|
-- @param #string modex Tail number.
|
||||||
function AIRBOSS:_MarshallInboundCall(unit, modex)
|
function AIRBOSS:_MarshallInboundCall(unit, modex)
|
||||||
|
|
||||||
-- Calculate
|
-- Calculate
|
||||||
local vectorCarrier = self:GetCoordinate():GetDirectionVec3(unit:GetCoordinate())
|
local vectorCarrier = self:GetCoordinate():GetDirectionVec3(unit:GetCoordinate())
|
||||||
local bearing = UTILS.Round(unit:GetCoordinate():GetAngleDegrees( vectorCarrier ), 0)
|
local bearing = UTILS.Round(unit:GetCoordinate():GetAngleDegrees( vectorCarrier ), 0)
|
||||||
local distance = UTILS.Round(UTILS.MetersToNM(unit:GetCoordinate():Get2DDistance(self:GetCoordinate())),0)
|
local distance = UTILS.Round(UTILS.MetersToNM(unit:GetCoordinate():Get2DDistance(self:GetCoordinate())),0)
|
||||||
local angels = UTILS.Round(UTILS.MetersToFeet(unit:GetHeight()/1000),0)
|
local angels = UTILS.Round(UTILS.MetersToFeet(unit:GetHeight()/1000),0)
|
||||||
local state = UTILS.Round(self:_GetFuelState(unit)/1000,1)
|
local state = UTILS.Round(self:_GetFuelState(unit)/1000,1)
|
||||||
|
|
||||||
-- Pilot: "Marshall, [modex], marking mom's [bearing] for [distance], angels [XX], state [X.X]"
|
-- Pilot: "Marshall, [modex], marking mom's [bearing] for [distance], angels [XX], state [X.X]"
|
||||||
local text=string.format("Marshal, %s, marking mom's %d for %d, angels %d, state %.1f", modex, bearing, distance, angels, state)
|
local text=string.format("Marshal, %s, marking mom's %d for %d, angels %d, state %.1f", modex, bearing, distance, angels, state)
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
@ -16079,8 +16079,8 @@ function AIRBOSS:_RequestMarshal( _unitName )
|
|||||||
-- Voice over of inbound call (regardless of airboss rejecting it or not)
|
-- Voice over of inbound call (regardless of airboss rejecting it or not)
|
||||||
if self.xtVoiceOvers then
|
if self.xtVoiceOvers then
|
||||||
self:_MarshallInboundCall(_unit, playerData.onboard)
|
self:_MarshallInboundCall(_unit, playerData.onboard)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Check if player is in CCA
|
-- Check if player is in CCA
|
||||||
local inCCA = playerData.unit:IsInZone( self.zoneCCA )
|
local inCCA = playerData.unit:IsInZone( self.zoneCCA )
|
||||||
|
|
||||||
@ -16328,12 +16328,12 @@ function AIRBOSS:_RequestCommence( _unitName )
|
|||||||
local playerData = self.players[_playername] -- #AIRBOSS.PlayerData
|
local playerData = self.players[_playername] -- #AIRBOSS.PlayerData
|
||||||
|
|
||||||
if playerData then
|
if playerData then
|
||||||
|
|
||||||
-- Voice over of Commencing call (regardless of Airboss will rejected or not)
|
-- Voice over of Commencing call (regardless of Airboss will rejected or not)
|
||||||
if self.xtVoiceOvers then
|
if self.xtVoiceOvers then
|
||||||
self:_CommencingCall(_unit, playerData.onboard)
|
self:_CommencingCall(_unit, playerData.onboard)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Check if unit is in CCA.
|
-- Check if unit is in CCA.
|
||||||
local text = ""
|
local text = ""
|
||||||
local cleared = false
|
local cleared = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user