X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/git-logo.png?a=blobdiff_plain;f=plomrogue%2Fthings.py;h=2c3f540443b46fbca6b4aee5170619d53d287d59;hb=2dc444966037a42b51ed190ab0eab88a09c0282a;hp=da995d311dd84b7a777f9c0cc28aae2f091be0d5;hpb=775f553a8cafe65a2b104b26478e89df085c1174;p=plomrogue2 diff --git a/plomrogue/things.py b/plomrogue/things.py index da995d3..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)