mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
AIBOSS v0.9.9.7
This commit is contained in:
parent
77f1bb4fdd
commit
a29a8d7d81
@ -15377,8 +15377,44 @@ function AIRBOSS:_RequestEmergency(_unitName)
|
|||||||
|
|
||||||
elseif not _unit:InAir() then
|
elseif not _unit:InAir() then
|
||||||
|
|
||||||
-- Flight group is not in air
|
-- Carrier zone.
|
||||||
|
local zone=self:_GetZoneCarrierBox()
|
||||||
|
|
||||||
|
-- Check if player is on the carrier.
|
||||||
|
if playerData.unit:IsInZone(zone) then
|
||||||
|
|
||||||
|
-- Bolter pattern.
|
||||||
|
text="roger, you are now technically in the bolter pattern. Your next step after takeoff is abeam!"
|
||||||
|
|
||||||
|
-- Get flight lead.
|
||||||
|
local lead=self:_GetFlightLead(playerData)
|
||||||
|
|
||||||
|
-- Set set for lead.
|
||||||
|
self:_SetPlayerStep(lead, AIRBOSS.PatternStep.BOLTER)
|
||||||
|
|
||||||
|
-- Also set bolter pattern for all members.
|
||||||
|
for _,sec in pairs(lead.section) do
|
||||||
|
local sectionmember=sec --#AIRBOSS.PlayerData
|
||||||
|
self:_SetPlayerStep(sectionmember, AIRBOSS.PatternStep.BOLTER)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Remove flight from waiting queue just in case.
|
||||||
|
self:_RemoveFlightFromQueue(self.Qwaiting, lead)
|
||||||
|
|
||||||
|
if self:_InQueue(self.Qmarshal, lead.group) then
|
||||||
|
-- Remove flight from Marshal queue and add to pattern.
|
||||||
|
self:_RemoveFlightFromMarshalQueue(lead)
|
||||||
|
else
|
||||||
|
-- Add flight to pattern if he was not.
|
||||||
|
if not self:_InQueue(self.Qpattern, lead.group) then
|
||||||
|
self:_AddFlightToPatternQueue(lead)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
-- Flight group is not in air.
|
||||||
text=string.format("negative, you are not airborne. Request denied!")
|
text=string.format("negative, you are not airborne. Request denied!")
|
||||||
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@ -15400,7 +15436,6 @@ function AIRBOSS:_RequestEmergency(_unitName)
|
|||||||
self:_RemoveFlightFromQueue(self.Qspinning, sectionmember)
|
self:_RemoveFlightFromQueue(self.Qspinning, sectionmember)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Remove flight from waiting queue just in case.
|
-- Remove flight from waiting queue just in case.
|
||||||
self:_RemoveFlightFromQueue(self.Qwaiting, lead)
|
self:_RemoveFlightFromQueue(self.Qwaiting, lead)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user