Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Taiko Web
Commits
1bb33597
Commit
1bb33597
authored
Nov 04, 2019
by
LoveEevee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use stars on song select for score level
parent
84377f62
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
9 deletions
+12
-9
public/src/js/controller.js
public/src/js/controller.js
+2
-2
public/src/js/importsongs.js
public/src/js/importsongs.js
+2
-2
public/src/js/parseosu.js
public/src/js/parseosu.js
+3
-2
public/src/js/parsetja.js
public/src/js/parsetja.js
+3
-2
public/src/js/songselect.js
public/src/js/songselect.js
+2
-1
No files found.
public/src/js/controller.js
View file @
1bb33597
...
...
@@ -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
...
...
public/src/js/importsongs.js
View file @
1bb33597
...
...
@@ -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
=
{
...
...
public/src/js/parseosu.js
View file @
1bb33597
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
...
...
public/src/js/parsetja.js
View file @
1bb33597
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
;
}
...
...
public/src/js/songselect.js
View file @
1bb33597
...
...
@@ -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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment