mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
OPS
This commit is contained in:
parent
36669c80da
commit
a861f8d9d4
@ -2379,9 +2379,6 @@ function FLIGHTGROUP:_LandAtAirbase(airbase, SpeedTo, SpeedHold, SpeedLand)
|
||||
|
||||
-- Holding points.
|
||||
local c0=self.group:GetCoordinate()
|
||||
local zone=airbase:GetZone()
|
||||
env.info("FF landatairbase zone:")
|
||||
self:I({zone=zone})
|
||||
local p0=airbase:GetZone():GetRandomCoordinate():SetAltitude(UTILS.FeetToMeters(althold))
|
||||
local p1=nil
|
||||
local wpap=nil
|
||||
@ -3715,8 +3712,6 @@ end
|
||||
-- @return Wrapper.Airbase#AIRBASE.ParkingSpot Parking spot or nil if no spot is within distance threshold.
|
||||
function FLIGHTGROUP:GetParkingSpot(element, maxdist, airbase)
|
||||
|
||||
env.info("FF Get Parking spot for element "..element.name)
|
||||
|
||||
-- Coordinate of unit landed
|
||||
local coord=element.unit:GetCoordinate()
|
||||
|
||||
@ -3731,7 +3726,6 @@ function FLIGHTGROUP:GetParkingSpot(element, maxdist, airbase)
|
||||
coord.x=0
|
||||
coord.z=0
|
||||
maxdist=500 -- 100 meters was not enough, e.g. on the Seawise Giant, where the spot is 139 meters from the "center"
|
||||
env.info("FF Airbase is ship")
|
||||
end
|
||||
|
||||
local spot=nil --Wrapper.Airbase#AIRBASE.ParkingSpot
|
||||
@ -3740,7 +3734,7 @@ function FLIGHTGROUP:GetParkingSpot(element, maxdist, airbase)
|
||||
for _,_parking in pairs(parking) do
|
||||
local parking=_parking --Wrapper.Airbase#AIRBASE.ParkingSpot
|
||||
dist=coord:Get2DDistance(parking.Coordinate)
|
||||
env.info(string.format("FF parking %d dist=%.1f", parking.TerminalID, dist))
|
||||
--env.info(string.format("FF parking %d dist=%.1f", parking.TerminalID, dist))
|
||||
if dist<distmin then
|
||||
distmin=dist
|
||||
spot=_parking
|
||||
|
||||
@ -1791,7 +1791,7 @@ end
|
||||
function OPSGROUP:IsNotCargo(CheckTransport)
|
||||
local notcargo=self.cargoStatus==OPSGROUP.CargoStatus.NOTCARGO
|
||||
if self.cargoTransportUID==nil then
|
||||
notcargo=true
|
||||
--notcargo=true
|
||||
end
|
||||
return notcargo
|
||||
end
|
||||
@ -4835,6 +4835,9 @@ function OPSGROUP:_CheckCargoTransport()
|
||||
-- Check if there is anything in the queue.
|
||||
if not self.cargoTransport then
|
||||
self.cargoTransport=self:_GetNextCargoTransport()
|
||||
if self.cargoTransport and not self:IsActive() then
|
||||
self:Activate()
|
||||
end
|
||||
end
|
||||
|
||||
-- Now handle the transport.
|
||||
@ -4864,7 +4867,7 @@ function OPSGROUP:_CheckCargoTransport()
|
||||
self:I(self.lid.."Not carrier ==> pickup")
|
||||
|
||||
-- Initiate the cargo transport process.
|
||||
self:Pickup()
|
||||
self:__Pickup(-1)
|
||||
|
||||
elseif self:IsPickingup() then
|
||||
|
||||
@ -4897,9 +4900,10 @@ function OPSGROUP:_CheckCargoTransport()
|
||||
|
||||
end
|
||||
|
||||
self:I(self.lid.."gotcargo="..tostring(gotcargo))
|
||||
self:I(self.lid.."boarding="..tostring(boarding))
|
||||
self:I(self.lid.."required="..tostring(self.cargoTransport:_CheckRequiredCargos()))
|
||||
-- Debug.
|
||||
--self:I(self.lid.."gotcargo="..tostring(gotcargo))
|
||||
--self:I(self.lid.."boarding="..tostring(boarding))
|
||||
--self:I(self.lid.."required="..tostring(self.cargoTransport:_CheckRequiredCargos()))
|
||||
|
||||
-- Boarding finished ==> Transport cargo.
|
||||
if gotcargo and self.cargoTransport:_CheckRequiredCargos() and not boarding then
|
||||
@ -5090,7 +5094,7 @@ function OPSGROUP:AddOpsTransport(OpsTransport)
|
||||
table.insert(self.cargoqueue, OpsTransport)
|
||||
|
||||
-- Debug message.
|
||||
self:I(self.lid.."FF adding transport to carrier, #self.cargoqueue="..#self.cargoqueue)
|
||||
self:T(self.lid.."Adding transport to carrier, #self.cargoqueue="..#self.cargoqueue)
|
||||
|
||||
return self
|
||||
end
|
||||
@ -8708,7 +8712,7 @@ function OPSGROUP:_AddElementByName(unitname)
|
||||
|
||||
-- Descriptors and type/category.
|
||||
element.descriptors=unit:GetDesc()
|
||||
self:I({desc=element.descriptors})
|
||||
--self:I({desc=element.descriptors})
|
||||
|
||||
element.category=unit:GetUnitCategory()
|
||||
element.categoryname=unit:GetCategoryName()
|
||||
@ -8762,7 +8766,7 @@ function OPSGROUP:_AddElementByName(unitname)
|
||||
local text=string.format("Adding element %s: status=%s, skill=%s, life=%.1f/%.1f category=%s (%d), type=%s, size=%.1f (L=%.1f H=%.1f W=%.1f), weight=%.1f/%.1f (cargo=%.1f/%.1f)",
|
||||
element.name, element.status, element.skill, element.life, element.life0, element.categoryname, element.category, element.typename,
|
||||
element.size, element.length, element.height, element.width, element.weight, element.weightMaxTotal, element.weightCargo, element.weightMaxCargo)
|
||||
self:I(self.lid..text)
|
||||
self:T(self.lid..text)
|
||||
|
||||
-- Debug text.
|
||||
--local text=string.format("Adding element %s: status=%s, skill=%s, modex=%s, fuelmass=%.1f (%d), category=%d, categoryname=%s, callsign=%s, ai=%s",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user