Add tickerhandler-free character class for tests
This commit is contained in:
parent
1420c8773e
commit
f738427ff3
1 changed files with 12 additions and 2 deletions
|
|
@ -593,6 +593,16 @@ class TBItemsCharacter(DefaultCharacter):
|
||||||
# Tick down condition durations
|
# Tick down condition durations
|
||||||
condition_tickdown(self, self)
|
condition_tickdown(self, self)
|
||||||
|
|
||||||
|
class TBItemsCharacterTest(TBItemsCharacter):
|
||||||
|
"""
|
||||||
|
Just like the TBItemsCharacter, but doesn't subscribe to the TickerHandler.
|
||||||
|
This makes it easier to run unit tests on.
|
||||||
|
"""
|
||||||
|
def at_object_creation(self):
|
||||||
|
self.db.max_hp = 100 # Set maximum HP to 100
|
||||||
|
self.db.hp = self.db.max_hp # Set current HP to maximum
|
||||||
|
self.db.conditions = {} # Set empty dict for conditions
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue