mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Abort working now as it should... fiew... what a work was that ...
This commit is contained in:
parent
c966929933
commit
7f7570429a
@ -200,6 +200,14 @@ function COMMANDCENTER:MessageToGroup( Message, TaskGroup )
|
||||
|
||||
end
|
||||
|
||||
--- Send a CC message to the coalition of the CC.
|
||||
-- @param #COMMANDCENTER self
|
||||
function COMMANDCENTER:MessageToCoalition( Message )
|
||||
|
||||
local CCCoalition = self:GetPositionable():GetCoalition()
|
||||
self:GetPositionable():MessageToBlue( Message , 20, CCCoalition )
|
||||
|
||||
end
|
||||
--- Report the status of all MISSIONs to a GROUP.
|
||||
-- @param #COMMANDCENTER self
|
||||
function COMMANDCENTER:ReportMissions( ReportGroup )
|
||||
|
||||
@ -218,8 +218,8 @@ function TASK_BASE:AbortUnit( PlayerUnit )
|
||||
if IsAssignedToGroup then
|
||||
self:UnAssignFromUnit( PlayerUnit )
|
||||
self:MessageToGroups( PlayerUnit:GetPlayerName() .. " aborted Task " .. self:GetName() )
|
||||
self:E( { TaskGroup = PlayerGroup:GetName(), HasAliveUnits = self:HasAliveUnits() } )
|
||||
if self:HasAliveUnits() == false then
|
||||
self:E( { TaskGroup = PlayerGroup:GetName(), GetUnits = PlayerGroup:GetUnits() } )
|
||||
if #PlayerGroup:GetUnits() == 1 then
|
||||
PlayerGroup:SetState( PlayerGroup, "Assigned", nil )
|
||||
self:RemoveMenuForGroup( PlayerGroup )
|
||||
self:__Abort( 1 )
|
||||
@ -837,7 +837,10 @@ function TASK_BASE:onenterAborted( Event, From, To )
|
||||
|
||||
self:E("Aborted")
|
||||
|
||||
self:MessageToGroups( "Task " .. self:GetName() .. " has been aborted! Task will be replanned." )
|
||||
self:GetMission():GetCommandCenter():MessageToCoalition( "Task " .. self:GetName() .. " has been aborted! Task will be replanned." )
|
||||
|
||||
self:__Replan( 10 )
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
@ -307,6 +307,23 @@ function POSITIONABLE:MessageToAll( Message, Duration )
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Send a message to a coalition.
|
||||
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param #string Message The message text
|
||||
-- @param Dcs.DCSTYpes#Duration Duration The duration of the message.
|
||||
function POSITIONABLE:MessageToCoalition( Message, Duration, MessageCoalition )
|
||||
self:F2( { Message, Duration } )
|
||||
|
||||
local DCSObject = self:GetDCSObject()
|
||||
if DCSObject then
|
||||
self:GetMessage( Message, Duration ):ToCoalition( MessageCoalition )
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- Send a message to the red coalition.
|
||||
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
|
||||
-- @param #POSITIONABLE self
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user