From b3d46618c2180d94a4529b191caa20893ffbb1b9 Mon Sep 17 00:00:00 2001 From: ttrebuchon Date: Sat, 17 Jun 2023 16:56:46 -0400 Subject: [PATCH] Missed 2 spots in Legion/Commander for transport filters. --- Moose Development/Moose/Ops/Commander.lua | 3 +-- Moose Development/Moose/Ops/Legion.lua | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Ops/Commander.lua b/Moose Development/Moose/Ops/Commander.lua index 13f069380..ff13e6bf3 100644 --- a/Moose Development/Moose/Ops/Commander.lua +++ b/Moose Development/Moose/Ops/Commander.lua @@ -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 diff --git a/Moose Development/Moose/Ops/Legion.lua b/Moose Development/Moose/Ops/Legion.lua index ddd13d54f..73ea7f28e 100644 --- a/Moose Development/Moose/Ops/Legion.lua +++ b/Moose Development/Moose/Ops/Legion.lua @@ -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