mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-09-22 22:27:56 +03:00
Add GITADORA HIGH-VOLTAGE support with bugfixes.
This commit is contained in:
@@ -11,6 +11,20 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||||||
const level: number = U.GetConfig("encore_version")
|
const level: number = U.GetConfig("encore_version")
|
||||||
const ntDummyEncore = U.GetConfig("nextage_dummy_encore")
|
const ntDummyEncore = U.GetConfig("nextage_dummy_encore")
|
||||||
switch (getVersion(info)) {
|
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':
|
case 'nextage':
|
||||||
return {
|
return {
|
||||||
level,
|
level,
|
||||||
|
|||||||
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
|
processHandler = processHandler ?? defaultProcessRawXmlData
|
||||||
result = await processHandler(path)
|
result = await processHandler(path)
|
||||||
// Uncomment to save the loaded XML file as JSON.
|
// 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;
|
break;
|
||||||
case '.b64':
|
case '.b64':
|
||||||
const buff = await IO.ReadFile(path, 'utf-8');
|
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 }, {
|
musicdata.push(K.ATTR({ musicid }, {
|
||||||
mdata: K.ARRAY('s16', [
|
mdata: K.ARRAY('s16', [
|
||||||
-1,
|
-1,
|
||||||
_.get(score, 'diffs.1.perc', -2),
|
_.get(score, 'diffs.1.clear', false) ? _.get(score, 'diffs.1.perc', -2) : -1,
|
||||||
_.get(score, 'diffs.2.perc', -2),
|
_.get(score, 'diffs.2.clear', false) ? _.get(score, 'diffs.2.perc', -2) : -1,
|
||||||
_.get(score, 'diffs.3.perc', -2),
|
_.get(score, 'diffs.3.clear', false) ? _.get(score, 'diffs.3.perc', -2) : -1,
|
||||||
_.get(score, 'diffs.4.perc', -2),
|
_.get(score, 'diffs.4.clear', false) ? _.get(score, 'diffs.4.perc', -2) : -1,
|
||||||
_.get(score, 'diffs.5.perc', -2),
|
_.get(score, 'diffs.5.clear', false) ? _.get(score, 'diffs.5.perc', -2) : -1,
|
||||||
_.get(score, 'diffs.6.perc', -2),
|
_.get(score, 'diffs.6.clear', false) ? _.get(score, 'diffs.6.perc', -2) : -1,
|
||||||
_.get(score, 'diffs.7.perc', -2),
|
_.get(score, 'diffs.7.clear', false) ? _.get(score, 'diffs.7.perc', -2) : -1,
|
||||||
_.get(score, 'diffs.8.perc', -2),
|
_.get(score, 'diffs.8.clear', false) ? _.get(score, 'diffs.8.perc', -2) : -1,
|
||||||
_.get(score, 'diffs.1.rank', 0),
|
_.get(score, 'diffs.1.clear', false) ? _.get(score, 'diffs.1.rank', 0) : -1,
|
||||||
_.get(score, 'diffs.2.rank', 0),
|
_.get(score, 'diffs.2.clear', false) ? _.get(score, 'diffs.2.rank', 0) : -1,
|
||||||
_.get(score, 'diffs.3.rank', 0),
|
_.get(score, 'diffs.3.clear', false) ? _.get(score, 'diffs.3.rank', 0) : -1,
|
||||||
_.get(score, 'diffs.4.rank', 0),
|
_.get(score, 'diffs.4.clear', false) ? _.get(score, 'diffs.4.rank', 0) : -1,
|
||||||
_.get(score, 'diffs.5.rank', 0),
|
_.get(score, 'diffs.5.clear', false) ? _.get(score, 'diffs.5.rank', 0) : -1,
|
||||||
_.get(score, 'diffs.6.rank', 0),
|
_.get(score, 'diffs.6.clear', false) ? _.get(score, 'diffs.6.rank', 0) : -1,
|
||||||
_.get(score, 'diffs.7.rank', 0),
|
_.get(score, 'diffs.7.clear', false) ? _.get(score, 'diffs.7.rank', 0) : -1,
|
||||||
_.get(score, 'diffs.8.rank', 0),
|
_.get(score, 'diffs.8.clear', false) ? _.get(score, 'diffs.8.rank', 0) : -1,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@@ -629,6 +629,7 @@ async function updatePlayerScoreCollection(refid, playedStages, version, game) {
|
|||||||
const clear = stage.bool('clear');
|
const clear = stage.bool('clear');
|
||||||
const fc = stage.bool('fullcombo');
|
const fc = stage.bool('fullcombo');
|
||||||
const ex = stage.bool('excellent');
|
const ex = stage.bool('excellent');
|
||||||
|
const newMeter = stage.bool('is_new_meter');
|
||||||
|
|
||||||
const perc = stage.number('perc', 0);
|
const perc = stage.number('perc', 0);
|
||||||
const rank = stage.number('rank', 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.
|
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),
|
perc: Math.max(_.get(scores[mid].diffs[seq], 'perc', 0), perc),
|
||||||
rank: Math.max(_.get(scores[mid].diffs[seq], 'rank', 0), rank),
|
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),
|
prog: Math.max(_.get(scores[mid].diffs[seq], 'prog', 0), prog),
|
||||||
clear: _.get(scores[mid].diffs[seq], 'clear') || clear,
|
clear: _.get(scores[mid].diffs[seq], 'clear') || clear,
|
||||||
fc: _.get(scores[mid].diffs[seq], 'fc') || fc,
|
fc: _.get(scores[mid].diffs[seq], 'fc') || fc,
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export function register() {
|
|||||||
R.Route(`exchain_${method}`, handler);
|
R.Route(`exchain_${method}`, handler);
|
||||||
R.Route(`matixx_${method}`, handler);
|
R.Route(`matixx_${method}`, handler);
|
||||||
R.Route(`nextage_${method}`, handler)
|
R.Route(`nextage_${method}`, handler)
|
||||||
|
R.Route(`highvoltage_${method}`, handler)
|
||||||
// TODO: TB, TBRE and more older version?
|
// TODO: TB, TBRE and more older version?
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,15 +7,28 @@
|
|||||||
function getFullGameName(shortName) {
|
function getFullGameName(shortName) {
|
||||||
switch (shortName) {
|
switch (shortName) {
|
||||||
case "dm" :
|
case "dm" :
|
||||||
return "Drummania"
|
return "DrumMania"
|
||||||
case "gf":
|
case "gf":
|
||||||
return "Guitar Freaks"
|
return "GuitarFreaks"
|
||||||
default:
|
default:
|
||||||
return "Unknown"
|
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"]
|
const games = ["gf", "dm"]
|
||||||
|
|
||||||
function generateLeaderboards(infos, profiles) {
|
function generateLeaderboards(infos, profiles) {
|
||||||
@@ -64,7 +77,7 @@
|
|||||||
-
|
-
|
||||||
|
|
||||||
each board in generateLeaderboards(infos, profiles)
|
each board in generateLeaderboards(infos, profiles)
|
||||||
h3 #{getFullGameName(board.game)} #{board.version}
|
h3 #{getFullVersionName(board.version)} #{getFullGameName(board.game)}
|
||||||
table
|
table
|
||||||
tr
|
tr
|
||||||
th Rank
|
th Rank
|
||||||
|
|||||||
Reference in New Issue
Block a user