Allow packets to be sent to a backyard

This commit is contained in:
Ben 2020-01-02 23:01:25 +00:00
parent 1b09500fed
commit d3bd9ac1e3

View File

@ -308,8 +308,11 @@ class PenguinBackyardRoom(RoomMixin):
self.blackhole = False
self.spawn = False
self.stamp_group = None
self.penguin = None
async def add_penguin(self, p):
self.penguin = p
if p.room:
await p.room.remove_penguin(p)
p.room = self
@ -321,6 +324,9 @@ class PenguinBackyardRoom(RoomMixin):
p.frame = 1
p.toy = None
async def send_xt(self, *data, f=None):
await self.penguin.send_xt(*data)
class Room(db.Model, RoomMixin):
__tablename__ = 'room'