-- when carrier containing cargo goes to spectators, it was not handled
correctly. now it is
-- removed "unassigned" message when task is cancelled from group. It is
useless.
This commit is contained in:
FlightControl 2017-07-08 12:40:56 +02:00
parent 85975c01a4
commit 388103afea
2 changed files with 6 additions and 4 deletions

View File

@ -1092,7 +1092,7 @@ function CARGO_GROUP:New( CargoGroup, Type, Name, ReportRadius )
return self
end
--- @param #CARGO Cargo
--- @param #CARGO_GROUP self
-- @param Core.Event#EVENTDATA EventData
function CARGO_GROUP:OnEventCargoDead( EventData )
@ -1109,7 +1109,9 @@ function CARGO_GROUP:OnEventCargoDead( EventData )
end
end
else
if self.CargoCarrier:GetName() == EventData.IniUnitName then
local CarrierName = self.CargoCarrier:GetName()
if CarrierName == EventData.IniDCSUnitName then
MESSAGE:New( "Cargo is lost from carrier " .. CarrierName, 15 ):ToAll()
Destroyed = true
self.CargoCarrier:ClearCargo()
end

View File

@ -479,9 +479,9 @@ do -- Group Assignment
SetAssignedGroups:ForEachGroup(
function( AssignedGroup )
if self:IsGroupAssigned(AssignedGroup) then
self:GetMission():GetCommandCenter():MessageToGroup( string.format( "Task %s is unassigned from group %s.", TaskName, TaskGroupName ), AssignedGroup )
--self:GetMission():GetCommandCenter():MessageToGroup( string.format( "Task %s is unassigned from group %s.", TaskName, TaskGroupName ), AssignedGroup )
else
self:GetMission():GetCommandCenter():MessageToGroup( string.format( "Task %s is unassigned from your group.", TaskName ), AssignedGroup )
--self:GetMission():GetCommandCenter():MessageToGroup( string.format( "Task %s is unassigned from your group.", TaskName ), AssignedGroup )
end
end
)