Fix empty waddle population bug

This commit is contained in:
Ben 2020-04-06 12:36:39 +01:00
parent ae5d6ceacb
commit e52ae1e6ef
2 changed files with 1 additions and 3 deletions

View File

@ -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)

View File

@ -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