mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Faster menu and fix for Disembark loaded engineers in other helicopter.
This commit is contained in:
parent
7735120f25
commit
b1ecdc727c
@ -384,6 +384,14 @@ do -- CARGO
|
||||
return self:Is( "Loaded" )
|
||||
end
|
||||
|
||||
--- Check if cargo is loaded.
|
||||
-- @param #CARGO self
|
||||
-- @param Wrapper.Unit#UNIT Carrier
|
||||
-- @return #boolean true if loaded
|
||||
function CARGO:IsLoadedInCarrier( Carrier )
|
||||
return self.CargoCarrier and self.CargoCarrier:GetName() == Carrier:GetName()
|
||||
end
|
||||
|
||||
--- Check if cargo is unloaded.
|
||||
-- @param #CARGO self
|
||||
-- @return #boolean true if unloaded
|
||||
|
||||
@ -306,7 +306,7 @@ do -- TASK_CARGO
|
||||
|
||||
end
|
||||
|
||||
if Cargo:IsLoaded() then
|
||||
if Cargo:IsLoaded() == true and Cargo:IsLoadedInCarrier( TaskUnit ) == true then
|
||||
if not TaskUnit:InAir() then
|
||||
if Cargo:CanUnboard() == true then
|
||||
MENU_GROUP_COMMAND:New( TaskUnit:GetGroup(), "Unboard cargo " .. Cargo.Name, TaskUnit.Menu, self.MenuUnboardCargo, self, Cargo ):SetTime(MenuTime)
|
||||
@ -333,7 +333,7 @@ do -- TASK_CARGO
|
||||
TaskUnit.Menu:Remove( MenuTime )
|
||||
|
||||
|
||||
self:__SelectAction( -5 )
|
||||
self:__SelectAction( -1 )
|
||||
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user