Change leaderboard to use PP instead of score
credits to @srizan10 for idea
This commit is contained in:
parent
365b6bd381
commit
81491e7fba
16
index.ts
16
index.ts
|
@ -267,10 +267,10 @@ async function cacheStuff(): Promise<void> {
|
||||||
id: user.id,
|
id: user.id,
|
||||||
slackId: osuUsers.find(v => v[0] == user.id)![1],
|
slackId: osuUsers.find(v => v[0] == user.id)![1],
|
||||||
score: {
|
score: {
|
||||||
osu: user.statistics_rulesets.osu?.total_score || 0,
|
osu: Math.floor(user.statistics_rulesets.osu?.pp) || 0,
|
||||||
taiko: user.statistics_rulesets.taiko?.total_score || 0,
|
taiko: Math.floor(user.statistics_rulesets.taiko?.pp) || 0,
|
||||||
fruits: user.statistics_rulesets.fruits?.total_score || 0,
|
fruits: Math.floor(user.statistics_rulesets.fruits?.pp) || 0,
|
||||||
mania: user.statistics_rulesets.mania?.total_score || 0,
|
mania: Math.floor(user.statistics_rulesets.mania?.pp) || 0,
|
||||||
}
|
}
|
||||||
})))
|
})))
|
||||||
}
|
}
|
||||||
|
@ -1312,7 +1312,10 @@ const processQueue = async () => {
|
||||||
skin: 'default',
|
skin: 'default',
|
||||||
username: job.playerName,
|
username: job.playerName,
|
||||||
showDanserLogo: false,
|
showDanserLogo: false,
|
||||||
resolution: '1280x720'
|
resolution: '1280x720',
|
||||||
|
introBGDim: 100,
|
||||||
|
inGameBGDim: 100,
|
||||||
|
breakBGDim: 100
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(render)
|
console.log(render)
|
||||||
|
@ -1424,12 +1427,15 @@ app.event("message", async (ctx) => {
|
||||||
replayFile.write(replayBuffer);
|
replayFile.write(replayBuffer);
|
||||||
replayFile.end();
|
replayFile.end();
|
||||||
|
|
||||||
|
|
||||||
|
replayFile.on('finish', () => {
|
||||||
addToQueue({
|
addToQueue({
|
||||||
md5: _replay.replayMD5,
|
md5: _replay.replayMD5,
|
||||||
playerName: _replay.playerName,
|
playerName: _replay.playerName,
|
||||||
ts: ts,
|
ts: ts,
|
||||||
userId: ctx.context.userId!
|
userId: ctx.context.userId!
|
||||||
})
|
})
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
; (async () => {
|
; (async () => {
|
||||||
|
|
Loading…
Reference in a new issue