diff --git a/Moose Development/Moose/Functional/Warehouse.lua b/Moose Development/Moose/Functional/Warehouse.lua index 3ea75cd03..9dba94da5 100644 --- a/Moose Development/Moose/Functional/Warehouse.lua +++ b/Moose Development/Moose/Functional/Warehouse.lua @@ -3867,7 +3867,7 @@ function WAREHOUSE:onafterAddAsset(From, Event, To, group, ngroups, forceattribu -- Setting parameter to false, i.e. creating NO dead or remove unit event, seems to not confuse the dispatcher logic. -- Create a RemoveUnit event to let the FLIGHTCONTROL know, the parking is now free. -- TODO: Need to check if my above comment not to confuse the dispatcher logic is broken by this! - group:Destroy(false) + group:Destroy() end else diff --git a/Moose Development/Moose/Ops/FlightControl.lua b/Moose Development/Moose/Ops/FlightControl.lua index ed0337a09..4f8a4fe11 100644 --- a/Moose Development/Moose/Ops/FlightControl.lua +++ b/Moose Development/Moose/Ops/FlightControl.lua @@ -294,10 +294,9 @@ end -- @return #FLIGHTCONTROL self function FLIGHTCONTROL:SetParkingGuard(TemplateGroupName) - --self.parkingGuard=SPAWN:New(TemplateGroupName) - local alias=string.format("Parking Guard %s", self.airbasename) - + + -- Need spawn with alias for multiple FCs. self.parkingGuard=SPAWN:NewWithAlias(TemplateGroupName, alias) return self @@ -684,7 +683,7 @@ function FLIGHTCONTROL:_GetNextFlight() if parking then return flightholding, true, parking else - self:E(string.format("WARNING: No flight parking but no parking spots! nP=%d nH=%d", #parking, nH)) + self:E(self.lid..string.format("WARNING: No flight parking but no parking spots! nP=%d nH=%d", #parking, nH)) return nil, nil, nil end end @@ -705,8 +704,8 @@ function FLIGHTCONTROL:_GetNextFlight() end end - -- Return the flight which is waiting longer. - if flightholding.Tholding>flightparking.Tparking and parking then + -- Return the flight which is waiting longer. NOTE that Tholding and Tparking are abs. mission time. So a smaller value means waiting longer. + if flightholding.Tholding