Mods
This commit is contained in:
parent
e1e263ddfa
commit
554ccfb114
10
arguments.md
10
arguments.md
|
@ -159,3 +159,13 @@ Make the arguments document and exit
|
||||||
Default: False
|
Default: False
|
||||||
|
|
||||||
Action: store_true
|
Action: store_true
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### score
|
||||||
|
|
||||||
|
Show the score on triumph or hits instead of the total of each
|
||||||
|
|
||||||
|
Default: False
|
||||||
|
|
||||||
|
Action: store_true
|
||||||
|
|
|
@ -74,11 +74,19 @@ class Ant:
|
||||||
status = self.status
|
status = self.status
|
||||||
|
|
||||||
if self.method == Method.triumph:
|
if self.method == Method.triumph:
|
||||||
|
if Args.score:
|
||||||
|
total = f"(Score: {self.get_score()})"
|
||||||
|
else:
|
||||||
total = f"({self.triumph} total)"
|
total = f"({self.triumph} total)"
|
||||||
|
|
||||||
status = f"{Config.triumph_icon} {Config.triumph_message} {total}"
|
status = f"{Config.triumph_icon} {Config.triumph_message} {total}"
|
||||||
|
|
||||||
elif self.method == Method.hit:
|
elif self.method == Method.hit:
|
||||||
|
if Args.score:
|
||||||
|
total = f"(Score: {self.get_score()})"
|
||||||
|
else:
|
||||||
total = f"({self.hits} total)"
|
total = f"({self.hits} total)"
|
||||||
|
|
||||||
status = f"{Config.hit_icon} {Config.hit_message} {total}"
|
status = f"{Config.hit_icon} {Config.hit_message} {total}"
|
||||||
|
|
||||||
elif self.method == Method.think:
|
elif self.method == Method.think:
|
||||||
|
|
|
@ -26,6 +26,7 @@ class Args:
|
||||||
normal_minutes: float = 0.0
|
normal_minutes: float = 0.0
|
||||||
slow_minutes: float = 0.0
|
slow_minutes: float = 0.0
|
||||||
argdoc: bool = False
|
argdoc: bool = False
|
||||||
|
score: bool = False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def prepare() -> None:
|
def prepare() -> None:
|
||||||
|
@ -56,6 +57,7 @@ class Args:
|
||||||
"normal_minutes",
|
"normal_minutes",
|
||||||
"slow_minutes",
|
"slow_minutes",
|
||||||
"argdoc",
|
"argdoc",
|
||||||
|
"score",
|
||||||
]
|
]
|
||||||
|
|
||||||
for n_item in normals:
|
for n_item in normals:
|
||||||
|
|
|
@ -166,3 +166,9 @@ class ArgSpec:
|
||||||
action="store_true",
|
action="store_true",
|
||||||
info="Make the arguments document and exit",
|
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",
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue