Major refactor to include tactical combat feed

This commit is contained in:
2026-03-10 23:05:20 -05:00
parent 16b70204a1
commit 1be066c6ed
12 changed files with 490 additions and 374 deletions

View File

@@ -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.