mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Add categories/attributes/properties filters for AUFTRAG transports
This commit is contained in:
parent
a3876c296e
commit
4e36e2011f
@ -114,6 +114,9 @@
|
|||||||
-- @field #number NcarriersMax Max number of required carrier assets.
|
-- @field #number NcarriersMax Max number of required carrier assets.
|
||||||
-- @field Core.Zone#ZONE transportDeployZone Deploy zone of an OPSTRANSPORT.
|
-- @field Core.Zone#ZONE transportDeployZone Deploy zone of an OPSTRANSPORT.
|
||||||
-- @field Core.Zone#ZONE transportDisembarkZone Disembark zone of an OPSTRANSPORT.
|
-- @field Core.Zone#ZONE transportDisembarkZone Disembark zone of an OPSTRANSPORT.
|
||||||
|
-- @param #table Categories Transport group categories.
|
||||||
|
-- @field #table transportAttributes Generalized attribute(s) of transport assets.
|
||||||
|
-- @field #table transportProperties DCS attribute(s) of transport assets.
|
||||||
--
|
--
|
||||||
-- @field #number artyRadius Radius in meters.
|
-- @field #number artyRadius Radius in meters.
|
||||||
-- @field #number artyShots Number of shots fired.
|
-- @field #number artyShots Number of shots fired.
|
||||||
@ -3056,12 +3059,18 @@ end
|
|||||||
-- @param #number NcarriersMin Number of carriers *at least* required. Default 1.
|
-- @param #number NcarriersMin Number of carriers *at least* required. Default 1.
|
||||||
-- @param #number NcarriersMax Number of carriers *at most* used for transportation. Default is same as `NcarriersMin`.
|
-- @param #number NcarriersMax Number of carriers *at most* used for transportation. Default is same as `NcarriersMin`.
|
||||||
-- @param Core.Zone#ZONE DisembarkZone Zone where assets are disembarked to.
|
-- @param Core.Zone#ZONE DisembarkZone Zone where assets are disembarked to.
|
||||||
|
-- @param #table Categories Group categories.
|
||||||
|
-- @param #table Attributes Generalizes group attributes.
|
||||||
|
-- @param #table Properties DCS attributes.
|
||||||
-- @return #AUFTRAG self
|
-- @return #AUFTRAG self
|
||||||
function AUFTRAG:SetRequiredTransport(DeployZone, NcarriersMin, NcarriersMax, DisembarkZone)
|
function AUFTRAG:SetRequiredTransport(DeployZone, NcarriersMin, NcarriersMax, DisembarkZone, Categories, Attributes, Properties)
|
||||||
|
|
||||||
-- OPS transport from pickup to deploy zone.
|
-- OPS transport from pickup to deploy zone.
|
||||||
self.transportDeployZone=DeployZone
|
self.transportDeployZone=DeployZone
|
||||||
self.transportDisembarkZone=DisembarkZone
|
self.transportDisembarkZone=DisembarkZone
|
||||||
|
self.transportCategories = UTILS.EnsureTable(Categories, true)
|
||||||
|
self.transportAttributes = UTILS.EnsureTable(Attributes, true)
|
||||||
|
self.transportProperties = UTILS.EnsureTable(Properties, true)
|
||||||
|
|
||||||
-- Set required carriers.
|
-- Set required carriers.
|
||||||
self:SetRequiredCarriers(NcarriersMin, NcarriersMax)
|
self:SetRequiredCarriers(NcarriersMin, NcarriersMax)
|
||||||
|
|||||||
@ -1508,7 +1508,7 @@ function COMMANDER:CheckMissionQueue()
|
|||||||
local Transport=nil
|
local Transport=nil
|
||||||
local Legions=mission.transportLegions or self.legions
|
local Legions=mission.transportLegions or self.legions
|
||||||
|
|
||||||
TransportAvail, Transport=LEGION.AssignAssetsForTransport(self, Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone)
|
TransportAvail, Transport=LEGION.AssignAssetsForTransport(self, Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone, mission.transportCategories, mission.transportAttributes, mission.transportProperties)
|
||||||
|
|
||||||
-- Add opstransport to mission.
|
-- Add opstransport to mission.
|
||||||
if TransportAvail and Transport then
|
if TransportAvail and Transport then
|
||||||
|
|||||||
@ -714,7 +714,7 @@ function LEGION:CheckMissionQueue()
|
|||||||
local Legions=mission.transportLegions or {self}
|
local Legions=mission.transportLegions or {self}
|
||||||
|
|
||||||
-- Assign carrier assets for transport.
|
-- Assign carrier assets for transport.
|
||||||
TransportAvail, Transport=self:AssignAssetsForTransport(Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone)
|
TransportAvail, Transport=self:AssignAssetsForTransport(Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone, mission.transportCategories, mission.transportAttributes, mission.transportProperties)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add opstransport to mission.
|
-- Add opstransport to mission.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user