Missed 2 spots in Legion/Commander for transport filters.

This commit is contained in:
ttrebuchon 2023-06-17 16:56:46 -04:00
parent 4e36e2011f
commit b3d46618c2
2 changed files with 2 additions and 4 deletions

View File

@ -1702,8 +1702,7 @@ function COMMANDER:RecruitAssetsForMission(Mission)
local cohort=_cohort --Ops.Cohort#COHORT
-- Check if cohort can perform transport to target.
--TODO: Option to filter transport carrier asset categories, attributes and/or properties.
local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Categories, Attributes, Properties, nil, TargetVec2)
local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Mission.transportCategories, Mission.transportAttributes, Mission.transportProperties, nil, TargetVec2)
-- MaxWeight of cargo assets is limited by the largets available cargo bay. We don't want to select, e.g., tanks that cannot be transported by APCs or helos.
if can and (MaxWeight==nil or cohort.cargobayLimit>MaxWeight) then

View File

@ -2252,8 +2252,7 @@ function LEGION:RecruitAssetsForMission(Mission)
local cohort=_cohort --Ops.Cohort#COHORT
-- Check if cohort can perform transport to target.
--TODO: Option to filter transport carrier asset categories, attributes and/or properties.
local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Categories, Attributes, Properties, nil, TargetVec2)
local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Mission.transportCategories, Mission.transportAttributes, Mission.transportProperties, nil, TargetVec2)
-- MaxWeight of cargo assets is limited by the largets available cargo bay. We don't want to select, e.g., tanks that cannot be transported by APCs or helos.
if can and (MaxWeight==nil or cohort.cargobayLimit>MaxWeight) then