mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Updated stuff in tasking
-- SET improved -- Resolved bug with destroy scoring not granted. -- Implemented LL for all detection reports -- Testing -- Added test mission TAD-220 for DETECTION_TYPES testing.
This commit is contained in:
@@ -36,8 +36,14 @@ function REPORT:Add( Text )
|
||||
return self.Report[#self.Report]
|
||||
end
|
||||
|
||||
function REPORT:Text()
|
||||
return table.concat( self.Report, "\n" )
|
||||
--- Produces the text of the report, taking into account an optional delimeter, which is \n by default.
|
||||
-- @param #REPORT self
|
||||
-- @param #string Delimiter (optional) A delimiter text.
|
||||
-- @return #string The report text.
|
||||
function REPORT:Text( Delimiter )
|
||||
Delimiter = Delimiter or "\n"
|
||||
local ReportText = table.concat( self.Report, Delimiter ) or ""
|
||||
return ReportText
|
||||
end
|
||||
|
||||
--- The COMMANDCENTER class
|
||||
|
||||
@@ -983,11 +983,12 @@ end
|
||||
-- @param #string To
|
||||
function TASK:onenterAssigned( From, Event, To, PlayerUnit, PlayerName )
|
||||
|
||||
self:E("Task Assigned")
|
||||
self:E( { "Task Assigned", self.Dispatcher } )
|
||||
|
||||
self:MessageToGroups( "Task " .. self:GetName() .. " has been assigned to your group." )
|
||||
|
||||
if self.Dispatcher then
|
||||
self:E( "Firing Assign event " )
|
||||
self.Dispatcher:Assign( self, PlayerUnit, PlayerName )
|
||||
end
|
||||
|
||||
|
||||
@@ -308,6 +308,7 @@ do -- TASK_A2G
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_A2G
|
||||
function TASK_A2G:SetScoreOnDestroy( Text, Score, TaskUnit )
|
||||
self:F( { Text, Score, TaskUnit } )
|
||||
|
||||
local ProcessUnit = self:GetUnitProcess( TaskUnit )
|
||||
|
||||
@@ -323,6 +324,7 @@ do -- TASK_A2G
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_A2G
|
||||
function TASK_A2G:SetScoreOnSuccess( Text, Score, TaskUnit )
|
||||
self:F( { Text, Score, TaskUnit } )
|
||||
|
||||
local ProcessUnit = self:GetUnitProcess( TaskUnit )
|
||||
|
||||
@@ -338,6 +340,7 @@ do -- TASK_A2G
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_A2G
|
||||
function TASK_A2G:SetPenaltyOnFailed( Text, Penalty, TaskUnit )
|
||||
self:F( { Text, Score, TaskUnit } )
|
||||
|
||||
local ProcessUnit = self:GetUnitProcess( TaskUnit )
|
||||
|
||||
|
||||
@@ -206,9 +206,9 @@ do -- TASK_A2G_DISPATCHER
|
||||
local ChangeMsg = {}
|
||||
|
||||
local Mission = self.Mission
|
||||
local ReportSEAD = REPORT:New( " - SEAD Tasks:")
|
||||
local ReportCAS = REPORT:New( " - CAS Tasks:")
|
||||
local ReportBAI = REPORT:New( " - BAI Tasks:")
|
||||
local ReportSEAD = REPORT:New( "- SEAD Tasks:")
|
||||
local ReportCAS = REPORT:New( "- CAS Tasks:")
|
||||
local ReportBAI = REPORT:New( "- BAI Tasks:")
|
||||
local ReportChanges = REPORT:New( " - Changes:" )
|
||||
|
||||
--- First we need to the detected targets.
|
||||
@@ -289,7 +289,7 @@ do -- TASK_A2G_DISPATCHER
|
||||
Mission:GetCommandCenter():MessageToGroup(
|
||||
string.format( "HQ Reporting - Planned tasks for mission '%s':\n%s\n",
|
||||
self.Mission:GetName(),
|
||||
string.format( "%s\n%s\n%s\n%s", ReportSEAD:Text(), ReportCAS:Text(), ReportBAI:Text(), ReportChanges:Text()
|
||||
string.format( "%s\n\n%s\n\n%s\n\n%s", ReportSEAD:Text(), ReportCAS:Text(), ReportBAI:Text(), ReportChanges:Text()
|
||||
)
|
||||
), TaskGroup
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user