Apparently stances use the connected CP's ID -_-

This commit is contained in:
Raffson 2023-06-05 21:09:38 +02:00
parent 9b26c2ddca
commit 055519411b
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 2 additions and 3 deletions

View File

@ -151,8 +151,7 @@ class GroundPlanner:
while available > 0:
if len(self.connected_enemy_cp) > 0:
enemy_cp: ControlPoint = random.choice(self.connected_enemy_cp)
ecp_id = self.cp.front_line_with(enemy_cp).id
frontline_stance = self.cp.stances[ecp_id]
frontline_stance = self.cp.stances[enemy_cp.id]
group_size_choice = GROUP_SIZES_BY_COMBAT_STANCE[frontline_stance]
if role == CombatGroupRole.SHORAD:
count = 1

View File

@ -351,7 +351,7 @@ class ControlPoint(MissionTarget, SidcDescribable, ABC):
self.base: Base = Base()
self.cptype = cptype
# TODO: Should be Airbase specific.
self.stances: dict[UUID, CombatStance] = {}
self.stances: dict[UUID, CombatStance] = {} # Connected-CP -> CombatStance
from ..groundunitorders import GroundUnitOrders
self.ground_unit_orders = GroundUnitOrders(self)