mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-12-23 09:46:15 +08:00
Use stars on song select for score level
This commit is contained in:
parent
84377f62b0
commit
1bb3359784
@ -12,9 +12,9 @@ class Controller{
|
||||
}
|
||||
|
||||
if(selectedSong.type === "tja"){
|
||||
this.parsedSongData = new ParseTja(songData, selectedSong.difficulty, selectedSong.offset)
|
||||
this.parsedSongData = new ParseTja(songData, selectedSong.difficulty, selectedSong.stars, selectedSong.offset)
|
||||
}else{
|
||||
this.parsedSongData = new ParseOsu(songData, selectedSong.difficulty, selectedSong.offset)
|
||||
this.parsedSongData = new ParseOsu(songData, selectedSong.difficulty, selectedSong.stars, selectedSong.offset)
|
||||
}
|
||||
this.offset = this.parsedSongData.soundOffset
|
||||
|
||||
|
@ -199,7 +199,7 @@
|
||||
var reader = new FileReader()
|
||||
var promise = pageEvents.load(reader).then(event => {
|
||||
var data = event.target.result.replace(/\0/g, "").split("\n")
|
||||
var tja = new ParseTja(data, "oni", 0, true)
|
||||
var tja = new ParseTja(data, "oni", 0, 0, true)
|
||||
var songObj = {
|
||||
id: index + 1,
|
||||
type: "tja",
|
||||
@ -283,7 +283,7 @@
|
||||
var reader = new FileReader()
|
||||
var promise = pageEvents.load(reader).then(event => {
|
||||
var data = event.target.result.replace(/\0/g, "").split("\n")
|
||||
var osu = new ParseOsu(data, "oni", 0, true);
|
||||
var osu = new ParseOsu(data, "oni", 0, 0, true);
|
||||
var dir = file.webkitRelativePath.toLowerCase()
|
||||
dir = dir.slice(0, dir.lastIndexOf("/") + 1)
|
||||
var songObj = {
|
||||
|
@ -1,5 +1,5 @@
|
||||
class ParseOsu{
|
||||
constructor(fileContent, difficulty, offset, metaOnly){
|
||||
constructor(fileContent, difficulty, stars, offset, metaOnly){
|
||||
this.osu = {
|
||||
OFFSET: 0,
|
||||
MSPERBEAT: 1,
|
||||
@ -53,6 +53,7 @@ class ParseOsu{
|
||||
this.editor = this.parseEditor()
|
||||
this.difficulty = this.parseDifficulty()
|
||||
this._difficulty = difficulty;
|
||||
this.stars = stars
|
||||
if(!metaOnly){
|
||||
this.timingPoints = this.parseTiming()
|
||||
this.circles = this.parseCircles()
|
||||
@ -356,7 +357,7 @@ class ParseOsu{
|
||||
}
|
||||
}
|
||||
this.scoremode = 2;
|
||||
var autoscore = new AutoScore(this._difficulty, parseInt(this.difficulty.overallDifficulty) * 2, 2, circles);
|
||||
var autoscore = new AutoScore(this._difficulty, this.stars, 2, circles);
|
||||
this.scoreinit = autoscore.ScoreInit;
|
||||
this.scorediff = autoscore.ScoreDiff;
|
||||
return circles
|
||||
|
@ -1,5 +1,5 @@
|
||||
class ParseTja{
|
||||
constructor(file, difficulty, offset, metaOnly){
|
||||
constructor(file, difficulty, stars, offset, metaOnly){
|
||||
this.data = []
|
||||
for(let line of file){
|
||||
line = line.replace(/\/\/.*/, "").trim()
|
||||
@ -8,6 +8,7 @@
|
||||
}
|
||||
}
|
||||
this.difficulty = difficulty
|
||||
this.stars = stars
|
||||
this.offset = (offset || 0) * -1000
|
||||
this.soundOffset = 0
|
||||
this.noteTypes = {
|
||||
@ -454,7 +455,7 @@
|
||||
this.scoremode = meta.scoremode || 1;
|
||||
} else {
|
||||
this.scoremode = meta.scoremode || 2;
|
||||
var autoscore = new AutoScore(this.difficulty, meta.level, this.scoremode, circles);
|
||||
var autoscore = new AutoScore(this.difficulty, this.stars, this.scoremode, circles);
|
||||
this.scoreinit = autoscore.ScoreInit;
|
||||
this.scorediff = autoscore.ScoreDiff;
|
||||
}
|
||||
|
@ -687,7 +687,8 @@ class SongSelect{
|
||||
"category": selectedSong.category,
|
||||
"type": selectedSong.type,
|
||||
"offset": selectedSong.offset,
|
||||
"songSkin": selectedSong.songSkin
|
||||
"songSkin": selectedSong.songSkin,
|
||||
"stars": selectedSong.stars[difficulty]
|
||||
}, autoplay, multiplayer, touch)
|
||||
}
|
||||
toOptions(moveBy){
|
||||
|
Loading…
Reference in New Issue
Block a user