Fix exception in building debrief.

There are always a bunch of integer dead ground units. Not sure what
they are.
This commit is contained in:
Dan Albert 2021-01-30 18:24:25 -08:00
parent ea7bece3b8
commit 3d0b47a181

View File

@ -199,7 +199,9 @@ class Debriefing:
building = self.unit_map.building_or_fortification(unit_name)
# Try appending object to the name, because we do this for building statics.
if building is None:
building = self.unit_map.building_or_fortification(unit_name + " object")
building = self.unit_map.building_or_fortification(
f"{unit_name} object"
)
if building is not None:
if building.ground_object.control_point.captured:
losses.player_buildings.append(building)