Added possibility to repair SAM sites (WIP)

This commit is contained in:
Khopa
2020-08-23 13:43:33 +02:00
parent 70babd9c32
commit bcae51cc92
11 changed files with 242 additions and 29 deletions

View File

@@ -178,9 +178,12 @@ class Event:
for i, ground_object in enumerate(cp.ground_objects):
if ground_object.dcs_identifier in ["AA", "CARRIER", "LHA"]:
for g in ground_object.groups:
if not hasattr(g, "units_losts"):
g.units_losts = []
for u in g.units:
if u.name == destroyed_ground_unit_name:
g.units.remove(u)
g.units_losts.append(u)
destroyed_units = destroyed_units + 1
info.text = u.type
ucount = sum([len(g.units) for g in ground_object.groups])