mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-09-22 22:27:56 +03:00
2
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { getVersion } from "../utils";
|
import { getVersion } from "../utils";
|
||||||
|
import { isGalaxyWaveDeltaModel } from "../utils";
|
||||||
|
|
||||||
interface EncoreStageData {
|
interface EncoreStageData {
|
||||||
level: number
|
level: number
|
||||||
@@ -8,13 +9,34 @@ interface EncoreStageData {
|
|||||||
|
|
||||||
export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
||||||
const fallback = { level: 10, musics: [0] }
|
const fallback = { level: 10, musics: [0] }
|
||||||
const level: number = U.GetConfig("encore_version")
|
const customLevel: number = U.GetConfig("encore_version")
|
||||||
|
const useCustomLevel: boolean = U.GetConfig("use_custom_encore_level")
|
||||||
const ntDummyEncore = U.GetConfig("nextage_dummy_encore")
|
const ntDummyEncore = U.GetConfig("nextage_dummy_encore")
|
||||||
|
|
||||||
|
const level = (ver: string) => useCustomLevel ? customLevel : getPredefinedLevel(ver);
|
||||||
|
|
||||||
|
// GALAXY WAVE DELTA uses same route prefix, detect by model instead
|
||||||
|
if (isGalaxyWaveDeltaModel(info.model)) {
|
||||||
|
return {
|
||||||
|
level: level('galaxywave_delta'),
|
||||||
|
musics: [
|
||||||
|
2939, // Hopeful Daybreak!!!
|
||||||
|
2956, // Over Time Groove
|
||||||
|
2942, // Bellatrix
|
||||||
|
3008, // Questions That Should Not Be Answered
|
||||||
|
3009, // LIQUID NOTES
|
||||||
|
3011, // D光石火
|
||||||
|
3017, // Peyotl
|
||||||
|
3018, // Neoverse
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (getVersion(info)) {
|
switch (getVersion(info)) {
|
||||||
case 'galaxywave':
|
case 'galaxywave':
|
||||||
return {
|
return {
|
||||||
level,
|
level: level('galaxywave'),
|
||||||
musics: [
|
musics: [
|
||||||
2866, // Calm days
|
2866, // Calm days
|
||||||
2893, // 愛はToxic! feat.Lilymone
|
2893, // 愛はToxic! feat.Lilymone
|
||||||
2885, // Astrum
|
2885, // Astrum
|
||||||
@@ -30,8 +52,8 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||||||
}
|
}
|
||||||
case 'fuzzup':
|
case 'fuzzup':
|
||||||
return {
|
return {
|
||||||
level,
|
level: level('fuzzup'),
|
||||||
musics: [
|
musics: [
|
||||||
2812, // THE LAST OF FIREFACE
|
2812, // THE LAST OF FIREFACE
|
||||||
2814, // ENCOUNT
|
2814, // ENCOUNT
|
||||||
2783, // Q転直下
|
2783, // Q転直下
|
||||||
@@ -44,7 +66,7 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||||||
}
|
}
|
||||||
case 'highvoltage':
|
case 'highvoltage':
|
||||||
return {
|
return {
|
||||||
level,
|
level: level('highvoltage'),
|
||||||
musics: [
|
musics: [
|
||||||
2686, // CYCLONICxSTORM
|
2686, // CYCLONICxSTORM
|
||||||
2687, // Heptagram
|
2687, // Heptagram
|
||||||
@@ -58,8 +80,8 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||||||
}
|
}
|
||||||
case 'nextage':
|
case 'nextage':
|
||||||
return {
|
return {
|
||||||
level,
|
level: level('nextage'),
|
||||||
musics: !ntDummyEncore ? [
|
musics: !ntDummyEncore ? [
|
||||||
2587, // 悪魔のハニープリン
|
2587, // 悪魔のハニープリン
|
||||||
2531, // The ULTIMATES -reminiscence-
|
2531, // The ULTIMATES -reminiscence-
|
||||||
2612, // ECLIPSE 2
|
2612, // ECLIPSE 2
|
||||||
@@ -75,26 +97,26 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||||||
}
|
}
|
||||||
case 'exchain':
|
case 'exchain':
|
||||||
return {
|
return {
|
||||||
level,
|
level: level('exchain'),
|
||||||
musics: [
|
musics: [
|
||||||
2246, // 箱庭の世界
|
2246, // 箱庭の世界
|
||||||
2498, // Cinnamon
|
2498, // Cinnamon
|
||||||
2500, // キヤロラ衛星の軌跡
|
2500, // キヤロラ衛星の軌跡
|
||||||
2529, // グリーンリーフ症候群
|
2529, // グリーンリーフ症候群
|
||||||
2548, // Let's Dance
|
2548, // Let's Dance
|
||||||
2587, // 悪魔のハニープリン
|
2587, // 悪魔のハニープリン
|
||||||
5020, // Timepiece phase II (CLASSIC)
|
5020, // Timepiece phase II (CLASSIC)
|
||||||
5033, // MODEL FT2 Miracle Version (CLASSIC)
|
5033, // MODEL FT2 Miracle Version (CLASSIC)
|
||||||
2586, // 美麗的夏日風
|
2586, // 美麗的夏日風
|
||||||
5060, // EXCELSIOR DIVE (CLASSIC)
|
5060, // EXCELSIOR DIVE (CLASSIC)
|
||||||
2530, // The ULTIMATES -CHRONICLE-
|
2530, // The ULTIMATES -CHRONICLE-
|
||||||
2581, // 幸せの代償
|
2581, // 幸せの代償
|
||||||
5046, // Rock to Infinity (CLASSIC)
|
5046, // Rock to Infinity (CLASSIC)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
case 'matixx':
|
case 'matixx':
|
||||||
return {
|
return {
|
||||||
level,
|
level: level('matixx'),
|
||||||
musics: [
|
musics: [
|
||||||
2432, // Durian
|
2432, // Durian
|
||||||
2445, // ヤオヨロズランズ
|
2445, // ヤオヨロズランズ
|
||||||
@@ -103,17 +125,17 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||||||
2444, // Aion
|
2444, // Aion
|
||||||
2381, // Duella Lyrica
|
2381, // Duella Lyrica
|
||||||
2471, // triangulum
|
2471, // triangulum
|
||||||
2476, // MODEL FT4
|
2476, // MODEL FT4
|
||||||
2486, // 煉獄事変
|
2486, // 煉獄事変
|
||||||
2496, // CAPTURING XANADU
|
2496, // CAPTURING XANADU
|
||||||
2497, // Physical Decay
|
2497, // Physical Decay
|
||||||
2499, // Cinnamon
|
2499, // Cinnamon
|
||||||
2498, // けもののおうじゃ★めうめう
|
2498, // けもののおうじゃ★めうめう
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
case 're':
|
case 're':
|
||||||
return {
|
return {
|
||||||
level,
|
level: level('re'),
|
||||||
musics: [
|
musics: [
|
||||||
2341, // Anathema
|
2341, // Anathema
|
||||||
2384, // White Forest
|
2384, // White Forest
|
||||||
@@ -129,4 +151,19 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||||||
default:
|
default:
|
||||||
return fallback
|
return fallback
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPredefinedLevel(ver: string): number {
|
||||||
|
// Placeholder values, to be replaced with real data
|
||||||
|
switch (ver) {
|
||||||
|
case 'galaxywave_delta': return 5;
|
||||||
|
case 'galaxywave': return 5;
|
||||||
|
case 'fuzzup': return 5;
|
||||||
|
case 'highvoltage': return 5;
|
||||||
|
case 'nextage': return 5;
|
||||||
|
case 'exchain': return 5;
|
||||||
|
case 'matixx': return 5;
|
||||||
|
case 're': return 5;
|
||||||
|
default: return 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -34,12 +34,10 @@ export const gameInfoGet: EPR = async (info, data, send) => {
|
|||||||
music: extraData.musics.map(mid => {
|
music: extraData.musics.map(mid => {
|
||||||
return {
|
return {
|
||||||
musicid: K.ITEM('s32', mid),
|
musicid: K.ITEM('s32', mid),
|
||||||
get_border: K.ITEM('u8', 0),
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
infect_music: { term: K.ITEM('u8', 0) },
|
|
||||||
unlock_challenge: { term: K.ITEM('s32', 0) },
|
unlock_challenge: { term: K.ITEM('s32', 0) },
|
||||||
battle: { term: K.ITEM('s32', 0) },
|
battle: { term: K.ITEM('s32', 0) },
|
||||||
battle_chara: { term: K.ITEM('s32', 0) },
|
battle_chara: { term: K.ITEM('s32', 0) },
|
||||||
@@ -92,13 +90,15 @@ export const gameInfoGet: EPR = async (info, data, send) => {
|
|||||||
end_date_ms: K.ITEM('u64', BigInt(0)),
|
end_date_ms: K.ITEM('u64', BigInt(0)),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
jubeat_omiyage_challenge: {},
|
galaxy_parade: {
|
||||||
kac2017: {},
|
corner_list: {},
|
||||||
nostalgia_concert: {},
|
gacha_table: {},
|
||||||
|
},
|
||||||
|
gitadoradon: {},
|
||||||
|
entry_information :{},
|
||||||
trbitemdata: {},
|
trbitemdata: {},
|
||||||
ctrl_movie: {},
|
ctrl_movie: {},
|
||||||
ng_jacket: {},
|
ng_jacket: {},
|
||||||
ng_recommend_music: {},
|
|
||||||
ranking: {
|
ranking: {
|
||||||
skill_0_999: {},
|
skill_0_999: {},
|
||||||
skill_1000_1499: {},
|
skill_1000_1499: {},
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import { PlayerRanking } from "../models/playerranking";
|
|||||||
import { getDefaultProfile, Profile } from "../models/profile";
|
import { getDefaultProfile, Profile } from "../models/profile";
|
||||||
import { getDefaultRecord, Record } from "../models/record";
|
import { getDefaultRecord, Record } from "../models/record";
|
||||||
import { Extra, getDefaultExtra } from "../models/extra";
|
import { Extra, getDefaultExtra } from "../models/extra";
|
||||||
import { getVersion, isDM } from "../utils";
|
import { isDM } from "../utils";
|
||||||
|
|
||||||
|
const DELTA_VERSION = "galaxywave_delta";
|
||||||
import { getDefaultScores, Scores } from "../models/scores";
|
import { getDefaultScores, Scores } from "../models/scores";
|
||||||
|
|
||||||
import { PLUGIN_VER } from "../const";
|
import { PLUGIN_VER } from "../const";
|
||||||
@@ -33,7 +35,7 @@ export const regist: EPR = async (info, data, send) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const no = getPlayerNo(data);
|
const no = getPlayerNo(data);
|
||||||
const version = getVersion(info);
|
const version = DELTA_VERSION;
|
||||||
const playerInfo = await getOrRegisterPlayerInfo(refid, version, no);
|
const playerInfo = await getOrRegisterPlayerInfo(refid, version, no);
|
||||||
|
|
||||||
await send.object({
|
await send.object({
|
||||||
@@ -54,7 +56,7 @@ export const check: EPR = async (info, data, send) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const no = getPlayerNo(data);
|
const no = getPlayerNo(data);
|
||||||
const version = getVersion(info)
|
const version = DELTA_VERSION;
|
||||||
const playerInfo = await getOrRegisterPlayerInfo(refid, version, no)
|
const playerInfo = await getOrRegisterPlayerInfo(refid, version, no)
|
||||||
|
|
||||||
const result : CheckPlayerResponse = getCheckPlayerResponse(no, playerInfo.name, playerInfo.id)
|
const result : CheckPlayerResponse = getCheckPlayerResponse(no, playerInfo.name, playerInfo.id)
|
||||||
@@ -69,7 +71,7 @@ export const getPlayer: EPR = async (info, data, send) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const no = getPlayerNo(data);
|
const no = getPlayerNo(data);
|
||||||
const version = getVersion(info);
|
const version = DELTA_VERSION;
|
||||||
const time = BigInt(31536000);
|
const time = BigInt(31536000);
|
||||||
const dm = isDM(info);
|
const dm = isDM(info);
|
||||||
const game = dm ? 'dm' : 'gf';
|
const game = dm ? 'dm' : 'gf';
|
||||||
@@ -523,7 +525,7 @@ async function registerUser(refid: string, version: string, id = _.random(0, 999
|
|||||||
|
|
||||||
export const savePlayers: EPR = async (info, data, send) => {
|
export const savePlayers: EPR = async (info, data, send) => {
|
||||||
|
|
||||||
const version = getVersion(info);
|
const version = DELTA_VERSION;
|
||||||
const dm = isDM(info);
|
const dm = isDM(info);
|
||||||
const game = dm ? 'dm' : 'gf';
|
const game = dm ? 'dm' : 'gf';
|
||||||
const sharedScoresEnabled = isSharedSongScoresEnabled();
|
const sharedScoresEnabled = isSharedSongScoresEnabled();
|
||||||
|
|||||||
@@ -21,6 +21,14 @@ export function register() {
|
|||||||
default: 13,
|
default: 13,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
R.Config("use_custom_encore_level", {
|
||||||
|
name: "Use Custom Encore Level",
|
||||||
|
desc: "If enabled, the encore level is controlled by the 'Encore Version' setting above. " +
|
||||||
|
"If disabled, predefined encore levels per version are used instead.",
|
||||||
|
type: "boolean",
|
||||||
|
default: true,
|
||||||
|
})
|
||||||
|
|
||||||
R.Config("nextage_dummy_encore", {
|
R.Config("nextage_dummy_encore", {
|
||||||
name: "Dummy Encore for SPE (Nextage Only)",
|
name: "Dummy Encore for SPE (Nextage Only)",
|
||||||
desc: "Since Nextage's Special Premium Encore system is bit complicated, \n"
|
desc: "Since Nextage's Special Premium Encore system is bit complicated, \n"
|
||||||
|
|||||||
Reference in New Issue
Block a user