From 2d6fe99b3bbc2875d2a8bbe7b03337684a998db9 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 15 Oct 2020 18:01:36 +0100 Subject: [PATCH] Send `gwcj` to update queue widget when joining Card Jitsu mats --- houdini/handlers/games/waddle.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/houdini/handlers/games/waddle.py b/houdini/handlers/games/waddle.py index a2a4815..d448062 100644 --- a/houdini/handlers/games/waddle.py +++ b/houdini/handlers/games/waddle.py @@ -14,6 +14,10 @@ async def handle_get_waddle_population(p): async def handle_join_waddle(p, waddle_id: int): try: waddle = p.room.waddles[waddle_id] + + if waddle.game in ['card', 'water', 'fire'] and waddle.penguins.count(None) < waddle.seats: + await p.send_xt('gwcj', *(penguin.id for penguin in waddle.penguins if penguin is not None)) + await waddle.add_penguin(p) except KeyError: p.logger.warn(f'{p.username} tried to join a waddle that doesn\'t exist')