Buildable (#36)
- Buildable missions now working. - FARPS and BLUESAM zones are now buildable. - Secondary Logistics missions are created as buildables become available. - Logistic missions can be "marked" with a MAP marker. - Supplies can only be picked up in a SUPPLYHUB zone. - SUPPLYHUB zones are active once their parents are active. A supplyhub parent can be oneof: FARP, AIRBASE, STAGE. - Required supplies for a zone can be configured in kilos. - Crates can be picked up with 1000 or 2000 kilo per crate. - Max load for a helicopter is set based on public data. - TO COME: Sling load options
This commit is contained in:
@@ -21,6 +21,10 @@ function SpearheadGroup.New(groupName)
|
||||
return self
|
||||
end
|
||||
|
||||
function SpearheadGroup:IsSpawned()
|
||||
return self._isSpawned
|
||||
end
|
||||
|
||||
function SpearheadGroup:SpawnCorpsesOnly()
|
||||
|
||||
if self._isSpawned == true then return end
|
||||
@@ -146,6 +150,26 @@ function SpearheadGroup:GetUnits()
|
||||
return result
|
||||
end
|
||||
|
||||
---@return Array<Vec3>
|
||||
function SpearheadGroup:GetAllUnitPositions()
|
||||
|
||||
local result = {}
|
||||
if self._isStatic == true then
|
||||
local staticObject = StaticObject.getByName(self.groupName)
|
||||
if staticObject then
|
||||
table.insert(result, staticObject:getPoint())
|
||||
end
|
||||
else
|
||||
local group = Group.getByName(self.groupName)
|
||||
if not group then return {} end
|
||||
for _, unit in pairs(group:getUnits()) do
|
||||
table.insert(result, unit:getPoint())
|
||||
end
|
||||
end
|
||||
return result
|
||||
|
||||
end
|
||||
|
||||
if not Spearhead.classes then Spearhead.classes = {} end
|
||||
if not Spearhead.classes.stageClasses then Spearhead.classes.stageClasses = {} end
|
||||
if not Spearhead.classes.stageClasses.Groups then Spearhead.classes.stageClasses.Groups = {} end
|
||||
|
||||
Reference in New Issue
Block a user