mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Test for unit_name + " object" in the debrief.
This is because all building objects have " object" appended to the end in the unit map, but not in the state.json. Therefore, we should now find destroyed building objects in the unit map. Should fix #793.
This commit is contained in:
parent
8fb02136bb
commit
cc3cd95e2d
@ -197,6 +197,9 @@ class Debriefing:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
building = self.unit_map.building_or_fortification(unit_name)
|
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")
|
||||||
if building is not None:
|
if building is not None:
|
||||||
if building.ground_object.control_point.captured:
|
if building.ground_object.control_point.captured:
|
||||||
losses.player_buildings.append(building)
|
losses.player_buildings.append(building)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user