Cleanup the killed map objects recognition

removed the extra array to track killed_map_objects and reuse the existing killed_ground_units routine to remove duplicate code and possible confusion
This commit is contained in:
RndName
2022-01-02 12:55:10 +01:00
parent 2d07ef717c
commit 4139258508
3 changed files with 2 additions and 18 deletions

View File

@@ -8,7 +8,6 @@ killed_aircrafts = {} -- killed aircraft will be added via S_EVENT_CRASH event
killed_ground_units = {} -- killed units will be added via S_EVENT_DEAD event
base_capture_events = {}
destroyed_objects_positions = {} -- will be added via S_EVENT_DEAD event
killed_map_objects = {} -- killed map objects will be added via TriggerRules
mission_ended = false
local function ends_with(str, ending)
@@ -36,7 +35,6 @@ function write_state()
["base_capture_events"] = base_capture_events,
["mission_ended"] = mission_ended,
["destroyed_objects_positions"] = destroyed_objects_positions,
["killed_map_objects"] = killed_map_objects,
}
if not json then
local message = string.format("Unable to save DCS Liberation state to %s, JSON library is not loaded !", _debriefing_file_location)