mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 21:47:17 +02:00
Merge pull request #3263 from InspectorCaracal/traits-patch-1
Fix traceback on printing `CounterTrait`
This commit is contained in:
commit
19198e18f2
1 changed files with 6 additions and 0 deletions
|
|
@ -1282,6 +1282,12 @@ class CounterTrait(Trait):
|
|||
trait_data["last_update"] = None
|
||||
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
|
||||
|
||||
def _within_boundaries(self, value):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue