Change some events, fix p2 sending gameend twice

- Fixed gameend being sent twice in p2
- Add `ready`, `loader-error`, and `song-select-random` events
- Fixed `session-start` not firing when invited, added event detail
- Fixed `language-change` being fired at startup
- Fixed `version-link` and `about-link` firing twice
- "#song=" will fire `song-select-difficulty`
- Removed `key-events` and `scoresheet-player2`, merged with `scoresheet` and made it more detailed
This commit is contained in:
LoveEevee
2019-02-15 01:10:34 +03:00
parent adc45cb652
commit e677f2f032
12 changed files with 41 additions and 18 deletions

View File

@@ -210,6 +210,7 @@ async def connection(ws, path):
user["other_user"]["ws"].send(sent_msg1),
user["other_user"]["ws"].send(sent_msg2)
])
del user["other_user"]["other_user"]
del user["other_user"]
else:
# Other user disconnected
@@ -304,6 +305,7 @@ async def connection(ws, path):
user["other_user"]["ws"].send(sent_msg1),
user["other_user"]["ws"].send(sent_msg2)
])
del user["other_user"]["other_user"]
del user["other_user"]
else:
# Other user disconnected
@@ -324,6 +326,7 @@ async def connection(ws, path):
user["other_user"]["ws"].send(msgobj("gameend")),
user["other_user"]["ws"].send(status_event())
])
del user["other_user"]["other_user"]
if user["action"] == "waiting":
del server_status["waiting"][user["gameid"]]
await notify_status()