mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 15:31:51 +08:00
Play se_don on title screen more fittingly
This commit is contained in:
parent
b42b246a99
commit
9c44d223c4
@ -363,6 +363,9 @@ class CustomSongs{
|
|||||||
open("privacy")
|
open("privacy")
|
||||||
}
|
}
|
||||||
loading(show){
|
loading(show){
|
||||||
|
if(this.noPage){
|
||||||
|
return
|
||||||
|
}
|
||||||
if(show){
|
if(show){
|
||||||
loader.screen.appendChild(this.loaderDiv)
|
loader.screen.appendChild(this.loaderDiv)
|
||||||
}else if(this.loaderDiv.parentNode){
|
}else if(this.loaderDiv.parentNode){
|
||||||
@ -376,7 +379,9 @@ class CustomSongs{
|
|||||||
assets.customSongs = true
|
assets.customSongs = true
|
||||||
assets.customSelected = this.noPage ? +localStorage.getItem("customSelected") : 0
|
assets.customSelected = this.noPage ? +localStorage.getItem("customSelected") : 0
|
||||||
}
|
}
|
||||||
|
if(!this.noPage){
|
||||||
assets.sounds["se_don"].play()
|
assets.sounds["se_don"].play()
|
||||||
|
}
|
||||||
this.clean()
|
this.clean()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
new SongSelect("customSongs", false, this.touchEnabled)
|
new SongSelect("customSongs", false, this.touchEnabled)
|
||||||
|
@ -757,7 +757,7 @@ class SongSelect{
|
|||||||
autoplay = true
|
autoplay = true
|
||||||
}else if(shift){
|
}else if(shift){
|
||||||
autoplay = shift
|
autoplay = shift
|
||||||
}else if(p2.socket.readyState === 1 && !assets.customSongs){
|
}else if(p2.socket && p2.socket.readyState === 1 && !assets.customSongs){
|
||||||
multiplayer = ctrl
|
multiplayer = ctrl
|
||||||
}
|
}
|
||||||
var diff = this.difficultyId[difficulty]
|
var diff = this.difficultyId[difficulty]
|
||||||
|
@ -56,7 +56,9 @@ class Titlescreen{
|
|||||||
}
|
}
|
||||||
this.titleScreen.style.cursor = "auto"
|
this.titleScreen.style.cursor = "auto"
|
||||||
this.clean()
|
this.clean()
|
||||||
|
if(!this.customFolder || assets.customSongs){
|
||||||
assets.sounds["se_don"].play()
|
assets.sounds["se_don"].play()
|
||||||
|
}
|
||||||
this.goNext()
|
this.goNext()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,9 +73,20 @@ class Titlescreen{
|
|||||||
pageEvents.remove(p2, "message")
|
pageEvents.remove(p2, "message")
|
||||||
if(this.customFolder && !fromP2 && !assets.customSongs){
|
if(this.customFolder && !fromP2 && !assets.customSongs){
|
||||||
var customSongs = new CustomSongs(this.touched, true)
|
var customSongs = new CustomSongs(this.touched, true)
|
||||||
customSongs.walkFilesystem(this.customFolder).then(files => customSongs.importLocal(files)).catch(() => {
|
var soundPlayed = false
|
||||||
|
customSongs.walkFilesystem(this.customFolder).then(files => {
|
||||||
|
assets.sounds["se_don"].play()
|
||||||
|
soundPlayed = true
|
||||||
|
return customSongs.importLocal(files)
|
||||||
|
}).catch(() => {
|
||||||
|
localStorage.removeItem("customSelected")
|
||||||
db.removeItem("customFolder")
|
db.removeItem("customFolder")
|
||||||
|
if(!soundPlayed){
|
||||||
|
assets.sounds["se_don"].play()
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
new SongSelect(false, false, this.touched, this.songId)
|
new SongSelect(false, false, this.touched, this.songId)
|
||||||
|
}, 500)
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user