X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/ledger2?a=blobdiff_plain;ds=inline;f=plomrogue%2Fthings.py;h=2c3f540443b46fbca6b4aee5170619d53d287d59;hb=7c03e8e8e4ed15f01e29dd331596719058af9f07;hp=1d9a4d021cc50425ae680584db3a570557fb1aa4;hpb=1a8eb9fa4e8dfaae9a0508882f49575ab68fc45c;p=plomrogue2 diff --git a/plomrogue/things.py b/plomrogue/things.py index 1d9a4d0..2c3f540 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -148,6 +148,17 @@ class Thing_SpawnPoint(Thing): symbol_hint = 's' portable = True name = 'username' + temporary = False + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.created_at = datetime.datetime.now() + + def proceed(self): + super().proceed() + if self.temporary and datetime.datetime.now() >\ + self.created_at + datetime.timedelta(minutes=10): + self.game.remove_thing(self) @@ -681,7 +692,7 @@ class Thing_Player(ThingAnimate): self.energy -= 1 else: self.energy += 1 - if self.energy < 0 and self.energy % 5 == 0: + if self.energy < 0 and self.standing and self.energy % 5 == 0: self.send_msg('CHAT "All that walking or standing uses up ' 'your energy, which makes you slower. Find a' ' place to sit or lie down to regain it."')