mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Progress
This commit is contained in:
@@ -12,9 +12,32 @@ do -- AI_DESIGNATE
|
|||||||
--- @type AI_DESIGNATE
|
--- @type AI_DESIGNATE
|
||||||
-- @extends Core.Fsm#FSM_PROCESS
|
-- @extends Core.Fsm#FSM_PROCESS
|
||||||
|
|
||||||
---
|
--- # AI_DESIGNATE class, extends @{Fsm#FSM}
|
||||||
--
|
--
|
||||||
-- @field #AI_DESIGNATE AI_DESIGNATE
|
-- AI_DESIGNATE is orchestrating the designation of potential targets, and communicate these to a dedicated attacking group
|
||||||
|
-- of players, so that following a dynamically generated menu system, each detected set of potential targets can be lased or smoked...
|
||||||
|
--
|
||||||
|
-- ## 1. AI_DESIGNATE constructor
|
||||||
|
--
|
||||||
|
-- * @{#AI_DESIGNATE.New}(): Creates a new AI_DESIGNATE object.
|
||||||
|
--
|
||||||
|
-- ## 2. AI_DESIGNATE is a FSM
|
||||||
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- ### 2.1 AI_DESIGNATE States
|
||||||
|
--
|
||||||
|
-- * **Designating** ( Group ): The process is not started yet.
|
||||||
|
--
|
||||||
|
-- ### 2.2 AI_DESIGNATE Events
|
||||||
|
--
|
||||||
|
-- * **@{#AI_DESIGNATE.Detect}**: Detect targets.
|
||||||
|
-- * **@{#AI_DESIGNATE.LaseOn}**: Lase the targets with the specified Index.
|
||||||
|
-- * **@{#AI_DESIGNATE.LaseOff}**: Stop lasing the targets with the specified Index.
|
||||||
|
-- * **@{#AI_DESIGNATE.Smoke}**: Smoke the targets with the specified Index.
|
||||||
|
-- * **@{#AI_DESIGNATE.}Status**: Report designation status.
|
||||||
|
--
|
||||||
|
-- @field #AI_DESIGNATE
|
||||||
--
|
--
|
||||||
AI_DESIGNATE = {
|
AI_DESIGNATE = {
|
||||||
ClassName = "AI_DESIGNATE",
|
ClassName = "AI_DESIGNATE",
|
||||||
@@ -176,9 +199,10 @@ do -- AI_DESIGNATE
|
|||||||
--if math.random( 1, ( 100 * TargetSetUnit:Count() ) / 100 ) <= 100 then
|
--if math.random( 1, ( 100 * TargetSetUnit:Count() ) / 100 ) <= 100 then
|
||||||
if SmokeUnit:IsAlive() then
|
if SmokeUnit:IsAlive() then
|
||||||
local NearestRecceGroup = self.RecceSet:FindNearestGroupFromPointVec2(SmokeUnit:GetPointVec2())
|
local NearestRecceGroup = self.RecceSet:FindNearestGroupFromPointVec2(SmokeUnit:GetPointVec2())
|
||||||
local NearestRecceUnit = NearestRecceGroup:GetUnit(1)
|
if NearestRecceGroup then
|
||||||
self:E( { NearestRecceUnit = NearestRecceUnit } )
|
local NearestRecceUnit = NearestRecceGroup:GetUnit(1)
|
||||||
self.Spots[Index] = NearestRecceUnit:LaseUnitOn( SmokeUnit, nil, Duration )
|
self.Spots[Index] = NearestRecceUnit:LaseUnitOn( SmokeUnit, nil, Duration )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
--end
|
--end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- **Core** -- Management of SPOT logistics, that can be transported from and to transportation carriers.
|
--- **Core (Release 2.1)** -- Management of SPOT logistics, that can be transported from and to transportation carriers.
|
||||||
--
|
--
|
||||||
-- 
|
-- 
|
||||||
--
|
--
|
||||||
@@ -76,7 +76,7 @@ do
|
|||||||
local RecceDcsUnit = self.Recce:GetDCSObject()
|
local RecceDcsUnit = self.Recce:GetDCSObject()
|
||||||
local TargetVec3 = PointVec3:GetVec3()
|
local TargetVec3 = PointVec3:GetVec3()
|
||||||
self:E("lasing")
|
self:E("lasing")
|
||||||
self.Spot = Spot.createInfraRed( RecceDcsUnit, { x = 0, y = 1, z = 0 }, TargetVec3, LaserCode )
|
self.Spot = Spot.createInfraRed( RecceDcsUnit, { x = 0, y = 2, z = 0 }, TargetVec3, LaserCode )
|
||||||
if Duration then
|
if Duration then
|
||||||
self.ScheduleID = self.LaseScheduler:Schedule( self, StopLase, {self}, Duration )
|
self.ScheduleID = self.LaseScheduler:Schedule( self, StopLase, {self}, Duration )
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -309,12 +309,12 @@ do -- DETECTION_BASE
|
|||||||
|
|
||||||
self.DetectionInterval = 30
|
self.DetectionInterval = 30
|
||||||
|
|
||||||
self:InitDetectVisual( true )
|
self:InitDetectVisual( false )
|
||||||
self:InitDetectOptical( true )
|
self:InitDetectOptical( false )
|
||||||
self:InitDetectRadar( true )
|
self:InitDetectRadar( false )
|
||||||
self:InitDetectRWR( true )
|
self:InitDetectRWR( false )
|
||||||
self:InitDetectIRST( true )
|
self:InitDetectIRST( false )
|
||||||
self:InitDetectDLINK( true )
|
self:InitDetectDLINK( false )
|
||||||
|
|
||||||
self:FilterCategories( {
|
self:FilterCategories( {
|
||||||
Unit.Category.AIRPLANE,
|
Unit.Category.AIRPLANE,
|
||||||
|
|||||||
@@ -1774,6 +1774,7 @@ function CONTROLLABLE:GetDetectedTargets( DetectVisual, DetectOptical, DetectRad
|
|||||||
local DetectionRWR = ( DetectRWR and DetectRWR == true ) and Controller.Detection.RWR or nil
|
local DetectionRWR = ( DetectRWR and DetectRWR == true ) and Controller.Detection.RWR or nil
|
||||||
local DetectionDLINK = ( DetectDLINK and DetectDLINK == true ) and Controller.Detection.DLINK or nil
|
local DetectionDLINK = ( DetectDLINK and DetectDLINK == true ) and Controller.Detection.DLINK or nil
|
||||||
|
|
||||||
|
self:T( { DetectionVisual, DetectionOptical, DetectionRadar, DetectionIRST, DetectionRWR, DetectionDLINK } )
|
||||||
|
|
||||||
return self:_GetController():getDetectedTargets( DetectionVisual, DetectionOptical, DetectionRadar, DetectionIRST, DetectionRWR, DetectionDLINK )
|
return self:_GetController():getDetectedTargets( DetectionVisual, DetectionOptical, DetectionRadar, DetectionIRST, DetectionRWR, DetectionDLINK )
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||||
env.info( 'Moose Generation Timestamp: 20170419_1613' )
|
env.info( 'Moose Generation Timestamp: 20170419_1913' )
|
||||||
|
|
||||||
local base = _G
|
local base = _G
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user