added warning support

This commit is contained in:
raphael60650 2021-06-13 16:59:48 +02:00
parent 6167e4115a
commit 876193698a

View file

@ -3,9 +3,12 @@ import json
def create_lecode_config(self):
def get_star_text(track):
if "warning" in track: warning = "!" * track["warning"]
else: warning = ""
if "score" in track:
if track["score"] > 0:
return "" * track["score"] + "" * (3 - track["score"]) + " "
return "" * track["score"] + "" * (3 - track["score"]) + warning + " "
return ""
def get_ctfile_text(track, race=False):
@ -13,7 +16,6 @@ def create_lecode_config(self):
if "prefix" in track: prefix = f"{track['prefix']} "
else: prefix = ""
if "suffix" in track: suffix = f" ({track['suffix']})"
else: suffix = ""