mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-04-26 02:02:29 -05:00
Fix forteNumericHandler that not follow isForte.
This commit is contained in:
parent
124ad7087b
commit
f1878c09a6
|
|
@ -173,9 +173,9 @@ const getPlayerData = async (refid: string, info: EamuseInfo, name?: string) =>
|
||||||
flag: correct_music_list2,
|
flag: correct_music_list2,
|
||||||
},
|
},
|
||||||
last: {
|
last: {
|
||||||
music_index: K.ITEM('s32', forteNumericHandler(p.music, 195, 0)),
|
music_index: K.ITEM('s32', forteNumericHandler(isForte, p.music, 195, 0)),
|
||||||
sheet_type: K.ITEM('s8', forteNumericHandler(p.sheet, 3, 0)),
|
sheet_type: K.ITEM('s8', forteNumericHandler(isForte, p.sheet, 3, 0)),
|
||||||
brooch_index: K.ITEM('s32', forteNumericHandler(p.brooch, 147, 0)),
|
brooch_index: K.ITEM('s32', forteNumericHandler(isForte, p.brooch, 147, 0)),
|
||||||
hi_speed_level: K.ITEM('s32', p.hispeed),
|
hi_speed_level: K.ITEM('s32', p.hispeed),
|
||||||
beat_guide: K.ITEM('s8', p.beatGuide),
|
beat_guide: K.ITEM('s8', p.beatGuide),
|
||||||
headphone_volume: K.ITEM('s8', p.headphone),
|
headphone_volume: K.ITEM('s8', p.headphone),
|
||||||
|
|
@ -526,8 +526,8 @@ export const get_musicdata: EPR = async (info, data, send) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function forteNumericHandler(input: number, max: number, def: number = 0) {
|
function forteNumericHandler(isForte: boolean, input: number, max: number, def: number = 0) {
|
||||||
return input > max ? def : input;
|
return isForte ? input > max ? def : input : input;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function readProfile(refid: string): Promise<Profile> {
|
async function readProfile(refid: string): Promise<Profile> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user