mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Work in progress
- problem with UNIT tables... Unit not alive... Need to fix CLIENTs... CLIENTs need to be copied into UNITs...
This commit is contained in:
parent
8cda04be45
commit
2582e7a90a
@ -155,6 +155,13 @@ function COMMANDCENTER:HasGroup( MissionGroup )
|
||||
return Has
|
||||
end
|
||||
|
||||
--- Send a CC message to a GROUP.
|
||||
-- @param #COMMANDCENTER self
|
||||
function COMMANDCENTER:MessageToGroup( Message, TaskGroup )
|
||||
|
||||
self:GetPositionable():MessageToGroup( Message , 20, TaskGroup )
|
||||
|
||||
end
|
||||
|
||||
--- Report the status of all MISSIONs to a GROUP.
|
||||
-- @param #COMMANDCENTER self
|
||||
@ -172,3 +179,19 @@ function COMMANDCENTER:ReportMissions( ReportGroup )
|
||||
|
||||
end
|
||||
|
||||
--- Report the status of a Task to a Group.
|
||||
-- @param #COMMANDCENTER self
|
||||
function COMMANDCENTER:ReportTaskStatus( ReportGroup, Task )
|
||||
self:E( ReportGroup )
|
||||
|
||||
local Report = REPORT:New()
|
||||
|
||||
for MissionID, Mission in pairs( self.Missions ) do
|
||||
local Mission = Mission -- Tasking.Mission#MISSION
|
||||
Report:Add( " - " .. Mission:ReportStatus() )
|
||||
end
|
||||
|
||||
self:GetPositionable():MessageToGroup( Report:Text(), 30, ReportGroup )
|
||||
|
||||
end
|
||||
|
||||
|
||||
@ -81,6 +81,7 @@ function TASK_BASE:New( Mission, SetGroupAssign, TaskName, TaskType )
|
||||
|
||||
self:SetStartState( "Planned" )
|
||||
self:AddTransition( "Planned", "Assign", "Assigned" )
|
||||
self:AddTransition( "Assigned", "AssignUnit", "Assigned" )
|
||||
self:AddTransition( "Assigned", "Success", "Success" )
|
||||
self:AddTransition( "Assigned", "Fail", "Failed" )
|
||||
self:AddTransition( "Assigned", "Abort", "Aborted" )
|
||||
@ -109,16 +110,17 @@ function TASK_BASE:New( Mission, SetGroupAssign, TaskName, TaskType )
|
||||
--- @param #TASK_BASE self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function( self, EventData )
|
||||
self:E( "In EnterUnit" )
|
||||
self:E( EventData )
|
||||
self:E( { "State", self:GetState() } )
|
||||
if self:IsStateAssigned() then
|
||||
local TaskUnit = EventData.IniUnit
|
||||
local TaskUnit = EventData.IniDCSUnit
|
||||
local TaskGroup = EventData.IniUnit:GetGroup()
|
||||
self:__AssignUnit( 1, TaskUnit )
|
||||
if self:IsStateAssigned() then
|
||||
self:E( self.SetGroup:IsIncludeObject( TaskGroup ) )
|
||||
if self.SetGroup:IsIncludeObject( TaskGroup ) then
|
||||
self:AssignToUnit( TaskUnit )
|
||||
end
|
||||
end
|
||||
self:MessageToGroups( TaskUnit:GetPlayerName() .. " joined Task " .. self:GetName() )
|
||||
end
|
||||
)
|
||||
|
||||
@ -138,6 +140,7 @@ function TASK_BASE:New( Mission, SetGroupAssign, TaskName, TaskType )
|
||||
if self.SetGroup:IsIncludeObject( TaskGroup ) then
|
||||
self:UnAssignFromUnit( TaskUnit )
|
||||
end
|
||||
self:MessageToGroups( TaskUnit:GetPlayerName() .. " aborted Task " .. self:GetName() )
|
||||
end
|
||||
end
|
||||
)
|
||||
@ -158,6 +161,7 @@ function TASK_BASE:New( Mission, SetGroupAssign, TaskName, TaskType )
|
||||
if self.SetGroup:IsIncludeObject( TaskGroup ) then
|
||||
self:UnAssignFromUnit( TaskUnit )
|
||||
end
|
||||
self:MessageToGroups( TaskUnit:GetPlayerName() .. " crashed!, and has aborted Task " .. self:GetName() )
|
||||
end
|
||||
end
|
||||
)
|
||||
@ -276,7 +280,17 @@ function TASK_BASE:UnAssignFromUnit( TaskUnit )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Send a message of the @{Task} to the assigned @{Group}s.
|
||||
-- @param #TASK_BASE self
|
||||
function TASK_BASE:MessageToGroups( Message )
|
||||
|
||||
local Mission = self:GetMission()
|
||||
local CC = Mission:GetCommandCenter()
|
||||
|
||||
for TaskGroupName, TaskGroup in pairs( self.SetGroup:GetSet() ) do
|
||||
CC:MessageToGroup( Message , 60, TaskGroup )
|
||||
end
|
||||
end
|
||||
|
||||
--- Send the briefng message of the @{Task} to the assigned @{Group}s.
|
||||
-- @param #TASK_BASE self
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20161209_1052' )
|
||||
env.info( 'Moose Generation Timestamp: 20161209_1413' )
|
||||
|
||||
local base = _G
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20161209_1052' )
|
||||
env.info( 'Moose Generation Timestamp: 20161209_1413' )
|
||||
|
||||
local base = _G
|
||||
|
||||
|
||||
@ -83,18 +83,18 @@ COPY /b Moose.lua + %1\Fsm\Process.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\Process_JTAC.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\Patrol.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\Cargo.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\FsmTAssign.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\FsmTRoute.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\FsmTAccount.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\FsmTSmoke.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\FsmAssign.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\FsmRoute.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\FsmAccount.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Fsm\FsmSmoke.lua Moose.lua
|
||||
|
||||
rem Task Handling Classes
|
||||
COPY /b Moose.lua + %1\Tasking\CommandCenter.lua Moose.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Mission.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Task.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\DetectionManager.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Task_SEAD.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Task_A2G.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Tasking\CommandCenter.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Tasking\Mission.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Tasking\Task.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Tasking\DetectionManager.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Tasking\Task_SEAD.lua Moose.lua
|
||||
COPY /b Moose.lua + %1\Tasking\Task_A2G.lua Moose.lua
|
||||
|
||||
COPY /b Moose.lua + %1\Moose.lua Moose.lua
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user