Pre release

This commit is contained in:
FlightControl
2017-06-26 20:35:28 +02:00
parent 4a7f8b869d
commit 572d1f2902

View File

@@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' ) env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170625_0742' ) env.info( 'Moose Generation Timestamp: 20170626_2035' )
--- Various routines --- Various routines
-- @module routines -- @module routines
@@ -23762,6 +23762,8 @@ function SCORING:New( GameName )
-- Default penalty when a player changes coalition. -- Default penalty when a player changes coalition.
self:SetCoalitionChangePenalty( self.ScaleDestroyPenalty ) self:SetCoalitionChangePenalty( self.ScaleDestroyPenalty )
self:SetDisplayDisplayMessagePrefix( "Score: " )
-- Event handlers -- Event handlers
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash ) self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash ) self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
@@ -23776,15 +23778,23 @@ function SCORING:New( GameName )
end end
--- Set a prefix string that will be displayed at each scoring message sent.
-- @param #SCORING self
-- @param #string DisplayMessagePrefix (Default="Scoring: ") The scoring prefix string.
-- @return #SCORING
function SCORING:SetDisplayDisplayMessagePrefix( DisplayMessagePrefix )
self.DisplayDisplayMessagePrefix = DisplayDisplayMessagePrefix or "Scoring: "
return self
end
--- Set the scale for scoring valid destroys (enemy destroys). --- Set the scale for scoring valid destroys (enemy destroys).
-- A default calculated score is a value between 1 and 10. -- A default calculated score is a value between 1 and 10.
-- The scale magnifies the scores given to the players. -- The scale magnifies the scores given to the players.
-- @param #SCORING self -- @param #SCORING self
-- @param #number Scale The scale of the score given. -- @param #number Scale The scale of the score given.
function SCORING:SetScaleDestroyScore( Scale ) function SCORING:SetScaleDestroyScore( Scale )
self.ScaleDestroyScore = Scale self.ScaleDestroyScore = Scale
return self return self
end end
@@ -24087,7 +24097,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
if self.Players[PlayerName].UnitCoalition ~= UnitCoalition then if self.Players[PlayerName].UnitCoalition ~= UnitCoalition then
self.Players[PlayerName].Penalty = self.Players[PlayerName].Penalty + 50 self.Players[PlayerName].Penalty = self.Players[PlayerName].Penalty + 50
self.Players[PlayerName].PenaltyCoalition = self.Players[PlayerName].PenaltyCoalition + 1 self.Players[PlayerName].PenaltyCoalition = self.Players[PlayerName].PenaltyCoalition + 1
MESSAGE:New( "Player '" .. PlayerName .. "' changed coalition from " .. _SCORINGCoalition[self.Players[PlayerName].UnitCoalition] .. " to " .. _SCORINGCoalition[UnitCoalition] .. MESSAGE:New( self.DisplayDisplayMessagePrefix .. "Player '" .. PlayerName .. "' changed coalition from " .. _SCORINGCoalition[self.Players[PlayerName].UnitCoalition] .. " to " .. _SCORINGCoalition[UnitCoalition] ..
"(changed " .. self.Players[PlayerName].PenaltyCoalition .. " times the coalition). 50 Penalty points added.", "(changed " .. self.Players[PlayerName].PenaltyCoalition .. " times the coalition). 50 Penalty points added.",
2 2
):ToAll() ):ToAll()
@@ -24105,7 +24115,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
if self.Players[PlayerName].Penalty > self.Fratricide * 0.50 then if self.Players[PlayerName].Penalty > self.Fratricide * 0.50 then
if self.Players[PlayerName].PenaltyWarning < 1 then if self.Players[PlayerName].PenaltyWarning < 1 then
MESSAGE:New( "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than " .. self.Fratricide .. ", you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty, MESSAGE:New( self.DisplayDisplayMessagePrefix .. "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than " .. self.Fratricide .. ", you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty,
30 30
):ToAll() ):ToAll()
self.Players[PlayerName].PenaltyWarning = self.Players[PlayerName].PenaltyWarning + 1 self.Players[PlayerName].PenaltyWarning = self.Players[PlayerName].PenaltyWarning + 1
@@ -24114,7 +24124,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
if self.Players[PlayerName].Penalty > self.Fratricide then if self.Players[PlayerName].Penalty > self.Fratricide then
--UnitData:Destroy() --UnitData:Destroy()
MESSAGE:New( "Player '" .. PlayerName .. "' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!", MESSAGE:New( self.DisplayDisplayMessagePrefix .. "Player '" .. PlayerName .. "' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!",
10 10
):ToAll() ):ToAll()
end end
@@ -24147,7 +24157,7 @@ function SCORING:AddGoalScore( PlayerUnit, GoalTag, Text, Score )
PlayerData.Goals[GoalTag].Score = PlayerData.Goals[GoalTag].Score + Score PlayerData.Goals[GoalTag].Score = PlayerData.Goals[GoalTag].Score + Score
PlayerData.Score = PlayerData.Score + Score PlayerData.Score = PlayerData.Score + Score
MESSAGE:New( Text, 30 ):ToAll() MESSAGE:New( self.DisplayDisplayMessagePrefix .. Text, 30 ):ToAll()
self:ScoreCSV( PlayerName, "", "GOAL_" .. string.upper( GoalTag ), 1, Score, PlayerUnit:GetName() ) self:ScoreCSV( PlayerName, "", "GOAL_" .. string.upper( GoalTag ), 1, Score, PlayerUnit:GetName() )
end end
@@ -24183,7 +24193,7 @@ function SCORING:_AddMissionTaskScore( Mission, PlayerUnit, Text, Score )
PlayerData.Score = self.Players[PlayerName].Score + Score PlayerData.Score = self.Players[PlayerName].Score + Score
PlayerData.Mission[MissionName].ScoreTask = self.Players[PlayerName].Mission[MissionName].ScoreTask + Score PlayerData.Mission[MissionName].ScoreTask = self.Players[PlayerName].Mission[MissionName].ScoreTask + Score
MESSAGE:New( MissionName .. " : " .. Text .. " Score: " .. Score, 30 ):ToAll() MESSAGE:New( self.DisplayDisplayMessagePrefix .. MissionName .. " : " .. Text .. " Score: " .. Score, 30 ):ToAll()
self:ScoreCSV( PlayerName, "", "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score, PlayerUnit:GetName() ) self:ScoreCSV( PlayerName, "", "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score, PlayerUnit:GetName() )
end end
@@ -24211,7 +24221,7 @@ function SCORING:_AddMissionScore( Mission, Text, Score )
PlayerData.Score = PlayerData.Score + Score PlayerData.Score = PlayerData.Score + Score
PlayerData.Mission[MissionName].ScoreMission = PlayerData.Mission[MissionName].ScoreMission + Score PlayerData.Mission[MissionName].ScoreMission = PlayerData.Mission[MissionName].ScoreMission + Score
MESSAGE:New( "Player '" .. PlayerName .. "' has " .. Text .. " in Mission '" .. MissionName .. "'. " .. MESSAGE:New( self.DisplayDisplayMessagePrefix .. "Player '" .. PlayerName .. "' has " .. Text .. " in Mission '" .. MissionName .. "'. " ..
Score .. " mission score!", Score .. " mission score!",
60 ):ToAll() 60 ):ToAll()
@@ -24381,7 +24391,7 @@ function SCORING:_EventOnHit( Event )
if TargetPlayerName ~= nil then -- It is a player hitting another player ... if TargetPlayerName ~= nil then -- It is a player hitting another player ...
MESSAGE MESSAGE
:New( "Player '" .. InitPlayerName .. "' hit friendly player '" .. TargetPlayerName .. "' " .. :New( self.DisplayDisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit friendly player '" .. TargetPlayerName .. "' " ..
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " ..
"Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty, "Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
2 2
@@ -24390,7 +24400,7 @@ function SCORING:_EventOnHit( Event )
:ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() ) :ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
else else
MESSAGE MESSAGE
:New( "Player '" .. InitPlayerName .. "' hit a friendly target " .. :New( self.DisplayDisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit a friendly target " ..
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " ..
"Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty, "Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
2 2
@@ -24405,7 +24415,7 @@ function SCORING:_EventOnHit( Event )
PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1 PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1
if TargetPlayerName ~= nil then -- It is a player hitting another player ... if TargetPlayerName ~= nil then -- It is a player hitting another player ...
MESSAGE MESSAGE
:New( "Player '" .. InitPlayerName .. "' hit enemy player '" .. TargetPlayerName .. "' " .. :New( self.DisplayDisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit enemy player '" .. TargetPlayerName .. "' " ..
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " ..
"Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty, "Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty,
2 2
@@ -24414,7 +24424,7 @@ function SCORING:_EventOnHit( Event )
:ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() ) :ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
else else
MESSAGE MESSAGE
:New( "Player '" .. InitPlayerName .. "' hit an enemy target " .. :New( self.DisplayDisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit an enemy target " ..
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " ..
"Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty, "Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty,
2 2
@@ -24426,7 +24436,7 @@ function SCORING:_EventOnHit( Event )
end end
else -- A scenery object was hit. else -- A scenery object was hit.
MESSAGE MESSAGE
:New( "Player '" .. InitPlayerName .. "' hit a scenery object.", :New( self.DisplayDisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit a scenery object.",
2 2
) )
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() ) :ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
@@ -24487,7 +24497,7 @@ function SCORING:_EventOnHit( Event )
PlayerHit.PenaltyHit = PlayerHit.PenaltyHit + 1 PlayerHit.PenaltyHit = PlayerHit.PenaltyHit + 1
MESSAGE MESSAGE
:New( "Player '" .. Event.WeaponPlayerName .. "' hit a friendly target " .. :New( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit a friendly target " ..
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " ..
"Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty, "Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
2 2
@@ -24500,7 +24510,7 @@ function SCORING:_EventOnHit( Event )
PlayerHit.Score = PlayerHit.Score + 1 PlayerHit.Score = PlayerHit.Score + 1
PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1 PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1
MESSAGE MESSAGE
:New( "Player '" .. Event.WeaponPlayerName .. "' hit an enemy target " .. :New( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit an enemy target " ..
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " ..
"Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty, "Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty,
2 2
@@ -24511,7 +24521,7 @@ function SCORING:_EventOnHit( Event )
end end
else -- A scenery object was hit. else -- A scenery object was hit.
MESSAGE MESSAGE
:New( "Player '" .. Event.WeaponPlayerName .. "' hit a scenery object.", :New( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit a scenery object.",
2 2
) )
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() ) :ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
@@ -24610,7 +24620,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player
MESSAGE MESSAGE
:New( "Player '" .. PlayerName .. "' destroyed friendly player '" .. TargetPlayerName .. "' " .. :New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed friendly player '" .. TargetPlayerName .. "' " ..
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.PenaltyDestroy .. " times. " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.PenaltyDestroy .. " times. " ..
"Penalty: -" .. TargetDestroy.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty, "Penalty: -" .. TargetDestroy.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
15 15
@@ -24619,7 +24629,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() ) :ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
else else
MESSAGE MESSAGE
:New( "Player '" .. PlayerName .. "' destroyed a friendly target " .. :New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed a friendly target " ..
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.PenaltyDestroy .. " times. " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.PenaltyDestroy .. " times. " ..
"Penalty: -" .. TargetDestroy.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty, "Penalty: -" .. TargetDestroy.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
15 15
@@ -24644,7 +24654,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
TargetDestroy.ScoreDestroy = TargetDestroy.ScoreDestroy + 1 TargetDestroy.ScoreDestroy = TargetDestroy.ScoreDestroy + 1
if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player
MESSAGE MESSAGE
:New( "Player '" .. PlayerName .. "' destroyed enemy player '" .. TargetPlayerName .. "' " .. :New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed enemy player '" .. TargetPlayerName .. "' " ..
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.ScoreDestroy .. " times. " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.ScoreDestroy .. " times. " ..
"Score: " .. TargetDestroy.Score .. ". Score Total:" .. Player.Score - Player.Penalty, "Score: " .. TargetDestroy.Score .. ". Score Total:" .. Player.Score - Player.Penalty,
15 15
@@ -24653,7 +24663,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() ) :ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
else else
MESSAGE MESSAGE
:New( "Player '" .. PlayerName .. "' destroyed an enemy " .. :New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed an enemy " ..
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.ScoreDestroy .. " times. " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.ScoreDestroy .. " times. " ..
"Score: " .. TargetDestroy.Score .. ". Total:" .. Player.Score - Player.Penalty, "Score: " .. TargetDestroy.Score .. ". Total:" .. Player.Score - Player.Penalty,
15 15
@@ -24670,7 +24680,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
Player.Score = Player.Score + Score Player.Score = Player.Score + Score
TargetDestroy.Score = TargetDestroy.Score + Score TargetDestroy.Score = TargetDestroy.Score + Score
MESSAGE MESSAGE
:New( "Special target '" .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. " destroyed! " .. :New( self.DisplayMessagePrefix .. "Special target '" .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. " destroyed! " ..
"Player '" .. PlayerName .. "' receives an extra " .. Score .. " points! Total: " .. Player.Score - Player.Penalty, "Player '" .. PlayerName .. "' receives an extra " .. Score .. " points! Total: " .. Player.Score - Player.Penalty,
15 15
) )
@@ -24689,7 +24699,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
Player.Score = Player.Score + Score Player.Score = Player.Score + Score
TargetDestroy.Score = TargetDestroy.Score + Score TargetDestroy.Score = TargetDestroy.Score + Score
MESSAGE MESSAGE
:New( "Target destroyed in zone '" .. ScoreZone:GetName() .. "'." .. :New( self.DisplayMessagePrefix .. "Target destroyed in zone '" .. ScoreZone:GetName() .. "'." ..
"Player '" .. PlayerName .. "' receives an extra " .. Score .. " points! " .. "Player '" .. PlayerName .. "' receives an extra " .. Score .. " points! " ..
"Total: " .. Player.Score - Player.Penalty, "Total: " .. Player.Score - Player.Penalty,
15 ) 15 )
@@ -24711,7 +24721,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
Player.Score = Player.Score + Score Player.Score = Player.Score + Score
TargetDestroy.Score = TargetDestroy.Score + Score TargetDestroy.Score = TargetDestroy.Score + Score
MESSAGE MESSAGE
:New( "Scenery destroyed in zone '" .. ScoreZone:GetName() .. "'." .. :New( self.DisplayMessagePrefix .. "Scenery destroyed in zone '" .. ScoreZone:GetName() .. "'." ..
"Player '" .. PlayerName .. "' receives an extra " .. Score .. " points! " .. "Player '" .. PlayerName .. "' receives an extra " .. Score .. " points! " ..
"Total: " .. Player.Score - Player.Penalty, "Total: " .. Player.Score - Player.Penalty,
15 15
@@ -45229,10 +45239,9 @@ function MISSION:ReportBriefing()
local Name = self:GetName() local Name = self:GetName()
-- Determine the status of the mission. -- Determine the status of the mission.
local Status = self:GetState() local Status = "<" .. self:GetState() .. ">"
local TasksRemaining = self:GetTasksRemaining()
Report:Add( "Mission " .. Name .. " - " .. Status .. " - Briefing Report." ) Report:Add( string.format( '%s - %s - Mission Briefing Report', Name, Status ) )
Report:Add( self.MissionBriefing ) Report:Add( self.MissionBriefing )
@@ -45263,8 +45272,7 @@ function MISSION:ReportStatus()
local Name = self:GetName() local Name = self:GetName()
-- Determine the status of the mission. -- Determine the status of the mission.
local Status = self:GetState() local Status = "<" .. self:GetState() .. ">"
local TasksRemaining = self:GetTasksRemaining()
Report:Add( string.format( '%s - Status "%s"', Name, Status ) ) Report:Add( string.format( '%s - Status "%s"', Name, Status ) )
@@ -45312,7 +45320,7 @@ function MISSION:ReportPlayersPerTask( ReportGroup )
local Name = self:GetName() local Name = self:GetName()
-- Determine the status of the mission. -- Determine the status of the mission.
local Status = self:GetState() local Status = "<" .. self:GetState() .. ">"
Report:Add( string.format( '%s - %s - Players per Task Report', Name, Status ) ) Report:Add( string.format( '%s - %s - Players per Task Report', Name, Status ) )
@@ -45353,7 +45361,7 @@ function MISSION:ReportPlayersProgress( ReportGroup )
local Name = self:GetName() local Name = self:GetName()
-- Determine the status of the mission. -- Determine the status of the mission.
local Status = self:GetState() local Status = "<" .. self:GetState() .. ">"
Report:Add( string.format( '%s - %s - Players per Task Progress Report', Name, Status ) ) Report:Add( string.format( '%s - %s - Players per Task Progress Report', Name, Status ) )
@@ -45397,7 +45405,7 @@ function MISSION:ReportSummary()
local Name = self:GetName() local Name = self:GetName()
-- Determine the status of the mission. -- Determine the status of the mission.
local Status = self:GetState() local Status = "<" .. self:GetState() .. ">"
Report:Add( string.format( '%s - %s - Task Overview Report', Name, Status ) ) Report:Add( string.format( '%s - %s - Task Overview Report', Name, Status ) )
@@ -45421,7 +45429,7 @@ function MISSION:ReportOverview( ReportGroup, TaskStatus )
local Name = self:GetName() local Name = self:GetName()
-- Determine the status of the mission. -- Determine the status of the mission.
local Status = self:GetState() local Status = "<" .. self:GetState() .. ">"
Report:Add( string.format( '%s - %s - %s Tasks Report', Name, Status, TaskStatus ) ) Report:Add( string.format( '%s - %s - %s Tasks Report', Name, Status, TaskStatus ) )
@@ -45448,7 +45456,7 @@ function MISSION:ReportDetails( ReportGroup )
local Name = self:GetName() local Name = self:GetName()
-- Determine the status of the mission. -- Determine the status of the mission.
local Status = self:GetState() local Status = "<" .. self:GetState() .. ">"
Report:Add( string.format( '%s - %s - Task Detailed Report', Name, Status ) ) Report:Add( string.format( '%s - %s - Task Detailed Report', Name, Status ) )
@@ -45473,6 +45481,9 @@ function MISSION:GetTasks()
return self.Tasks return self.Tasks
end end
--- Reports the briefing.
-- @param #MISSION self
-- @param Wrapper.Group#GROUP ReportGroup The group to which the report needs to be sent.
function MISSION:MenuReportBriefing( ReportGroup ) function MISSION:MenuReportBriefing( ReportGroup )
local Report = self:ReportBriefing() local Report = self:ReportBriefing()
@@ -45481,7 +45492,9 @@ function MISSION:MenuReportBriefing( ReportGroup )
end end
--- @param #MISSION self
--- Report the task summary.
-- @param #MISSION self
-- @param Wrapper.Group#GROUP ReportGroup -- @param Wrapper.Group#GROUP ReportGroup
function MISSION:MenuReportTasksSummary( ReportGroup ) function MISSION:MenuReportTasksSummary( ReportGroup )
@@ -45490,6 +45503,9 @@ function MISSION:MenuReportTasksSummary( ReportGroup )
self:GetCommandCenter():MessageToGroup( Report, ReportGroup ) self:GetCommandCenter():MessageToGroup( Report, ReportGroup )
end end
--- @param #MISSION self --- @param #MISSION self
-- @param #string TaskStatus The status -- @param #string TaskStatus The status
-- @param Wrapper.Group#GROUP ReportGroup -- @param Wrapper.Group#GROUP ReportGroup
@@ -46227,9 +46243,11 @@ end
-- @return #TASK -- @return #TASK
function TASK:SetMenuForGroup( TaskGroup, MenuTime ) function TASK:SetMenuForGroup( TaskGroup, MenuTime )
self:SetPlannedMenuForGroup( TaskGroup, MenuTime ) if self:IsStatePlanned() or self:IsStateAssigned() then
if self:IsGroupAssigned( TaskGroup ) then self:SetPlannedMenuForGroup( TaskGroup, MenuTime )
self:SetAssignedMenuForGroup( TaskGroup, MenuTime ) if self:IsGroupAssigned( TaskGroup ) then
self:SetAssignedMenuForGroup( TaskGroup, MenuTime )
end
end end
end end
@@ -46862,9 +46880,9 @@ function TASK:ReportSummary() --R2.1 fixed report. Now nicely formatted and cont
local Name = self:GetName() local Name = self:GetName()
-- Determine the status of the Task. -- Determine the status of the Task.
local State = self:GetState() local Status = "<" .. self:GetState() .. ">"
Report:Add( "Task " .. Name .. " - State '" .. State ) Report:Add( 'Task ' .. Name .. ' - State ' .. Status )
return Report:Text() return Report:Text()
end end
@@ -46881,7 +46899,7 @@ function TASK:ReportOverview( ReportGroup ) --R2.1 fixed report. Now nicely form
local Report = REPORT:New( Name ) local Report = REPORT:New( Name )
-- Determine the status of the Task. -- Determine the status of the Task.
local State = self:GetState() local Status = "<" .. self:GetState() .. ">"
for TaskInfoID, TaskInfo in pairs( self.TaskInfo ) do for TaskInfoID, TaskInfo in pairs( self.TaskInfo ) do
@@ -46959,7 +46977,7 @@ function TASK:ReportDetails( ReportGroup )
local Name = self:GetName() local Name = self:GetName()
-- Determine the status of the Task. -- Determine the status of the Task.
local State = self:GetState() local Status = "<" .. self:GetState() .. ">"
-- Loop each Unit active in the Task, and find Player Names. -- Loop each Unit active in the Task, and find Player Names.
local PlayerNames = self:GetPlayerNames() local PlayerNames = self:GetPlayerNames()
@@ -46970,7 +46988,7 @@ function TASK:ReportDetails( ReportGroup )
end end
local Players = PlayerReport:Text() local Players = PlayerReport:Text()
Report:Add( "Task: " .. Name .. " - " .. State .. " - Detailed Report" ) Report:Add( "Task: " .. Name .. " - " .. Status .. " - Detailed Report" )
Report:Add( " - Players:" ) Report:Add( " - Players:" )
Report:AddIndent( Players ) Report:AddIndent( Players )