mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-21 17:34:46 -05:00
Add GITADORA HIGH-VOLTAGE support with bugfixes.
This commit is contained in:
parent
87f6ba2abb
commit
a628fc437a
|
|
@ -11,6 +11,20 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||
const level: number = U.GetConfig("encore_version")
|
||||
const ntDummyEncore = U.GetConfig("nextage_dummy_encore")
|
||||
switch (getVersion(info)) {
|
||||
case 'highvoltage':
|
||||
return {
|
||||
level,
|
||||
musics: [
|
||||
2686, // CYCLONICxSTORM
|
||||
2687, // Heptagram
|
||||
2700, // Saiph
|
||||
2706, // LUCID NIGHTMARE
|
||||
2740, // Mobius
|
||||
2748, // Under The Shades Of The Divine Ray
|
||||
2772, // REBELLION
|
||||
2812, // THE LAST OF FIREFACE
|
||||
]
|
||||
}
|
||||
case 'nextage':
|
||||
return {
|
||||
level,
|
||||
|
|
|
|||
1
gitadora@asphyxia/data/mdb/hv.b64
Normal file
1
gitadora@asphyxia/data/mdb/hv.b64
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -42,7 +42,7 @@ export async function readMDBFile(path: string, processHandler?: processRawDataH
|
|||
processHandler = processHandler ?? defaultProcessRawXmlData
|
||||
result = await processHandler(path)
|
||||
// Uncomment to save the loaded XML file as JSON.
|
||||
// await IO.WriteFile(path.replace(".xml", ".json"), JSON.stringify(data))
|
||||
// await IO.WriteFile(path.replace(".xml", ".json"), JSON.stringify(result))
|
||||
break;
|
||||
case '.b64':
|
||||
const buff = await IO.ReadFile(path, 'utf-8');
|
||||
|
|
|
|||
|
|
@ -102,22 +102,22 @@ export const getPlayer: EPR = async (info, data, send) => {
|
|||
musicdata.push(K.ATTR({ musicid }, {
|
||||
mdata: K.ARRAY('s16', [
|
||||
-1,
|
||||
_.get(score, 'diffs.1.perc', -2),
|
||||
_.get(score, 'diffs.2.perc', -2),
|
||||
_.get(score, 'diffs.3.perc', -2),
|
||||
_.get(score, 'diffs.4.perc', -2),
|
||||
_.get(score, 'diffs.5.perc', -2),
|
||||
_.get(score, 'diffs.6.perc', -2),
|
||||
_.get(score, 'diffs.7.perc', -2),
|
||||
_.get(score, 'diffs.8.perc', -2),
|
||||
_.get(score, 'diffs.1.rank', 0),
|
||||
_.get(score, 'diffs.2.rank', 0),
|
||||
_.get(score, 'diffs.3.rank', 0),
|
||||
_.get(score, 'diffs.4.rank', 0),
|
||||
_.get(score, 'diffs.5.rank', 0),
|
||||
_.get(score, 'diffs.6.rank', 0),
|
||||
_.get(score, 'diffs.7.rank', 0),
|
||||
_.get(score, 'diffs.8.rank', 0),
|
||||
_.get(score, 'diffs.1.clear', false) ? _.get(score, 'diffs.1.perc', -2) : -1,
|
||||
_.get(score, 'diffs.2.clear', false) ? _.get(score, 'diffs.2.perc', -2) : -1,
|
||||
_.get(score, 'diffs.3.clear', false) ? _.get(score, 'diffs.3.perc', -2) : -1,
|
||||
_.get(score, 'diffs.4.clear', false) ? _.get(score, 'diffs.4.perc', -2) : -1,
|
||||
_.get(score, 'diffs.5.clear', false) ? _.get(score, 'diffs.5.perc', -2) : -1,
|
||||
_.get(score, 'diffs.6.clear', false) ? _.get(score, 'diffs.6.perc', -2) : -1,
|
||||
_.get(score, 'diffs.7.clear', false) ? _.get(score, 'diffs.7.perc', -2) : -1,
|
||||
_.get(score, 'diffs.8.clear', false) ? _.get(score, 'diffs.8.perc', -2) : -1,
|
||||
_.get(score, 'diffs.1.clear', false) ? _.get(score, 'diffs.1.rank', 0) : -1,
|
||||
_.get(score, 'diffs.2.clear', false) ? _.get(score, 'diffs.2.rank', 0) : -1,
|
||||
_.get(score, 'diffs.3.clear', false) ? _.get(score, 'diffs.3.rank', 0) : -1,
|
||||
_.get(score, 'diffs.4.clear', false) ? _.get(score, 'diffs.4.rank', 0) : -1,
|
||||
_.get(score, 'diffs.5.clear', false) ? _.get(score, 'diffs.5.rank', 0) : -1,
|
||||
_.get(score, 'diffs.6.clear', false) ? _.get(score, 'diffs.6.rank', 0) : -1,
|
||||
_.get(score, 'diffs.7.clear', false) ? _.get(score, 'diffs.7.rank', 0) : -1,
|
||||
_.get(score, 'diffs.8.clear', false) ? _.get(score, 'diffs.8.rank', 0) : -1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
|
@ -629,6 +629,7 @@ async function updatePlayerScoreCollection(refid, playedStages, version, game) {
|
|||
const clear = stage.bool('clear');
|
||||
const fc = stage.bool('fullcombo');
|
||||
const ex = stage.bool('excellent');
|
||||
const newMeter = stage.bool('is_new_meter');
|
||||
|
||||
const perc = stage.number('perc', 0);
|
||||
const rank = stage.number('rank', 0);
|
||||
|
|
@ -650,7 +651,7 @@ async function updatePlayerScoreCollection(refid, playedStages, version, game) {
|
|||
scores[mid].diffs[seq] = { //FIXME: Real server is bit complicated. this one is too buggy.
|
||||
perc: Math.max(_.get(scores[mid].diffs[seq], 'perc', 0), perc),
|
||||
rank: Math.max(_.get(scores[mid].diffs[seq], 'rank', 0), rank),
|
||||
meter: meter.toString(),
|
||||
meter: newMeter ? meter.toString() : _.get(scores[mid].diffs[seq], 'meter', 0),
|
||||
prog: Math.max(_.get(scores[mid].diffs[seq], 'prog', 0), prog),
|
||||
clear: _.get(scores[mid].diffs[seq], 'clear') || clear,
|
||||
fc: _.get(scores[mid].diffs[seq], 'fc') || fc,
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ export function register() {
|
|||
R.Route(`exchain_${method}`, handler);
|
||||
R.Route(`matixx_${method}`, handler);
|
||||
R.Route(`nextage_${method}`, handler)
|
||||
R.Route(`highvoltage_${method}`, handler)
|
||||
// TODO: TB, TBRE and more older version?
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -7,15 +7,28 @@
|
|||
function getFullGameName(shortName) {
|
||||
switch (shortName) {
|
||||
case "dm" :
|
||||
return "Drummania"
|
||||
case "gf":
|
||||
return "Guitar Freaks"
|
||||
default:
|
||||
return "DrumMania"
|
||||
case "gf":
|
||||
return "GuitarFreaks"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
}
|
||||
|
||||
const versions = ["exchain", "nextage"]
|
||||
function getFullVersionName(shortName) {
|
||||
switch (shortName) {
|
||||
case "exchain" :
|
||||
return "GITADORA EXCHAIN"
|
||||
case "nextage":
|
||||
return "GITADORA NEX+AGE"
|
||||
case "highvoltage":
|
||||
return "GITADORA HIGH-VOLTAGE"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
}
|
||||
|
||||
const versions = ["exchain", "nextage", "highvoltage"]
|
||||
const games = ["gf", "dm"]
|
||||
|
||||
function generateLeaderboards(infos, profiles) {
|
||||
|
|
@ -64,7 +77,7 @@
|
|||
-
|
||||
|
||||
each board in generateLeaderboards(infos, profiles)
|
||||
h3 #{getFullGameName(board.game)} #{board.version}
|
||||
h3 #{getFullVersionName(board.version)} #{getFullGameName(board.game)}
|
||||
table
|
||||
tr
|
||||
th Rank
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user