mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
new ground objects format & parser; place dead objects instead of removing them completely
This commit is contained in:
@@ -100,18 +100,13 @@ class Event:
|
||||
|
||||
for object_identifier in debriefing.destroyed_objects:
|
||||
for cp in self.game.theater.controlpoints:
|
||||
remove_ids = []
|
||||
if not cp.ground_objects:
|
||||
continue
|
||||
|
||||
for i, ground_object in enumerate(cp.ground_objects):
|
||||
if ground_object.matches_string_identifier(object_identifier):
|
||||
logging.info("cp {} removing ground object {}".format(cp, ground_object.string_identifier))
|
||||
remove_ids.append(i)
|
||||
|
||||
remove_ids.reverse()
|
||||
for i in remove_ids:
|
||||
del cp.ground_objects[i]
|
||||
logging.info("cp {} killing ground object {}".format(cp, ground_object.string_identifier))
|
||||
ground_object.is_dead = True
|
||||
|
||||
def skip(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user