From e52ae1e6ef18edb04f6d8483f563b817ca0df809 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 6 Apr 2020 12:36:39 +0100 Subject: [PATCH] Fix empty waddle population bug --- houdini/data/room.py | 3 --- houdini/handlers/play/navigation.py | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/houdini/data/room.py b/houdini/data/room.py index b9a0273..df6df2b 100644 --- a/houdini/data/room.py +++ b/houdini/data/room.py @@ -271,9 +271,6 @@ class RoomWaddle(db.Model): super().__init__(*args, **kwargs) async def add_penguin(self, p): - if not self.penguins: - self.penguins = [None] * self.seats - seat_id = self.penguins.index(None) self.penguins[seat_id] = p await p.send_xt('jw', seat_id) diff --git a/houdini/handlers/play/navigation.py b/houdini/handlers/play/navigation.py index fc046c1..b2adc6c 100644 --- a/houdini/handlers/play/navigation.py +++ b/houdini/handlers/play/navigation.py @@ -55,6 +55,7 @@ async def setup_waddles(room_collection): room_collection[waddle.room_id].waddles[waddle.id] = waddle waddle.room = room_collection[waddle.room_id] waddle.logic = WaddleLogicMapping[waddle.game] + waddle.penguins = [None] * waddle.seats @handlers.boot