mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-04 11:48:22 +02:00
added warning support
This commit is contained in:
parent
6167e4115a
commit
876193698a
1 changed files with 4 additions and 2 deletions
|
@ -3,9 +3,12 @@ import json
|
||||||
|
|
||||||
def create_lecode_config(self):
|
def create_lecode_config(self):
|
||||||
def get_star_text(track):
|
def get_star_text(track):
|
||||||
|
if "warning" in track: warning = "!" * track["warning"]
|
||||||
|
else: warning = ""
|
||||||
|
|
||||||
if "score" in track:
|
if "score" in track:
|
||||||
if track["score"] > 0:
|
if track["score"] > 0:
|
||||||
return "★" * track["score"] + "☆" * (3 - track["score"]) + " "
|
return "★" * track["score"] + "☆" * (3 - track["score"]) + warning + " "
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def get_ctfile_text(track, race=False):
|
def get_ctfile_text(track, race=False):
|
||||||
|
@ -13,7 +16,6 @@ def create_lecode_config(self):
|
||||||
|
|
||||||
if "prefix" in track: prefix = f"{track['prefix']} "
|
if "prefix" in track: prefix = f"{track['prefix']} "
|
||||||
else: prefix = ""
|
else: prefix = ""
|
||||||
|
|
||||||
if "suffix" in track: suffix = f" ({track['suffix']})"
|
if "suffix" in track: suffix = f" ({track['suffix']})"
|
||||||
else: suffix = ""
|
else: suffix = ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue