This commit is contained in:
Auric Vente 2024-07-27 00:43:30 -06:00
parent e1e263ddfa
commit 554ccfb114
4 changed files with 28 additions and 2 deletions

View File

@ -159,3 +159,13 @@ Make the arguments document and exit
Default: False
Action: store_true
---
### score
Show the score on triumph or hits instead of the total of each
Default: False
Action: store_true

View File

@ -74,11 +74,19 @@ class Ant:
status = self.status
if self.method == Method.triumph:
if Args.score:
total = f"(Score: {self.get_score()})"
else:
total = f"({self.triumph} total)"
status = f"{Config.triumph_icon} {Config.triumph_message} {total}"
elif self.method == Method.hit:
if Args.score:
total = f"(Score: {self.get_score()})"
else:
total = f"({self.hits} total)"
status = f"{Config.hit_icon} {Config.hit_message} {total}"
elif self.method == Method.think:

View File

@ -26,6 +26,7 @@ class Args:
normal_minutes: float = 0.0
slow_minutes: float = 0.0
argdoc: bool = False
score: bool = False
@staticmethod
def prepare() -> None:
@ -56,6 +57,7 @@ class Args:
"normal_minutes",
"slow_minutes",
"argdoc",
"score",
]
for n_item in normals:

View File

@ -166,3 +166,9 @@ class ArgSpec:
action="store_true",
info="Make the arguments document and exit",
)
ArgSpec.add_argument(
"score",
action="store_true",
info="Show the score on triumph or hits instead of the total of each",
)