add __str__ for CounterTrait
This commit is contained in:
parent
b819bff556
commit
a003afcf7e
1 changed files with 6 additions and 0 deletions
|
|
@ -1282,6 +1282,12 @@ class CounterTrait(Trait):
|
||||||
trait_data["last_update"] = None
|
trait_data["last_update"] = None
|
||||||
return trait_data
|
return trait_data
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
status = "{current:4} / {base:4}".format(current=self.current, base=self.base)
|
||||||
|
return "{name:12} {status} ({mod:+3}) (* {mult:.2f})".format(
|
||||||
|
name=self.name, status=status, mod=self.mod, mult=self.mult
|
||||||
|
)
|
||||||
|
|
||||||
# Helpers
|
# Helpers
|
||||||
|
|
||||||
def _within_boundaries(self, value):
|
def _within_boundaries(self, value):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue