Fix a bug and add a new thing

- Add support for logging Arcaea's errors
- Fix a bug when world maps' data don't have some unnecessary parts the client of iOS may break down
This commit is contained in:
Lost-MSth
2022-07-16 19:50:07 +08:00
parent 6801af197f
commit 47f05cdf1e
23 changed files with 549 additions and 613 deletions

View File

@@ -98,10 +98,11 @@ class LocalMultiPlayer:
if self.conn.poll(Constant.LINK_PLAY_TIMEOUT):
self.data_recv = self.conn.recv()
if self.data_recv[0] != 0:
raise ArcError('Link Play error.', self.data_recv[0])
raise ArcError('Link Play error.',
self.data_recv[0], status=400)
else:
raise Timeout(
'Timeout when waiting for data from local udp server.')
'Timeout when waiting for data from local udp server.', status=400)
def create_room(self, user: 'Player' = None) -> None:
'''创建房间'''