mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-22 01:44:39 -05:00
Lapistoria+ : Add force unlock option
This commit is contained in:
parent
b4588e6c47
commit
1c408d84c4
|
|
@ -369,6 +369,18 @@ const getProfile = async (refid: string, name?: string) => {
|
|||
player.item.push(item);
|
||||
}
|
||||
|
||||
if(U.GetConfig("enable_force_unlock")) {
|
||||
for(let i = 1; i <= GAME_MAX_MUSIC_ID; i++) {
|
||||
player.item.push({
|
||||
type: K.ITEM('u8', 0),
|
||||
id: K.ITEM('u16', i),
|
||||
param: K.ITEM('u16', 15),
|
||||
is_new: K.ITEM('bool', 0),
|
||||
get_time: K.ITEM('u64', BigInt(0)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Add version specific datas
|
||||
const params = await utils.readParams(refid, version);
|
||||
utils.addExtraData(player, params, extraData);
|
||||
|
|
|
|||
|
|
@ -275,6 +275,18 @@ const getProfile = async (refid: string, name?: string) => {
|
|||
player.item.push(item);
|
||||
}
|
||||
|
||||
if(U.GetConfig("enable_force_unlock")) {
|
||||
for(let i = 1; i <= GAME_MAX_MUSIC_ID; i++) {
|
||||
player.item.push({
|
||||
type: K.ITEM('u8', 0),
|
||||
id: K.ITEM('u16', i),
|
||||
param: K.ITEM('u16', 15),
|
||||
is_new: K.ITEM('bool', 0),
|
||||
get_time: K.ITEM('u64', BigInt(0)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Add version specific datas
|
||||
const params = await utils.readParams(refid, version);
|
||||
utils.addExtraData(player, params, extraData);
|
||||
|
|
|
|||
|
|
@ -462,6 +462,18 @@ const getProfile = async (refid: string, version: string, name?: string) => {
|
|||
});
|
||||
}
|
||||
|
||||
if(U.GetConfig("enable_force_unlock")) {
|
||||
for(let i = 1; i <= GAME_MAX_MUSIC_ID[version]; i++) {
|
||||
player.item.push({
|
||||
type: K.ITEM('u8', 0),
|
||||
id: K.ITEM('u16', i),
|
||||
param: K.ITEM('u16', 15),
|
||||
is_new: K.ITEM('bool', 0),
|
||||
get_time: K.ITEM('u64', BigInt(0)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Usaneko events
|
||||
if (version == 'v24') {
|
||||
const date = new Date();
|
||||
|
|
|
|||
|
|
@ -30,6 +30,13 @@ export function register() {
|
|||
default: true,
|
||||
});
|
||||
|
||||
R.Config("enable_force_unlock", {
|
||||
name: "Unlock all songs",
|
||||
desc: "Force unlocking all songs (Lapistoria and later).",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
|
||||
R.WebUIEvent('importPnmData', importPnmData);
|
||||
|
||||
R.WebUIEvent('updatePnmPlayerInfo', async (data: any) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user