From 1bb944e27456adfaaa096ab28fda221d96226b0b Mon Sep 17 00:00:00 2001 From: duel0213 Date: Sat, 4 May 2024 00:22:08 +0900 Subject: [PATCH] IIDX: Added Disable Beginner Option, misc --- iidx@asphyxia/README.md | 2 +- iidx@asphyxia/handlers/pc.ts | 18 ++++++++++++++++++ iidx@asphyxia/handlers/webui.ts | 1 + iidx@asphyxia/models/custom.ts | 2 ++ iidx@asphyxia/util.ts | 4 +++- iidx@asphyxia/webui/profile_----detail.pug | 5 +++++ iidx@asphyxia/webui/profile_---setting.pug | 9 +++++++++ 7 files changed, 39 insertions(+), 2 deletions(-) diff --git a/iidx@asphyxia/README.md b/iidx@asphyxia/README.md index 74b5743..2134f45 100644 --- a/iidx@asphyxia/README.md +++ b/iidx@asphyxia/README.md @@ -16,7 +16,7 @@ Supported Versions - beatmaniaIIDX 22 PENDUAL (2015080500) - beatmaniaIIDX 23 copula (2016083100) - beatmaniaIIDX 24 SINOBUZ (2017082800) - - beatmaniaIIDX 25 CANNON BALLERS (2018012300) + - beatmaniaIIDX 25 CANNON BALLERS (2018091900) - beatmaniaIIDX 26 Rootage (2019090200) - beatmaniaIIDX 27 HEROIC VERSE (2020092900) - beatmaniaIIDX 28 BISTROVER (2021091500) diff --git a/iidx@asphyxia/handlers/pc.ts b/iidx@asphyxia/handlers/pc.ts index da53886..a182a11 100644 --- a/iidx@asphyxia/handlers/pc.ts +++ b/iidx@asphyxia/handlers/pc.ts @@ -452,6 +452,23 @@ export const pcget: EPR = async (info, data, send) => { if (_.isNil(pcdata)) return send.deny(); + // migration // + if (_.isNil(custom.disable_beginner_option)) { + await DB.Upsert(refid, + { + collection: "custom", + version: version, + }, + { + $set: { + disable_beginner_option: false, + } + } + ); + + custom.disable_beginner_option = false; + } + const appendsettings = appendSettingConverter( custom.rank_folder, custom.clear_folder, @@ -465,6 +482,7 @@ export const pcget: EPR = async (info, data, send) => { custom.classic_hispeed, custom.rival_played_folder, custom.hide_iidxid, + custom.disable_beginner_option, ); let dArray = [], eArray = [], rArray = [], mArray = [], bArray = []; diff --git a/iidx@asphyxia/handlers/webui.ts b/iidx@asphyxia/handlers/webui.ts index b7c8945..967bb33 100644 --- a/iidx@asphyxia/handlers/webui.ts +++ b/iidx@asphyxia/handlers/webui.ts @@ -236,6 +236,7 @@ export const updateCustomSettings = async (data) => { classic_hispeed: StoB(data.classic_hispeed), rival_played_folder: StoB(data.rival_played_folder), hide_iidxid: StoB(data.hide_iidxid), + disable_beginner_option: StoB(data.disable_beginner_option), } await DB.Upsert(data.refid, { diff --git a/iidx@asphyxia/models/custom.ts b/iidx@asphyxia/models/custom.ts index 0d793c3..7e6feb3 100644 --- a/iidx@asphyxia/models/custom.ts +++ b/iidx@asphyxia/models/custom.ts @@ -38,6 +38,7 @@ export interface custom { classic_hispeed: boolean; rival_played_folder: boolean; hide_iidxid: boolean; + disable_beginner_option: boolean; // qpro // qpro_head: number; @@ -88,6 +89,7 @@ export const default_custom = { classic_hispeed: false, rival_played_folder: true, hide_iidxid: false, + disable_beginner_option: false, qpro_head: 0, qpro_hair: 0, diff --git a/iidx@asphyxia/util.ts b/iidx@asphyxia/util.ts index ee8df6f..c9604e4 100644 --- a/iidx@asphyxia/util.ts +++ b/iidx@asphyxia/util.ts @@ -210,6 +210,7 @@ export function appendSettingConverter( chs: boolean, rpf: boolean, hii: boolean, + dbo: boolean, ) { const result = Number(rf) << 0 | @@ -223,7 +224,8 @@ export function appendSettingConverter( Number(dgc) << 9 | Number(chs) << 10 | Number(rpf) << 11 | - Number(hii) << 12; + Number(hii) << 12 | + Number(dbo) << 14; return result; } diff --git a/iidx@asphyxia/webui/profile_----detail.pug b/iidx@asphyxia/webui/profile_----detail.pug index 49b2964..ff2c45d 100644 --- a/iidx@asphyxia/webui/profile_----detail.pug +++ b/iidx@asphyxia/webui/profile_----detail.pug @@ -4,6 +4,11 @@ - const version = [ + 14, + 15, + 16, + 17, + 18, 19, 20, 21, diff --git a/iidx@asphyxia/webui/profile_---setting.pug b/iidx@asphyxia/webui/profile_---setting.pug index 289c928..95a540d 100644 --- a/iidx@asphyxia/webui/profile_---setting.pug +++ b/iidx@asphyxia/webui/profile_---setting.pug @@ -5,6 +5,11 @@ - const version = [ + 14, + 15, + 16, + 17, + 18, 19, 20, 21, @@ -162,6 +167,10 @@ div label.label Hide IIDX ID .control input(type="checkbox" name="hide_iidxid", checked=Boolean(custom.hide_iidxid)) + .field + label.label Disable Beginner Option + .control + input(type="checkbox" name="disable_beginner_option", checked=Boolean(custom.disable_beginner_option)) //- QPRO .field label.label QPRO Head