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

@@ -313,6 +313,9 @@ class SongSelect{
this.redraw()
pageEvents.send("song-select")
pageEvents.send("song-select-move", this.songs[this.selectedSong])
if(songIdIndex !== -1){
pageEvents.send("song-select-difficulty", this.songs[this.selectedSong])
}
}
keyDown(event, code){
@@ -615,6 +618,7 @@ class SongSelect{
setTimeout(() => {
this.moveToSong(moveBy)
}, 200)
pageEvents.send("song-select-random")
}else if(currentSong.action === "tutorial"){
this.toTutorial()
}else if(currentSong.action === "about"){