From a4b536234776e8a327f8c55b8c24dba04a392c0d Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 8 Nov 2022 22:01:44 +0100 Subject: [PATCH] Update Cohort.lua - Added functions to get and set attributes - Added function to get category and properties --- Moose Development/Moose/Ops/Cohort.lua | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Moose Development/Moose/Ops/Cohort.lua b/Moose Development/Moose/Ops/Cohort.lua index 4c059b639..9b748e992 100644 --- a/Moose Development/Moose/Ops/Cohort.lua +++ b/Moose Development/Moose/Ops/Cohort.lua @@ -504,6 +504,37 @@ function COHORT:SetCallsign(Callsign, Index) return self end +--- Set generalized attribute. +-- @param #COHORT self +-- @param #string Attribute Generalized attribute, e.g. `GROUP.Attribute.Ground_Infantry`. +-- @return #COHORT self +function COHORT:SetAttribute(Attribute) + self.attribute=Attribute + return self +end + +--- Get generalized attribute. +-- @param #COHORT self +-- @return #string Generalized attribute, e.g. `GROUP.Attribute.Ground_Infantry`. +function COHORT:GetAttribute() + return self.attribute +end + +--- Get group category. +-- @param #COHORT self +-- @return #string Group category +function COHORT:GetCategory() + return self.category +end + +--- Get properties, *i.e.* DCS attributes. +-- @param #COHORT self +-- @return #table Properties table. +function COHORT:GetProperties() + return self.properties +end + + --- Set modex. -- @param #COHORT self -- @param #number Modex A number like 100.