mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
OPS
**AUFTRAG** - New type `FAC` **OPSZONE** - Improved drawzone on capture
This commit is contained in:
parent
6d07f7c48c
commit
d9d5458450
@ -642,7 +642,7 @@ AUFTRAG.Category={
|
|||||||
|
|
||||||
--- AUFTRAG class version.
|
--- AUFTRAG class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
AUFTRAG.version="1.1.0"
|
AUFTRAG.version="1.2.0"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO list
|
-- TODO list
|
||||||
@ -1459,9 +1459,9 @@ function AUFTRAG:NewCASENHANCED(CasZone, Altitude, Speed, RangeMax, NoEngageZone
|
|||||||
return mission
|
return mission
|
||||||
end
|
end
|
||||||
|
|
||||||
--- **[AIR]** Create a FAC mission. Group(s) will go to the zone and patrol it randomly and act as FAC for detected units.
|
--- **[AIR, GROUND]** Create a FAC mission. Group(s) will go to the zone and patrol it randomly and act as FAC for detected units.
|
||||||
-- @param #AUFTRAG self
|
-- @param #AUFTRAG self
|
||||||
-- @param Core.Zone#ZONE CasZone The CAS zone.
|
-- @param Core.Zone#ZONE FacZone The FAC zone (or name of zone) where to patrol.
|
||||||
-- @param #number Speed Speed in knots.
|
-- @param #number Speed Speed in knots.
|
||||||
-- @param #number Altitude Altitude in feet. Only for airborne units. Default 2000 feet ASL.
|
-- @param #number Altitude Altitude in feet. Only for airborne units. Default 2000 feet ASL.
|
||||||
-- @param #number Frequency Frequency in MHz.
|
-- @param #number Frequency Frequency in MHz.
|
||||||
@ -1479,6 +1479,9 @@ function AUFTRAG:NewFAC(FacZone, Speed, Altitude, Frequency, Modulation)
|
|||||||
mission:_TargetFromObject(FacZone)
|
mission:_TargetFromObject(FacZone)
|
||||||
|
|
||||||
mission.missionTask=mission:GetMissionTaskforMissionType(AUFTRAG.Type.FAC)
|
mission.missionTask=mission:GetMissionTaskforMissionType(AUFTRAG.Type.FAC)
|
||||||
|
|
||||||
|
mission.facFreq=Frequency or 133
|
||||||
|
mission.facModu=Modulation or radio.modulation.AM
|
||||||
|
|
||||||
mission.optionROE=ENUMS.ROE.ReturnFire
|
mission.optionROE=ENUMS.ROE.ReturnFire
|
||||||
mission.optionROT=ENUMS.ROT.EvadeFire
|
mission.optionROT=ENUMS.ROT.EvadeFire
|
||||||
@ -1488,7 +1491,7 @@ function AUFTRAG:NewFAC(FacZone, Speed, Altitude, Frequency, Modulation)
|
|||||||
mission.missionSpeed=Speed and UTILS.KnotsToKmph(Speed) or nil
|
mission.missionSpeed=Speed and UTILS.KnotsToKmph(Speed) or nil
|
||||||
mission.missionAltitude=Altitude and UTILS.FeetToMeters(Altitude) or nil
|
mission.missionAltitude=Altitude and UTILS.FeetToMeters(Altitude) or nil
|
||||||
|
|
||||||
mission.categories={AUFTRAG.Category.AIRCRAFT}
|
mission.categories={AUFTRAG.Category.AIRCRAFT, AUFTRAG.Category.GROUND}
|
||||||
|
|
||||||
mission.DCStask=mission:GetDCSMissionTask()
|
mission.DCStask=mission:GetDCSMissionTask()
|
||||||
|
|
||||||
|
|||||||
@ -95,7 +95,7 @@ OPSZONE.ZoneType={
|
|||||||
|
|
||||||
--- OPSZONE class version.
|
--- OPSZONE class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
OPSZONE.version="0.5.0"
|
OPSZONE.version="0.6.0"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- ToDo list
|
-- ToDo list
|
||||||
@ -127,7 +127,7 @@ OPSZONE.version="0.5.0"
|
|||||||
--
|
--
|
||||||
function OPSZONE:New(Zone, CoalitionOwner)
|
function OPSZONE:New(Zone, CoalitionOwner)
|
||||||
|
|
||||||
-- Inherit everything from LEGION class.
|
-- Inherit everything from FSM class.
|
||||||
local self=BASE:Inherit(self, FSM:New()) -- #OPSZONE
|
local self=BASE:Inherit(self, FSM:New()) -- #OPSZONE
|
||||||
|
|
||||||
-- Check if zone name instead of ZONE object was passed.
|
-- Check if zone name instead of ZONE object was passed.
|
||||||
@ -817,6 +817,15 @@ function OPSZONE:onafterCaptured(From, Event, To, NewOwnerCoalition)
|
|||||||
-- Set owners.
|
-- Set owners.
|
||||||
self.ownerPrevious=self.ownerCurrent
|
self.ownerPrevious=self.ownerCurrent
|
||||||
self.ownerCurrent=NewOwnerCoalition
|
self.ownerCurrent=NewOwnerCoalition
|
||||||
|
|
||||||
|
if self.drawZone then
|
||||||
|
|
||||||
|
self.zone:UndrawZone()
|
||||||
|
|
||||||
|
local color=self:_GetZoneColor()
|
||||||
|
|
||||||
|
self.zone:DrawZone(nil, color, 1.0, color, 0.5)
|
||||||
|
end
|
||||||
|
|
||||||
for _,_chief in pairs(self.chiefs) do
|
for _,_chief in pairs(self.chiefs) do
|
||||||
local chief=_chief --Ops.Chief#CHIEF
|
local chief=_chief --Ops.Chief#CHIEF
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user