Fixed : BMD_1 IFV missing from db. Fixed error preventing mission generation when the role of an unit can not be determined.

This commit is contained in:
Khopa 2020-12-15 20:09:41 +01:00
parent ca5a70e3bc
commit 4112a86fe9
2 changed files with 5 additions and 2 deletions

View File

@ -710,6 +710,7 @@ UNIT_BY_TASK = {
Armor.IFV_BMP_2,
Armor.IFV_BMP_3,
Armor.IFV_BMP_3,
Armor.IFV_BMD_1,
Armor.ZBD_04A,
Armor.ZBD_04A,
Armor.ZBD_04A,

View File

@ -113,8 +113,10 @@ class Base:
elif for_task == AirDefence:
target_dict = self.aa
assert target_dict is not None
target_dict[unit_type] = target_dict.get(unit_type, 0) + unit_count
if target_dict is not None:
target_dict[unit_type] = target_dict.get(unit_type, 0) + unit_count
else:
logging.error("Unable to determine target dict for " + str(unit_type))
def commit_losses(self, units_lost: typing.Dict[typing.Any, int]):