Skip to content

Commit 3b9b65d

Browse files
committed
CHANGES:
- GreenieBoard: New layout added (auto migration)
1 parent 410eb68 commit 3b9b65d

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
UPDATE traps SET grade = 'NC' WHERE grade IN ('WOP', 'OWO', 'TWO', 'TLU');
2+
UPDATE traps SET grade = 'WO' WHERE grade = 'WOFD';

plugins/greenieboard/listener.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ async def process_lso_event(self, config: dict, server: Server, player: Player,
131131
# map some events to NC
132132
if data['grade'] in ['WOP', 'OWO', 'TWO', 'TLU']:
133133
data['grade'] = 'NC'
134+
elif data['grade'] == 'WOFD':
135+
data['grade'] = 'WO'
134136
# Moose.AIRBOSS sometimes gives negative points for WO. That is not according to any standard.
135137
# After SME consultation, any WO will give the WO points (typically 1.0).
136138
if points < 0 and data['grade'] == 'WO':

plugins/greenieboard/reports.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,11 @@ async def render(self, server_name: str, num_rows: int, num_landings: int, squad
366366
if j < len(landings):
367367
grade = landings[j]['grade']
368368

369+
# fixing grades...
369370
if grade in ['WOP', 'OWO', 'TWO', 'TLU']:
370371
grade = 'NC'
372+
elif grade == 'WOFD':
373+
grade = 'WO'
371374

372375
if grade == '_OK_':
373376
imagebox = OffsetImage(unicorn_image, zoom=1, resample=True)

0 commit comments

Comments
 (0)