mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-09-03 18:30:23 +00:00
Auftrag
- Improvements
This commit is contained in:
@@ -676,7 +676,7 @@ AUFTRAG.Category={
|
||||
|
||||
--- AUFTRAG class version.
|
||||
-- @field #string version
|
||||
AUFTRAG.version="1.4.0"
|
||||
AUFTRAG.version="1.4.1"
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- TODO list
|
||||
@@ -2191,7 +2191,7 @@ function AUFTRAG:NewFREIGHTTRANSPORT(StaticCargo, Destination)
|
||||
|
||||
-- Check if Destination is given
|
||||
if Destination==nil then
|
||||
self:E(self.lid..string.format("ERROR: Destination is nil for AUFTRAG:NewFREIGHTTRANSPORT! You must specify the destination airbase"))
|
||||
BASE:E(self.lid..string.format("ERROR: Destination is nil for AUFTRAG:NewFREIGHTTRANSPORT! You must specify the destination airbase"))
|
||||
return nil
|
||||
elseif type(Destination)=="string" then
|
||||
Destination=AIRBASE:FindByName(Destination)
|
||||
@@ -2199,7 +2199,7 @@ function AUFTRAG:NewFREIGHTTRANSPORT(StaticCargo, Destination)
|
||||
|
||||
-- Check if Cargo is given
|
||||
if StaticCargo==nil then
|
||||
self:E(self.lid..string.format("ERROR: StaticCargo is nil for AUFTRAG:NewFREIGHTTRANSPORT! You must specify the static object that represents the cargo"))
|
||||
BASE:E(self.lid..string.format("ERROR: StaticCargo is nil for AUFTRAG:NewFREIGHTTRANSPORT! You must specify the static object that represents the cargo"))
|
||||
return nil
|
||||
elseif type(StaticCargo)=="string" then
|
||||
StaticCargo=STATIC:FindByName(StaticCargo)
|
||||
@@ -2214,6 +2214,15 @@ function AUFTRAG:NewFREIGHTTRANSPORT(StaticCargo, Destination)
|
||||
|
||||
local mission=AUFTRAG:New(AUFTRAG.Type.FREIGHTTRANSPORT)
|
||||
|
||||
-- Check that the set is not empty
|
||||
local Ncargo=StaticCargo:Count()
|
||||
if Ncargo==0 then
|
||||
mission:E(mission.lid..string.format("ERROR: No cargo items in set!"))
|
||||
return nil
|
||||
else
|
||||
mission:T(mission.lid..string.format("FREIGHTTRANSPORT with N=%d cargo items in set", Ncargo))
|
||||
end
|
||||
|
||||
mission:_TargetFromObject(StaticCargo)
|
||||
|
||||
mission.missionTask=mission:GetMissionTaskforMissionType(AUFTRAG.Type.FREIGHTTRANSPORT)
|
||||
|
||||
@@ -514,7 +514,7 @@ OPSGROUP.CargoStatus={
|
||||
|
||||
--- OpsGroup version.
|
||||
-- @field #string version
|
||||
OPSGROUP.version="1.0.5"
|
||||
OPSGROUP.version="1.0.6"
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- TODO list
|
||||
@@ -6209,7 +6209,7 @@ function OPSGROUP:RouteToMission(mission, delay)
|
||||
-- We must be careful when calling updateroute because there the task is overwritten.
|
||||
-- We also clear present "UpdateRoute" FSM events
|
||||
self:_ClearFSMEvent( "UpdateRoute" )
|
||||
delayGo=-30
|
||||
delayGo=-50 --30 sec was not enough for CH-47 to load more than one cargo item
|
||||
self.group:SetTask(TaskCargo)
|
||||
|
||||
elseif mission.type==AUFTRAG.Type.ARTY then
|
||||
|
||||
Reference in New Issue
Block a user