mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
restore killed_ground_units as it is relied on to track scenery kills
This PR fixes a regression introduced in https://github.com/dcs-liberation/dcs_liberation/pull/2792 where refactoring meant that scenery deaths were not tracked correctly. This PR has been tested by striking a scenery target and confirming that it appears in state.json and is updated in Liberation. I've also confirmed that ground units are tracked.
This commit is contained in:
@@ -10,6 +10,7 @@ unit_lost_events = {} -- killed units will be added via S_EVENT_UNIT_LOST
|
||||
kill_events = {} -- killed units will be added via S_EVENT_KILL
|
||||
base_capture_events = {}
|
||||
destroyed_objects_positions = {} -- will be added via S_EVENT_DEAD event
|
||||
killed_ground_units = {} -- keep track of static ground object deaths
|
||||
mission_ended = false
|
||||
|
||||
local function ends_with(str, ending)
|
||||
@@ -39,6 +40,7 @@ function write_state()
|
||||
["kill_events"] = kill_events,
|
||||
["mission_ended"] = mission_ended,
|
||||
["destroyed_objects_positions"] = destroyed_objects_positions,
|
||||
["killed_ground_units"] = killed_ground_units,
|
||||
}
|
||||
if not json then
|
||||
local message = string.format("Unable to save DCS Liberation state to %s, JSON library is not loaded !", _debriefing_file_location)
|
||||
|
||||
Reference in New Issue
Block a user