Skip to content

Commit 5d075ca

Browse files
committed
BUGFIX:
- statics were not initialized correctly through lua
1 parent 99e9856 commit 5d075ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/missionstats/listener.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ async def onMissionEvent(self, server: Server, data: dict) -> None:
196196
if unit_name not in units:
197197
units.append(unit_name)
198198
elif initiator['type'] == 'STATIC':
199-
units = coalition_stats.setdefault('statics', [])
199+
if len(coalition_stats['statics']) == 0:
200+
coalition_stats['statics'] = []
201+
units = coalition_stats['statics']
200202
if unit_name not in units:
201203
units.append(unit_name)
202204
update = True

0 commit comments

Comments
 (0)