mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-06-10 17:32:21 -05:00
2
This commit is contained in:
parent
e584c0be3b
commit
42f7451850
|
|
@ -1,4 +1,5 @@
|
|||
import { getVersion } from "../utils";
|
||||
import { isGalaxyWaveDeltaModel } from "../utils";
|
||||
|
||||
interface EncoreStageData {
|
||||
level: number
|
||||
|
|
@ -8,13 +9,34 @@ interface EncoreStageData {
|
|||
|
||||
export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
||||
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 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)) {
|
||||
case 'galaxywave':
|
||||
return {
|
||||
level,
|
||||
musics: [
|
||||
level: level('galaxywave'),
|
||||
musics: [
|
||||
2866, // Calm days
|
||||
2893, // 愛はToxic! feat.Lilymone
|
||||
2885, // Astrum
|
||||
|
|
@ -30,8 +52,8 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||
}
|
||||
case 'fuzzup':
|
||||
return {
|
||||
level,
|
||||
musics: [
|
||||
level: level('fuzzup'),
|
||||
musics: [
|
||||
2812, // THE LAST OF FIREFACE
|
||||
2814, // ENCOUNT
|
||||
2783, // Q転直下
|
||||
|
|
@ -44,7 +66,7 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||
}
|
||||
case 'highvoltage':
|
||||
return {
|
||||
level,
|
||||
level: level('highvoltage'),
|
||||
musics: [
|
||||
2686, // CYCLONICxSTORM
|
||||
2687, // Heptagram
|
||||
|
|
@ -58,8 +80,8 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||
}
|
||||
case 'nextage':
|
||||
return {
|
||||
level,
|
||||
musics: !ntDummyEncore ? [
|
||||
level: level('nextage'),
|
||||
musics: !ntDummyEncore ? [
|
||||
2587, // 悪魔のハニープリン
|
||||
2531, // The ULTIMATES -reminiscence-
|
||||
2612, // ECLIPSE 2
|
||||
|
|
@ -75,26 +97,26 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||
}
|
||||
case 'exchain':
|
||||
return {
|
||||
level,
|
||||
level: level('exchain'),
|
||||
musics: [
|
||||
2246, // 箱庭の世界
|
||||
2498, // Cinnamon
|
||||
2500, // キヤロラ衛星の軌跡
|
||||
2529, // グリーンリーフ症候群
|
||||
2548, // Let's Dance
|
||||
2587, // 悪魔のハニープリン
|
||||
5020, // Timepiece phase II (CLASSIC)
|
||||
5033, // MODEL FT2 Miracle Version (CLASSIC)
|
||||
2586, // 美麗的夏日風
|
||||
2548, // Let's Dance
|
||||
2587, // 悪魔のハニープリン
|
||||
5020, // Timepiece phase II (CLASSIC)
|
||||
5033, // MODEL FT2 Miracle Version (CLASSIC)
|
||||
2586, // 美麗的夏日風
|
||||
5060, // EXCELSIOR DIVE (CLASSIC)
|
||||
2530, // The ULTIMATES -CHRONICLE-
|
||||
2581, // 幸せの代償
|
||||
5046, // Rock to Infinity (CLASSIC)
|
||||
5046, // Rock to Infinity (CLASSIC)
|
||||
]
|
||||
}
|
||||
case 'matixx':
|
||||
return {
|
||||
level,
|
||||
level: level('matixx'),
|
||||
musics: [
|
||||
2432, // Durian
|
||||
2445, // ヤオヨロズランズ
|
||||
|
|
@ -103,17 +125,17 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||
2444, // Aion
|
||||
2381, // Duella Lyrica
|
||||
2471, // triangulum
|
||||
2476, // MODEL FT4
|
||||
2476, // MODEL FT4
|
||||
2486, // 煉獄事変
|
||||
2496, // CAPTURING XANADU
|
||||
2497, // Physical Decay
|
||||
2499, // Cinnamon
|
||||
2499, // Cinnamon
|
||||
2498, // けもののおうじゃ★めうめう
|
||||
]
|
||||
}
|
||||
case 're':
|
||||
return {
|
||||
level,
|
||||
level: level('re'),
|
||||
musics: [
|
||||
2341, // Anathema
|
||||
2384, // White Forest
|
||||
|
|
@ -129,4 +151,19 @@ export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
|||
default:
|
||||
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 => {
|
||||
return {
|
||||
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) },
|
||||
battle: { 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)),
|
||||
}
|
||||
},
|
||||
jubeat_omiyage_challenge: {},
|
||||
kac2017: {},
|
||||
nostalgia_concert: {},
|
||||
galaxy_parade: {
|
||||
corner_list: {},
|
||||
gacha_table: {},
|
||||
},
|
||||
gitadoradon: {},
|
||||
entry_information :{},
|
||||
trbitemdata: {},
|
||||
ctrl_movie: {},
|
||||
ng_jacket: {},
|
||||
ng_recommend_music: {},
|
||||
ranking: {
|
||||
skill_0_999: {},
|
||||
skill_1000_1499: {},
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ import { PlayerRanking } from "../models/playerranking";
|
|||
import { getDefaultProfile, Profile } from "../models/profile";
|
||||
import { getDefaultRecord, Record } from "../models/record";
|
||||
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 { PLUGIN_VER } from "../const";
|
||||
|
|
@ -33,7 +35,7 @@ export const regist: EPR = async (info, data, send) => {
|
|||
}
|
||||
|
||||
const no = getPlayerNo(data);
|
||||
const version = getVersion(info);
|
||||
const version = DELTA_VERSION;
|
||||
const playerInfo = await getOrRegisterPlayerInfo(refid, version, no);
|
||||
|
||||
await send.object({
|
||||
|
|
@ -54,7 +56,7 @@ export const check: EPR = async (info, data, send) => {
|
|||
}
|
||||
|
||||
const no = getPlayerNo(data);
|
||||
const version = getVersion(info)
|
||||
const version = DELTA_VERSION;
|
||||
const playerInfo = await getOrRegisterPlayerInfo(refid, version, no)
|
||||
|
||||
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 version = getVersion(info);
|
||||
const version = DELTA_VERSION;
|
||||
const time = BigInt(31536000);
|
||||
const dm = isDM(info);
|
||||
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) => {
|
||||
|
||||
const version = getVersion(info);
|
||||
const version = DELTA_VERSION;
|
||||
const dm = isDM(info);
|
||||
const game = dm ? 'dm' : 'gf';
|
||||
const sharedScoresEnabled = isSharedSongScoresEnabled();
|
||||
|
|
|
|||
|
|
@ -21,6 +21,14 @@ export function register() {
|
|||
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", {
|
||||
name: "Dummy Encore for SPE (Nextage Only)",
|
||||
desc: "Since Nextage's Special Premium Encore system is bit complicated, \n"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user