mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Rework killed map_objects recognition
- removed the map_object_id from the TGO - add a new TriggerRule with the MapObjectIsDead Condition which adds the map object to the killed_map_objects array in the state.json - Use the trigger_zone_name as the unique identifier used for the unit_map to recognize the kill
This commit is contained in:
@@ -221,7 +221,7 @@ class UnitMap:
|
||||
self.buildings[name] = Building(ground_object)
|
||||
|
||||
def add_scenery(self, ground_object: SceneryGroundObject) -> None:
|
||||
name = str(ground_object.map_object_id)
|
||||
name = str(ground_object.zone.name)
|
||||
if name in self.buildings:
|
||||
raise RuntimeError(
|
||||
f"Duplicate TGO unit: {name}. TriggerZone name: "
|
||||
|
||||
Reference in New Issue
Block a user