This commit is contained in:
Frank
2021-08-25 17:20:17 +02:00
parent 259b201e65
commit 1e6899c40b
9 changed files with 289 additions and 229 deletions

View File

@@ -1142,11 +1142,6 @@ function NAVYGROUP:_InitGroup(Template)
-- Get template of group.
local template=Template or self:_GetTemplate()
-- Define category.
self.isAircraft=false
self.isNaval=true
self.isGround=false
--TODO: Submarine check
--self.isSubmarine=self.group:IsSubmarine()
@@ -1202,21 +1197,8 @@ function NAVYGROUP:_InitGroup(Template)
self:_AddElementByName(unit:GetName())
end
-- Get first unit. This is used to extract other parameters.
local unit=units[1] --Wrapper.Unit#UNIT
if unit then
-- Get Descriptors.
self.descriptors=unit:GetDesc()
-- Set type name.
self.actype=unit:GetTypeName()
-- Init done.
self.groupinitialized=true
end
-- Init done.
self.groupinitialized=true
return self
end