Make sure references to penguin object are expunged by gc

This commit is contained in:
Ben 2020-07-14 22:20:04 +01:00
parent 49a172087e
commit 6fc147b62b
2 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,7 @@ class _CooldownMapping:
def _get_bucket_key(self, p):
if self._cooldown.bucket_type == BucketType.Default:
return p
return p.id
return p.server
def _verify_cache_integrity(self):

View File

@ -96,6 +96,8 @@ class PenguinBackyardRoom(RoomMixin):
await p.send_xt('jr', self.id, await p.string)
async def remove_penguin(self, p):
self.penguin = None
p.room = None
p.frame = 1
p.toy = None