Fix zombie carrier

Fixed (zombie) carrier killed in state.json but always respawning in-game, issue #2405. GenericCarrierGenerator.generate() will now generate the ship group with an array that only contains alive ship units, just like GroundObjectGenerator.generate() has previously done.

Carrier groups will now also show up as destroyed/damaged on the map when the carrier is sunk.
This commit is contained in:
MetalStormGhost
2022-09-10 10:55:01 +03:00
committed by Raffson
parent d08adc2842
commit da04abf53a
2 changed files with 13 additions and 3 deletions

View File

@@ -1195,7 +1195,7 @@ class NavalControlPoint(ControlPoint, ABC):
# while its escorts are still alive.
for group in self.find_main_tgo().groups:
for u in group.units:
if u.type in [
if u.alive and u.type in [
Forrestal,
Stennis,
LHA_Tarawa,