Major refactor to include tactical combat feed
This commit is contained in:
@@ -45,10 +45,10 @@ function PlayerClass:Service()
|
||||
|
||||
-- Pass 1: Collect assigned game object wrappers from alive units
|
||||
for _, unit in pairs(self:GetAliveUnits()) do
|
||||
if TestValid(unit.GameObjectWrapper) then
|
||||
assignedUnits[unit.GameObjectWrapper] = true
|
||||
if TestValid(unit.GameObject) then
|
||||
assignedUnits[unit.GameObject] = true
|
||||
else
|
||||
unit:SetDead()
|
||||
unit:SetDead(-1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -81,11 +81,14 @@ end
|
||||
|
||||
---Adds a Unit type to the Player's reinforcement list.
|
||||
---@param objectType table FoC GameObjectTypeWrapper object that was built.
|
||||
---@return UnitClass
|
||||
function PlayerClass:AddUnit(objectType)
|
||||
local unit = UnitClass:New(objectType, self.Id)
|
||||
|
||||
table.insert(self.Units, unit)
|
||||
ScriptMessage("Unit Added: %s", unit:Debug())
|
||||
|
||||
return unit
|
||||
end
|
||||
|
||||
---Gets all Reinforcement Units for this Player.
|
||||
|
||||
Reference in New Issue
Block a user