From c38515c41daf53fe94a75eca63cddcbf6a1b1cc3 Mon Sep 17 00:00:00 2001 From: duel0213 <156279499+duel0213@users.noreply.github.com> Date: Tue, 27 Oct 2026 20:47:42 +0900 Subject: [PATCH] IIDX: Fixed where crate response are only 0% or 100% IIDX: Fixed where Note Size, Note Beam Size, First Note Preview may display wrong data on WebUI IIDX: Changed Random Note Ticket response to use database rather than generate 100 tickets on login --- iidx@asphyxia/README.md | 7 +- iidx@asphyxia/data/legg_open.json | 309 ++++++++++++++++++-- iidx@asphyxia/data/music_open.json | 222 +++++++------- iidx@asphyxia/handlers/gamesystem.ts | 2 +- iidx@asphyxia/handlers/music.ts | 117 ++++---- iidx@asphyxia/handlers/pc.ts | 197 +++++++------ iidx@asphyxia/models/badge.ts | 76 +++-- iidx@asphyxia/models/clearlamp.ts | 10 + iidx@asphyxia/models/custom.ts | 15 +- iidx@asphyxia/models/ticket.ts | 8 + iidx@asphyxia/pug/LDJ/34pcget.pug | 127 ++++++++ iidx@asphyxia/util.ts | 95 ++++++ iidx@asphyxia/webui/asset/js/setting.js | 2 +- iidx@asphyxia/webui/profile_-----detail.pug | 3 +- iidx@asphyxia/webui/profile_----setting.pug | 53 ++-- 15 files changed, 888 insertions(+), 355 deletions(-) create mode 100644 iidx@asphyxia/models/clearlamp.ts create mode 100644 iidx@asphyxia/models/ticket.ts create mode 100644 iidx@asphyxia/pug/LDJ/34pcget.pug diff --git a/iidx@asphyxia/README.md b/iidx@asphyxia/README.md index 8c2a4f0..4f7d7d3 100644 --- a/iidx@asphyxia/README.md +++ b/iidx@asphyxia/README.md @@ -38,7 +38,7 @@ Features - SKILL ANALYZER - EVENT (Partial) - ARENA (LOCAL only) - - RANDOME LANE TICKET + - RANDOM LANE TICKET - FAVORITE/SONG SELECTION NOTES - ORIGINAL FILTER @@ -193,7 +193,7 @@ Changelogs - Migration from (previous version) menu will not work - Existing card with no current version user data will treat as new card on registration but it will use existing profile data - New card cannot be registered (~ HAPPY SKY) - - Need to invoke new card registration to core. + - Need to invoke new card registration to core - 9th Style will use seperate user data database as its using raw blob - Added ALL/STORE/RIVAL TOP pacemaker support - Added basic save support of STORY mode (Resort Anthem) @@ -207,3 +207,6 @@ Changelogs - Fixed where CYBER LOADER event data get saved incorrectly (Sparkle Shower) - Fixed where Entry background brightness option doesn't get saved (Sparkle Shower) - Fixed where classic\_hispeed option doesn't get saved on WebUI + - Fixed where CLEAR RATE, FULL COMBO RATE only displays 0% or 100% + - Fixed where Note Size, Note Beam Size, First Note Preview may display wrong data on WebUI + - Random Lane Ticket now stores ticket on database rather than give 100 temporarily batches on login diff --git a/iidx@asphyxia/data/legg_open.json b/iidx@asphyxia/data/legg_open.json index 3629b63..0e11408 100644 --- a/iidx@asphyxia/data/legg_open.json +++ b/iidx@asphyxia/data/legg_open.json @@ -1,33 +1,294 @@ { - "33": { - "26069": { "kind": 0 }, - "24026": { "kind": 0 }, + "1": { + "1017": { "kind": 0 } + }, + "4": { + "4001": { "kind": 0 }, + "4005": { "kind": 0 }, + "4023": { "kind": 0 } + }, + "5": { + "5014": { "kind": 0 } + }, + "6": { + "6004": { "kind": 0 } + }, + "7": { + "7038": { "kind": 0 } + }, + "8": { "8023": { "kind": 0 }, - "28050": { "kind": 0 }, - "30029": { "kind": 0 }, - "31049": { "kind": 0 }, - "15025": { "kind": 0 }, - "20064": { "kind": 0 }, - "18008": { "kind": 0 }, - "30100": { "kind": 0 }, - "33058": { "kind": 0 }, + "8024": { "kind": 0 } + }, + "9": { + "9038": { "kind": 0 } + }, + "10": { + "10020": { "kind": 0 }, + "10034": { "kind": 0 } + }, + "11": { + "11012": { "kind": 0 }, + "11032": { "kind": 0 }, + "11035": { "kind": 0 }, + "11036": { "kind": 0 } + }, + "12": { + "12002": { "kind": 0 }, + "12007": { "kind": 0 }, + "12008": { "kind": 0 }, + "12010": { "kind": 0 }, + "12011": { "kind": 0 }, "12012": { "kind": 0 }, - "24009": { "kind": 0 }, - "23087": { "kind": 0 }, - "28039": { "kind": 0 }, - "26055": { "kind": 0 }, - "25006": { "kind": 0 }, - "22016": { "kind": 0 }, - "27075": { "kind": 0 }, - "18006": { "kind": 0 }, + "12016": { "kind": 0 }, + "12020": { "kind": 0 }, + "12030": { "kind": 0 }, + "12051": { "kind": 0 }, + "12052": { "kind": 0 }, + "12053": { "kind": 0 }, + "12054": { "kind": 0 } + }, + "13": { + "13000": { "kind": 0 }, + "13010": { "kind": 0 }, + "13026": { "kind": 0 }, + "13038": { "kind": 0 } + }, + "14": { + "14004": { "kind": 0 }, + "14005": { "kind": 0 }, + "14009": { "kind": 0 }, + "14012": { "kind": 0 }, + "14022": { "kind": 0 }, + "14046": { "kind": 0 }, + "14053": { "kind": 0 } + }, + "15": { + "15000": { "kind": 0 }, + "15004": { "kind": 0 }, + "15005": { "kind": 0 }, + "15007": { "kind": 0 }, + "15008": { "kind": 0 }, + "15014": { "kind": 0 }, + "15015": { "kind": 0 }, + "15023": { "kind": 0 }, + "15025": { "kind": 0 }, + "15026": { "kind": 0 }, + "15038": { "kind": 0 }, + "15041": { "kind": 0 }, + "15045": { "kind": 0 }, + "15054": { "kind": 0 }, + "15056": { "kind": 0 }, + "15061": { "kind": 0 } + }, + "16": { + "16001": { "kind": 0 }, + "16002": { "kind": 0 }, + "16009": { "kind": 0 }, + "16011": { "kind": 0 }, + "16015": { "kind": 0 }, + "16018": { "kind": 0 }, + "16021": { "kind": 0 }, + "16022": { "kind": 0 }, + "16025": { "kind": 0 }, + "16030": { "kind": 0 }, + "16031": { "kind": 0 }, + "16034": { "kind": 0 }, + "16038": { "kind": 0 }, + "16040": { "kind": 0 }, + "16042": { "kind": 0 }, + "16045": { "kind": 0 }, + "16047": { "kind": 0 }, + "16050": { "kind": 0 } + }, + "17": { + "17001": { "kind": 0 }, + "17015": { "kind": 0 }, + "17028": { "kind": 0 }, + "17043": { "kind": 0 }, "17058": { "kind": 0 }, - "31050": { "kind": 0 }, + "17060": { "kind": 0 } + }, + "18": { + "18006": { "kind": 0 }, + "18008": { "kind": 0 }, + "18011": { "kind": 0 }, + "18017": { "kind": 0 }, + "18025": { "kind": 0 }, + "18027": { "kind": 0 }, + "18036": { "kind": 0 }, + "18053": { "kind": 0 } + }, + "19": { + "19005": { "kind": 0 }, + "19011": { "kind": 0 }, + "19012": { "kind": 0 }, + "19015": { "kind": 0 }, + "19017": { "kind": 0 }, + "19022": { "kind": 0 }, + "19033": { "kind": 0 }, + "19035": { "kind": 0 }, + "19042": { "kind": 0 }, + "19049": { "kind": 0 }, + "19054": { "kind": 0 }, + "19063": { "kind": 0 }, + "19067": { "kind": 0 }, + "19074": { "kind": 0 } + }, + "20": { + "20003": { "kind": 0 }, + "20019": { "kind": 0 }, + "20024": { "kind": 0 }, + "20031": { "kind": 0 }, + "20039": { "kind": 0 }, + "20055": { "kind": 0 }, + "20064": { "kind": 0 }, + "20068": { "kind": 0 }, "20082": { "kind": 0 }, - "32084": { "kind": 0 }, - "32110": { "kind": 0 }, - "32081": { "kind": 0 }, + "20086": { "kind": 0 }, + "20089": { "kind": 0 }, + "20100": { "kind": 0 } + }, + "21": { + "21004": { "kind": 0 }, + "21012": { "kind": 0 }, + "21015": { "kind": 0 }, + "21016": { "kind": 0 }, + "21022": { "kind": 0 }, + "21029": { "kind": 0 }, + "21037": { "kind": 0 }, + "21044": { "kind": 0 }, + "21048": { "kind": 0 }, + "21050": { "kind": 0 }, + "21051": { "kind": 0 }, + "21052": { "kind": 0 }, + "21059": { "kind": 0 }, + "21060": { "kind": 0 }, + "21069": { "kind": 0 }, + "21073": { "kind": 0 }, + "21077": { "kind": 0 }, + "21088": { "kind": 0 }, + "21089": { "kind": 0 } + }, + "22": { + "22006": { "kind": 0 }, + "22008": { "kind": 0 }, + "22009": { "kind": 0 }, + "22013": { "kind": 0 }, + "22016": { "kind": 0 }, + "22024": { "kind": 0 }, + "22027": { "kind": 0 }, + "22028": { "kind": 0 }, + "22031": { "kind": 0 }, + "22040": { "kind": 0 }, + "22043": { "kind": 0 }, + "22059": { "kind": 0 }, + "22083": { "kind": 0 }, + "22089": { "kind": 0 }, + "22092": { "kind": 0 } + }, + "23": { + "23031": { "kind": 0 }, + "23054": { "kind": 0 }, + "23070": { "kind": 0 }, + "23080": { "kind": 0 }, + "23083": { "kind": 0 }, + "23084": { "kind": 0 }, + "23087": { "kind": 0 }, + "23095": { "kind": 0 } + }, + "24": { + "24009": { "kind": 0 }, + "24011": { "kind": 0 }, + "24012": { "kind": 0 }, + "24026": { "kind": 0 }, + "24031": { "kind": 0 }, + "24038": { "kind": 0 }, + "24041": { "kind": 0 }, + "24050": { "kind": 0 }, + "24057": { "kind": 0 }, + "24061": { "kind": 0 }, + "24080": { "kind": 0 } + }, + "25": { + "25003": { "kind": 0 }, + "25005": { "kind": 0 }, + "25006": { "kind": 0 }, + "25026": { "kind": 0 }, + "25032": { "kind": 0 }, + "25048": { "kind": 0 }, + "25081": { "kind": 0 }, + "25092": { "kind": 0 } + }, + "26": { + "26011": { "kind": 0 }, + "26016": { "kind": 0 }, + "26019": { "kind": 0 }, + "26026": { "kind": 0 }, + "26055": { "kind": 0 }, + "26058": { "kind": 0 }, + "26068": { "kind": 0 }, + "26069": { "kind": 0 }, + "26076": { "kind": 0 } + }, + "27": { + "27007": { "kind": 0 }, + "27010": { "kind": 0 }, + "27023": { "kind": 0 }, + "27033": { "kind": 0 }, + "27046": { "kind": 0 }, + "27053": { "kind": 0 }, + "27071": { "kind": 0 }, + "27075": { "kind": 0 }, + "27116": { "kind": 0 } + }, + "28": { + "28039": { "kind": 0 }, + "28050": { "kind": 0 }, + "28059": { "kind": 0 }, + "28066": { "kind": 0 }, + "28074": { "kind": 0 }, + "28092": { "kind": 0 } + }, + "29": { + "29001": { "kind": 0 }, + "29012": { "kind": 0 }, + "29024": { "kind": 0 }, + "29052": { "kind": 0 }, + "29071": { "kind": 0 }, + "29072": { "kind": 0 }, + "29075": { "kind": 0 }, + "29081": { "kind": 0 }, + "29082": { "kind": 0 }, + "29085": { "kind": 0 }, + "29101": { "kind": 0 }, + "29102": { "kind": 0 } + }, + "30": { + "30029": { "kind": 0 }, + "30030": { "kind": 0 }, + "30070": { "kind": 0 }, + "30100": { "kind": 0 }, + "30101": { "kind": 0 }, + "30102": { "kind": 0 } + }, + "31": { + "31021": { "kind": 0 }, + "31023": { "kind": 0 }, "31025": { "kind": 0 }, + "31049": { "kind": 0 }, + "31050": { "kind": 0 }, + "31098": { "kind": 0 }, + "31099": { "kind": 0 } + }, + "32": { + "32081": { "kind": 0 }, + "32084": { "kind": 0 }, "32085": { "kind": 0 }, - "33001": { "kind": 0 } + "32110": { "kind": 0 } + }, + "33": { + "33001": { "kind": 0 }, + "33058": { "kind": 0 } } } diff --git a/iidx@asphyxia/data/music_open.json b/iidx@asphyxia/data/music_open.json index 018e6b1..49321f1 100644 --- a/iidx@asphyxia/data/music_open.json +++ b/iidx@asphyxia/data/music_open.json @@ -1,105 +1,121 @@ { - "24": { - "24061": { "kind": 0 } - }, - "26": { - "26002": { "kind": 0 }, - "26006": { "kind": 0 }, - "26022": { "kind": 0 }, - "26045": { "kind": 0 } - }, - "27": { - "27071": { "kind": 0 }, - "27073": { "kind": 0 } - }, - "28": { - "28001": { "kind": 0 }, - "28074": { "kind": 0 } - }, - "29": { - "29071": { "kind": 0 }, - "29072": { "kind": 0 }, - "29075": { "kind": 0 }, - "29081": { "kind": 0 }, - "29082": { "kind": 0 }, - "29085": { "kind": 0 }, - "29101": { "kind": 0 }, - "29102": { "kind": 0 }, - "29103": { "kind": 0 } - }, - "30": { - "30038": { "kind": 0 }, - "30082": { "kind": 0 }, - "30083": { "kind": 0 }, - "30084": { "kind": 0 }, - "30085": { "kind": 0 }, - "30101": { "kind": 0 }, - "30102": { "kind": 0 }, - "30104": { "kind": 0 }, - "30105": { "kind": 0 } - }, - "31": { - "31021": { "kind": 0 }, - "31023": { "kind": 0 }, - "31024": { "kind": 0 }, - "31025": { "kind": 0 }, - "31097": { "kind": 0 }, - "31098": { "kind": 0 }, - "31099": { "kind": 0 }, - "31100": { "kind": 0 }, - "31101": { "kind": 0 }, - "31102": { "kind": 0 }, - "31110": { "kind": 0 }, - "31112": { "kind": 0 }, - "31113": { "kind": 0 } - }, - "32": { - "32019": { "kind": 0 }, - "32022": { "kind": 0 }, - "32049": { "kind": 0 }, - "32078": { "kind": 0 }, - "32079": { "kind": 0 }, - "32080": { "kind": 0 }, - "32081": { "kind": 0 }, - "32082": { "kind": 0 }, - "32083": { "kind": 0 }, - "32084": { "kind": 0 }, - "32085": { "kind": 0 }, - "32096": { "kind": 0 }, - "32097": { "kind": 0 }, - "32098": { "kind": 0 }, - "32101": { "kind": 0 }, - "32102": { "kind": 0 }, - "32103": { "kind": 0 }, - "32104": { "kind": 0 }, - "32110": { "kind": 0 }, - "32111": { "kind": 0 } - }, - "33": { - "33001": { "kind": 0 }, - "33007": { "kind": 0 }, - "33049": { "kind": 0 }, - "33078": { "kind": 0 }, - "33081": { "kind": 0 }, - "33082": { "kind": 0 }, - "33083": { "kind": 0 }, - "33084": { "kind": 0 }, - "33085": { "kind": 0 }, - "33095": { "kind": 0 }, - "33096": { "kind": 0 }, - "33105": { "kind": 0 }, - "33106": { "kind": 0 }, - "33115": { "kind": 0 }, - "33116": { "kind": 0 }, - "33117": { "kind": 0 }, - "33118": { "kind": 0 }, - "33119": { "kind": 0 }, - "33120": { "kind": 0 }, - "33121": { "kind": 0 }, - "33129": { "kind": 0 }, - "33130": { "kind": 0 }, - "33131": { "kind": 0 }, - "33132": { "kind": 0 }, - "33133": { "kind": 0 } - } + "24": { + "24061": { "kind": 0 } + }, + "26": { + "26002": { "kind": 0 }, + "26006": { "kind": 0 }, + "26022": { "kind": 0 }, + "26045": { "kind": 0 } + }, + "27": { + "27071": { "kind": 0 }, + "27073": { "kind": 0 } + }, + "28": { + "28001": { "kind": 0 }, + "28074": { "kind": 0 } + }, + "29": { + "29071": { "kind": 0 }, + "29072": { "kind": 0 }, + "29075": { "kind": 0 }, + "29081": { "kind": 0 }, + "29082": { "kind": 0 }, + "29085": { "kind": 0 }, + "29101": { "kind": 0 }, + "29102": { "kind": 0 }, + "29103": { "kind": 0 } + }, + "30": { + "30038": { "kind": 0 }, + "30082": { "kind": 0 }, + "30083": { "kind": 0 }, + "30084": { "kind": 0 }, + "30085": { "kind": 0 }, + "30101": { "kind": 0 }, + "30102": { "kind": 0 }, + "30104": { "kind": 0 }, + "30105": { "kind": 0 } + }, + "31": { + "31021": { "kind": 0 }, + "31023": { "kind": 0 }, + "31024": { "kind": 0 }, + "31025": { "kind": 0 }, + "31097": { "kind": 0 }, + "31098": { "kind": 0 }, + "31099": { "kind": 0 }, + "31100": { "kind": 0 }, + "31101": { "kind": 0 }, + "31102": { "kind": 0 }, + "31110": { "kind": 0 }, + "31112": { "kind": 0 }, + "31113": { "kind": 0 } + }, + "32": { + "32003": { "kind": 0 }, + "32007": { "kind": 0 }, + "32019": { "kind": 0 }, + "32022": { "kind": 0 }, + "32049": { "kind": 0 }, + "32065": { "kind": 0 }, + "32078": { "kind": 0 }, + "32079": { "kind": 0 }, + "32080": { "kind": 0 }, + "32081": { "kind": 0 }, + "32082": { "kind": 0 }, + "32083": { "kind": 0 }, + "32084": { "kind": 0 }, + "32085": { "kind": 0 }, + "32093": { "kind": 0 }, + "32094": { "kind": 0 }, + "32095": { "kind": 0 }, + "32096": { "kind": 0 }, + "32097": { "kind": 0 }, + "32098": { "kind": 0 }, + "32101": { "kind": 0 }, + "32102": { "kind": 0 }, + "32103": { "kind": 0 }, + "32104": { "kind": 0 }, + "32108": { "kind": 0 }, + "32109": { "kind": 0 }, + "32110": { "kind": 0 }, + "32111": { "kind": 0 } + }, + "33": { + "33001": { "kind": 0 }, + "33005": { "kind": 0 }, + "33007": { "kind": 0 }, + "33009": { "kind": 0 }, + "33049": { "kind": 0 }, + "33078": { "kind": 0 }, + "33081": { "kind": 0 }, + "33082": { "kind": 0 }, + "33083": { "kind": 0 }, + "33084": { "kind": 0 }, + "33085": { "kind": 0 }, + "33095": { "kind": 0 }, + "33096": { "kind": 0 }, + "33100": { "kind": 0 }, + "33101": { "kind": 0 }, + "33102": { "kind": 0 }, + "33103": { "kind": 0 }, + "33104": { "kind": 0 }, + "33105": { "kind": 0 }, + "33106": { "kind": 0 }, + "33107": { "kind": 0 }, + "33108": { "kind": 0 }, + "33112": { "kind": 0 }, + "33113": { "kind": 0 }, + "33122": { "kind": 0 }, + "33123": { "kind": 0 }, + "33124": { "kind": 0 }, + "33125": { "kind": 0 }, + "33126": { "kind": 0 }, + "33127": { "kind": 0 }, + "33129": { "kind": 0 }, + "33130": { "kind": 0 }, + "33131": { "kind": 0 } + } } diff --git a/iidx@asphyxia/handlers/gamesystem.ts b/iidx@asphyxia/handlers/gamesystem.ts index d657186..a59565e 100644 --- a/iidx@asphyxia/handlers/gamesystem.ts +++ b/iidx@asphyxia/handlers/gamesystem.ts @@ -215,7 +215,7 @@ export const gssysteminfo: EPR = async (info, data, send) => { VocaloidEvent: K.ATTR({ val: String(U.GetConfig("ss_cyber")) }), KrankAppendSeason: K.ATTR({ val: String(0) }), the4thEvent: K.ATTR({ val: String(1)} ), - beat: K.ATTR({ val: String(5293) }), // It wasn't. TODO:: Figure out what this value does // + beat: K.ATTR({ val: String(5293) }), // TODO:: Figure out what this value does // extraevent_2: { "@attr": { all_point_score: String(totalScorePoint), diff --git a/iidx@asphyxia/handlers/music.ts b/iidx@asphyxia/handlers/music.ts index e200ee6..88ee3e7 100644 --- a/iidx@asphyxia/handlers/music.ts +++ b/iidx@asphyxia/handlers/music.ts @@ -1,4 +1,4 @@ -import { IDtoRef, GetVersion, OldMidToNewMid, NewMidToOldMid, ReftoProfile, ReftoPcdata, ClidToPlaySide, ReftoQPRO, NumArrayToString, OldMidToVerMid, GetModel, GetCommand, NumArrayToHex } from "../util"; +import { IDtoRef, GetVersion, OldMidToNewMid, NewMidToOldMid, ReftoProfile, ReftoPcdata, ClidToPlaySide, ReftoQPRO, NumArrayToString, OldMidToVerMid, GetModel, GetCommand, NumArrayToHex, LampOut, LampIn } from "../util"; import { score, score_top } from "../models/score"; import { profile } from "../models/profile"; import { shop_data } from "../models/shop"; @@ -7,6 +7,7 @@ import { badge } from "../models/badge"; import { activity_mybest } from "../models/activity"; import { djtraining } from "../models/djtraining"; import { rival } from "../models/rival"; +import { lamp } from "../models/clearlamp"; export const musicmethod: EPR = async (info, data, send) => { const command = GetCommand(data); @@ -88,7 +89,7 @@ export const musicgetrank: EPR = async (info, data, send) => { if (res.esArray[indices[a]] == 0) continue; let rank_id = _.isNil(res.rArray) ? -1 : res.rArray[indices[a]]; if (version < 10) { - const data = NumArrayToHex([11, 3, 1, 1], [temp_mid, rank_id, res.cArray[indices[a]] > 1 ? 1 : 0, 0]); + const data = NumArrayToHex([11, 3, 1, 1], [temp_mid, rank_id, LampOut(version, res.cArray[indices[a]]) > 1 ? 1 : 0, 0]); if (mapValue(indices[a]) in musicData) { musicData[mapValue(indices[a])] += data; } else { @@ -96,14 +97,14 @@ export const musicgetrank: EPR = async (info, data, send) => { } } else if (version < 12) { - const data = NumArrayToString(version < 11 ? [11, 3, 2, 14] : [11, 3, 3, 13], [temp_mid, res.cArray[indices[a]], rank_id, res.esArray[indices[a]]]); + const data = NumArrayToString(version < 11 ? [11, 3, 2, 14] : [11, 3, 3, 13], [temp_mid, LampOut(version, res.cArray[indices[a]]), rank_id, res.esArray[indices[a]]]); if (mapValue(indices[a]) in musicData) { musicData[mapValue(indices[a])] += data; } else { musicData[mapValue(indices[a])] = data; } } else { - const data = NumArrayToString([7, 4, 13, 3, 3], [verMid[1], a, res.esArray[indices[a]], rank_id, res.cArray[indices[a]]]); + const data = NumArrayToString([7, 4, 13, 3, 3], [verMid[1], a, res.esArray[indices[a]], rank_id, LampOut(version, res.cArray[indices[a]])]); if (verMid[0] in musicData) { musicData[verMid[0]] += data; } else { @@ -129,7 +130,7 @@ export const musicgetrank: EPR = async (info, data, send) => { result.r.push( K.ITEM("str", NumArrayToString( [12, 6], - [temp_mid, res.cArray[0]] + [temp_mid, LampOut(version, res.cArray[0])] ), { v: String("-1") }) ); } @@ -176,11 +177,11 @@ export const musicgetrank: EPR = async (info, data, send) => { let mVersion = Math.floor(temp_mid / 100); if (mVersion > version) return; - if (version == 16) score_data = [-1, temp_mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i])]; - else score_data = [-1, temp_mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])]; + if (version == 16) score_data = [-1, temp_mid, ...indices.map(i => LampOut(version, res.cArray[i])), ...indices.map(i => res.esArray[i])]; + else score_data = [-1, temp_mid, ...indices.map(i => LampOut(version, res.cArray[i])), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])]; m.push(K.ARRAY(arrayType, score_data)); - if (res.cArray[0] != 0) b.push(K.ARRAY("u16", [temp_mid, res.cArray[0]])); + if (res.cArray[0] != 0) b.push(K.ARRAY("u16", [temp_mid, LampOut(version, res.cArray[0])])); }); for (let i = 0; i < 5; i++) { @@ -195,8 +196,8 @@ export const musicgetrank: EPR = async (info, data, send) => { let mVersion = Math.floor(temp_mid / 100); if (mVersion > version) return; - if (version == 16) score_data = [i, temp_mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i])]; - else score_data = [i, temp_mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])]; + if (version == 16) score_data = [i, temp_mid, ...indices.map(i => LampOut(version, res.cArray[i])), ...indices.map(i => res.esArray[i])]; + else score_data = [i, temp_mid, ...indices.map(i => LampOut(version, res.cArray[i])), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])]; m.push(K.ARRAY(arrayType, score_data)); }); } @@ -223,10 +224,10 @@ export const musicgetrank: EPR = async (info, data, send) => { let mVersion = Math.floor(res.mid / 1000); if (mVersion > version) return; - score_data = [-1, res.mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])]; + score_data = [-1, res.mid, ...indices.map(i => LampOut(version, res.cArray[i])), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])]; m.push(K.ARRAY(arrayType, score_data)); - if (res.cArray[0] != 0) b.push(K.ARRAY("u16", [res.mid, res.cArray[0]])); + if (res.cArray[0] != 0) b.push(K.ARRAY("u16", [res.mid, LampOut(version, res.cArray[0])])); }); for (let i = 0; i < 5; i++) { @@ -240,7 +241,7 @@ export const musicgetrank: EPR = async (info, data, send) => { let mVersion = Math.floor(res.mid / 1000); if (mVersion > version) return; - score_data = [i, res.mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])]; + score_data = [i, res.mid, ...indices.map(i => LampOut(version, res.cArray[i])), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])]; m.push(K.ARRAY(arrayType, score_data)); }); } @@ -258,6 +259,10 @@ export const musicgetrank: EPR = async (info, data, send) => { let mVersion = Math.floor(res.mid / 1000); if (mVersion > version) return; + for (let a = 0; a < res.clflgs.length; a++) { + res.clflgs[a] = LampOut(version, res.clflgs[a]); + } + top.push({ "@attr": ({ name0: res.names[0], @@ -274,6 +279,10 @@ export const musicgetrank: EPR = async (info, data, send) => { let mVersion = Math.floor(res.mid / 1000); if (mVersion > version) return; + for (let a = 0; a < res.clflgs.length; a++) { + res.clflgs[a] = LampOut(version, res.clflgs[a]); + } + top.push({ "@attr": ({ name0: res.names[1], @@ -305,6 +314,8 @@ export const musicgetrank: EPR = async (info, data, send) => { } export const musicgetranksub: EPR = async (info, data, send) => { + const version = GetVersion(info); + const cltype = Number($(data).attr().cltype); // 0 -> SP, 1 -> DP // const rival_refids = [ [Number($(data).attr().iidxid0), await IDtoRef(Number($(data).attr().iidxid0))], @@ -333,7 +344,7 @@ export const musicgetranksub: EPR = async (info, data, send) => { if (res.rArray[indices[a]] == -1) continue; // [index?, rno?, ...] // - score_data = [i, i, res.mid, indices[a], res.cArray[indices[a]], res.esArray[indices[a]], res.mArray[indices[a]]]; + score_data = [i, i, res.mid, indices[a], LampOut(version, res.cArray[indices[a]]), res.esArray[indices[a]], res.mArray[indices[a]]]; m.push(K.ARRAY("s32", score_data)); } }); @@ -385,6 +396,10 @@ export const musicgetralive: EPR = async (info, data, send) => { let verMid = OldMidToVerMid(mid); if (verMid[0] > version) return; + for (let a = 0; a < res.cArray.length; a++) { + res.cArray[a] = LampOut(version, res.cArray[a]); + } + myRecord[NewMidToOldMid(res.mid)] = [...res.esArray, ...res.cArray]; }); } @@ -402,6 +417,10 @@ export const musicgetralive: EPR = async (info, data, send) => { let verMid = OldMidToVerMid(mid); if (verMid[0] > version) return; + for (let a = 0; a < res.cArray.length; a++) { + res.cArray[a] = LampOut(version, res.cArray[a]); + } + let scoreArray = Array(15).fill(0); let strResult = ""; if (version < 13) { @@ -424,8 +443,8 @@ export const musicgetralive: EPR = async (info, data, send) => { for (let a = 0; a < 3; a++) { let myExscore = myRecord[mid][indices[a]]; let rvExscore = res.esArray[indices[a]]; - let mycFlg = myRecord[mid][indices[a] + 10]; - let rvcFlg = res.cArray[indices[a]]; + let mycFlg = LampOut(version, myRecord[mid][indices[a] + 10]); + let rvcFlg = LampOut(version, res.cArray[indices[a]]); if (mycFlg == 0 || rvcFlg == 0) continue; scoreArray[i * 3 + (2 - a)] = myExscore > rvExscore ? 1 : 2; @@ -753,7 +772,7 @@ export const musicreg: EPR = async (info, data, send) => { const pgnum = version < 13 ? Number(command[4]) : Number($(data).attr().pgnum); const gnum = version < 13 ? Number(command[5]) : Number($(data).attr().gnum); const mnum = version < 13 ? -1 : Number($(data).attr().mnum); - const cflg = version < 13 ? Number(command[7]) : Number($(data).attr().cflg); + const cflg = LampIn(version, (version < 13 ? Number(command[7]) : Number($(data).attr().cflg))); let exscore = (pgnum * 2 + gnum); let ghost = null, ghost_gauge = null; // Heroic Verse // let style = 0, option = 0, option_2 = 0, rid = -1; @@ -1049,7 +1068,7 @@ export const musicreg: EPR = async (info, data, send) => { part: part, midx: midx, }); - let cflag = _.isNil(djt_data) ? cflg : Math.max(cflg, djt_data.cflg); + const cflag = LampOut(version, (_.isNil(djt_data) ? cflg : Math.max(cflg, djt_data.cflg))); await DB.Upsert( refid, @@ -1093,10 +1112,12 @@ export const musicreg: EPR = async (info, data, send) => { ]) ); - let crate = 0, frate = 0, cflgs = 0, fcflgs = 0; + let crate = 0, frate = 0; + let cflgs = 0, fcflgs = 0; scores.forEach((rankscore, index) => { - if (rankscore[1] != 1) cflgs += 1; - if (rankscore[1] == 7) fcflgs += 1; + rankscore[1] = LampOut(version, rankscore[1]); + if (rankscore[1] > lamp.FAILED) cflgs += 1; + if (rankscore[1] > lamp.EX_HARD_CLEAR) fcflgs += 1; if (index == shop_rank) { shop_rank_data.push( @@ -1106,7 +1127,7 @@ export const musicreg: EPR = async (info, data, send) => { opname: shop_data.opname, rnum: String(index + 1), score: String(rankscore[0]), - clflg: String(rankscore[1]), + clflg: String(LampOut(version, rankscore[1])), pid: String(rankscore[2][1]), sgrade: String(rankscore[4][0]), dgrade: String(rankscore[4][1]), @@ -1132,7 +1153,7 @@ export const musicreg: EPR = async (info, data, send) => { opname: shop_data.opname, rnum: String(index + 1), score: String(rankscore[0]), - clflg: String(rankscore[1]), + clflg: String(LampOut(version, rankscore[1])), pid: String(rankscore[2][1]), sgrade: String(rankscore[4][0]), dgrade: String(rankscore[4][1]), @@ -1152,7 +1173,7 @@ export const musicreg: EPR = async (info, data, send) => { } }); - let rate = version > 23 ? 1000 : 100; + const rate = version > 23 ? 1000 : 100; crate = Math.round((cflgs / shop_rank_data.length) * rate); frate = Math.round((fcflgs / shop_rank_data.length) * rate); @@ -1193,7 +1214,7 @@ export const musicbreg: EPR = async (info, data, send) => { const refid = await IDtoRef(Number($(data).attr().iidxid)); const pgnum = Number($(data).attr().pgnum); const gnum = Number($(data).attr().gnum); - const cflg = Number($(data).attr().cflg); + const cflg = LampIn(version, Number($(data).attr().cflg)); let mid = Number($(data).attr().mid); let clid = 0; // SP BEGINNER // let exscore = (pgnum * 2 + gnum); @@ -1293,50 +1314,46 @@ export const musiccrate: EPR = async (info, data, send) => { const scores = await DB.Find(null, { collection: "score", }); - const cltype = version < 13 ? Number(command[1]) : Number($(data).attr().cltype); + const cltype = version < 13 ? Number(command[1]) : (_.isNil($(data).attr().cltype) ? 0 : Number($(data).attr().cltype)); let cFlgs: Record = {}, fcFlgs: Record = {}, totalFlgs: Record = {}; scores.forEach((res) => { + if (_.isNil(res.cArray)) throw new Error("[music.crate] There is unsupported entry in Database"); + let mVersion = Math.floor(res.mid / 1000); if (mVersion > version) return; if (res.mid < 0) return; - let totalArray = Array(10).fill(0); - let cFlgArray = Array(10).fill(0); - let fcFlgArray = Array(10).fill(0); - - if (_.isNil(res.cArray)) throw new Error("[music.crate] There is unsupported entry in Database"); - - for (let a = 0; a < 10; a++) { - if (res.cArray[a] != 0) totalArray[a] += 1; - if (res.cArray[a] != 1) cFlgArray[a] += 1; - if (res.cArray[a] == 7) fcFlgArray[a] += 1; + let temp_mid = version < 20 ? NewMidToOldMid(res.mid) : res.mid; + if (_.isNil(totalFlgs[temp_mid])) { + totalFlgs[temp_mid] = Array(10).fill(0); + cFlgs[temp_mid] = Array(10).fill(0); + fcFlgs[temp_mid] = Array(10).fill(0); } - let temp_mid = version < 20 ? NewMidToOldMid(res.mid) : res.mid; - totalFlgs[temp_mid] = totalArray; - cFlgs[temp_mid] = cFlgArray; - fcFlgs[temp_mid] = fcFlgArray; + for (let a = 0; a < 10; a++) { + const cflg = LampOut(version, res.cArray[a]); + if (cflg > lamp.NO_PLAY) totalFlgs[temp_mid][a] += 1; + + if (cflg > lamp.FAILED) cFlgs[temp_mid][a] += 1; + if (cflg > lamp.EX_HARD_CLEAR) fcFlgs[temp_mid][a] += 1; + } }); let result = {}, c = [], cdata = []; + const rate = version > 23 ? 1000 : 100; for (const key in totalFlgs) { - let cRate = Array(10).fill(0); - let fcRate = Array(10).fill(0); + let cRate = version < 24 ? Array(10).fill(0) : Array(10).fill(-1); + let fcRate = version < 24 ? Array(10).fill(0) : Array(10).fill(-1); for (let a = 0; a < 10; a++) { if (totalFlgs[key][a] == 0) continue; - if (version > 23) { - cRate[a] = Math.round((cFlgs[key][a] / totalFlgs[key][a]) * 1000); - fcRate[a] = Math.round((fcFlgs[key][a] / totalFlgs[key][a]) * 1000); - } else { - cRate[a] = Math.round((cFlgs[key][a] / totalFlgs[key][a]) * 100); - fcRate[a] = Math.round((fcFlgs[key][a] / totalFlgs[key][a]) * 100); - } + cRate[a] = Math.round((cFlgs[key][a] / totalFlgs[key][a]) * rate); + fcRate[a] = Math.round((fcFlgs[key][a] / totalFlgs[key][a]) * rate); } let indices = [1, 2, 3, 6, 7, 8], mapValue = null; @@ -1373,7 +1390,7 @@ export const musiccrate: EPR = async (info, data, send) => { let sendOption: EamuseSendOption = {}; if (version < 14) { result = { - "@attr": { method: "musiccrate" }, + "@attr": { method: "musiccrate", expire: "300" }, ...result }; sendOption = { diff --git a/iidx@asphyxia/handlers/pc.ts b/iidx@asphyxia/handlers/pc.ts index 71063d6..4d35f0e 100644 --- a/iidx@asphyxia/handlers/pc.ts +++ b/iidx@asphyxia/handlers/pc.ts @@ -1,7 +1,7 @@ import { pcdata, KDZ_pcdata, IIDX27_pcdata, IIDX28_pcdata, IIDX29_pcdata, IIDX30_pcdata, JDZ_pcdata, LDJ_pcdata, IIDX21_pcdata, IIDX22_pcdata, IIDX23_pcdata, IIDX24_pcdata, IIDX25_pcdata, IIDX26_pcdata, JDJ_pcdata, HDD_pcdata, I00_pcdata, GLD_pcdata, IIDX31_pcdata, IIDX32_pcdata, IIDX33_pcdata, FDD_pcdata, ECO_pcdata, E11_pcdata, D01_pcdata } from "../models/pcdata"; import { grade } from "../models/grade"; import { custom, default_custom } from "../models/custom"; -import { IDtoCode, IDtoRef, GetVersion, ReftoProfile, ReftoPcdata, ReftoQPRO, appendSettingConverter, NumArrayToString, GetModel, GetCommand, NumArrayToHex } from "../util"; +import { IDtoCode, IDtoRef, GetVersion, ReftoProfile, ReftoPcdata, ReftoQPRO, appendSettingConverter, NumArrayToString, GetModel, GetCommand, NumArrayToHex, ClidToPlaySide } from "../util"; import { eisei_grade, eisei_grade_data, lightning_custom, lightning_musicfilter, lightning_musicfilter_sort, lightning_musicmemo, lightning_musicmemo_new, lightning_playdata, lightning_settings, lm_customdata, lm_playdata, lm_settings, lm_settings_new, musicfilter_data, musicfilter_sort_data, musicmemo_data, musicmemo_data_new } from "../models/lightning"; import { profile, default_profile } from "../models/profile"; import { rival, rival_data, rival_sub } from "../models/rival"; @@ -15,6 +15,7 @@ import { extra_favorite } from "../models/favorite"; import { activity, activity_mybest } from "../models/activity"; import { extra_boss } from "../models/extraboss"; import { djtraining } from "../models/djtraining"; +import { lane_ticket } from "../models/ticket"; export const pcmethod: EPR = async (info, data, send) => { const command = GetCommand(data); @@ -49,18 +50,32 @@ export const pccommon: EPR = async (info, data, send) => { expert_secret_full_open: {}, } + let system_voice = []; + if (version >= 32) { + for (let a = 0; a < 5; a++) { + const flags = version == 32 + ? { s_m: String(_.random(0, 1)), s_f: String(_.random(0, 1)), e_m: String(_.random(0, 1)), e_f: String(_.random(0, 1)) } + : { s_a: String(_.random(0, 1)), s_b: String(_.random(0, 1)), s_c: String(_.random(0, 1)), e_a: String(_.random(0, 1)), e_b: String(_.random(0, 1)), e_c: String(_.random(0, 1)) }; + + system_voice.push(K.ATTR({ + season: String(a), + ...flags, + })); + } + } + // have no idea what some of attribute or value does // // exposing these to plugin setting or use static value // switch (version) { case 10: break; case 11: - result["@attr"].tf = 1; - result["@attr"].csok = 1; + result["@attr"].tf = "1"; + result["@attr"].csok = "1"; break; case 12: - result["@attr"].tf = 1; - result["@attr"].beok = 1; + result["@attr"].tf = "1"; + result["@attr"].beok = "1"; break; case 13: break; @@ -370,19 +385,9 @@ export const pccommon: EPR = async (info, data, send) => { vip_pass_black: {}, deller_bonus: K.ATTR({ open: String(1) }), common_evnet: K.ATTR({ flg: String(-1) }), - /*system_voice: { - season: [ - { - "@attr": { - season: String(0), // 0 -> 4 // - s_m: String(0), - s_f: String(0), - e_m: String(0), - e_f: String(0), - } - } - ] - },*/ + system_voice: { + season: system_voice + }, play_video: {}, music_retry: {}, display_asio_logo: {}, @@ -402,21 +407,9 @@ export const pccommon: EPR = async (info, data, send) => { vip_pass_black: {}, deller_bonus: K.ATTR({ open: String(1) }), common_evnet: K.ATTR({ flg: String(-1) }), - /*system_voice: { - season: [ - { - "@attr": { - season: String(0), // 0 -> 4 // - s_a: String(0), - s_b: String(0), - s_c: String(0), - e_a: String(0), - e_b: String(0), - e_c: String(0), - } - } - ] - },*/ + system_voice: { + season: system_voice + }, play_video: {}, music_retry: {}, display_asio_logo: {}, @@ -1470,40 +1463,14 @@ export const pcget: EPR = async (info, data, send) => { } /*** TODO:: figure out how badges works (following table is for EPOLIS) - [save] - element names are following below but get checks for id 0 ~ 16 - step_up [2] - today_recommend - weekly_ranking - visitor [2] - notes_radar [2] - tsujigiri - iidx_exam - world_tourism - event1 - arena [2] - event2 + [save] - badge names are sent in string on save but on get it checks number (category_id) + (name) - category_name + flg_id - flag_id + flg - badge_flg - [get] (starts from zero) + [get] category_id - up to 16 - badge_flg_id - - This can be up to 23 [category_id, badge_flg_id] - - 0 - 23 [djLevel] - - 1 - 23 [clear] - - 2 - 1 [grade] - - 3 - 1 [step_up] - - 4 - (none) - - 5 - (none) - - 6 - (none) - - 7 - 1 [visitor] - - 8 - 1 [notes_radar] - - 10 - (none) - - 11 - 1 - - 12 - (none) [tourism?] - - 13 - (none) [event] - - 14 - 1 - - 15 - (none) - - 16 - (none) [event2] - - 3001 - 9 + badge_flg_id - This can be up to 23 [category_id, badge_flg_id] badge_flg (these are s64 - this may exceed max int value) - following codes are dummy code @@ -1517,7 +1484,7 @@ export const pcget: EPR = async (info, data, send) => { badge.forEach(res => { const id = badgeData[res.category_name]; - if (id !== undefined) { + if (!_.isNil(id)) { bArray.push({ id, flg_id: res.flg_id, @@ -2242,7 +2209,12 @@ export const pcsave: EPR = async (info, data, send) => { if (version >= 31) { lm_settings.keyboard_kind = Number($(data).attr("lightning_setting").keyboard_kind); - lm_settings.brightness = version < 33 ? Number($(data).attr("lightning_setting").brightness) : Number($(data).attr("lightning_setting").brightness_bg); + if (version < 33) { + lm_settings.brightness = Number($(data).attr("lightning_setting").brightness); + } + else { + lm_settings.brightness = Number($(data).attr("lightning_setting").brightness_bg); + } if (version >= 33) { lm_settings.brightness_concent = Number($(data).attr("lightning_setting").brightness_concentration); @@ -5567,19 +5539,33 @@ export const pcsave: EPR = async (info, data, send) => { return send.success(); }; -export const pcgetlanegacha: EPR = async (info, data, send) => { - let tArray = []; - for (let i = 0; i < 100; i++) { - let random = _.random(0, 5040); +export const pcshopregister: EPR = async (info, data, send) => { + let refid = IDtoRef(Number($(data).str("iidx_id"))); + let lid = $(data).str("location_id"); + // TODO // + + return send.success(); +}; + +export const pcgetlanegacha: EPR = async (info, data, send) => { + const version = GetVersion(info); + const refid = await IDtoRef(Number($(data).attr().iidxid)); + + const tickets = await DB.Find(refid, { + collection: "lane_ticket", + version, + }); + let tArray = []; + tickets.forEach((res) => { tArray.push( K.ATTR({ - ticket_id: String(i + 1), - arrange_id: String(random), - expire_date: String(4102326000), + ticket_id: String(res.ticket_id), + arrange_id: String(res.arrange_id), + expire_date: String(Math.floor((Date.now() / 1000) + 604800)), // set expire date 7 days from now // }) ); - } + }); // settings(sp, dp_left, dp_right), info(last_page) // @@ -5591,35 +5577,64 @@ export const pcgetlanegacha: EPR = async (info, data, send) => { }); }; -export const pcshopregister: EPR = async (info, data, send) => { - let refid = IDtoRef(Number($(data).str("iidx_id"))); - let lid = $(data).str("location_id"); - - // TODO // - - return send.success(); -}; - export const pcdrawlanegacha: EPR = async (info, data, send) => { - let drawNum = Number($(data).attr().draw_num); - let tArray = []; + const version = GetVersion(info); + const refid = await IDtoRef(Number($(data).attr().iidxid)); - for (let i = 0; i < drawNum; i++) { - let random = _.random(0, 5040); + const proc_type = Number($(data).attr().proc_type); + if (proc_type == 0) { + return send.object({ + session: K.ATTR({ + session_id: String(_.random(0, 10000)), + }), + }); + } + const session_id = Number($(data).attr().session_id); + const drawNum = Number($(data).attr().draw_num); + + const tickets = await DB.Find(refid, { + collection: "lane_ticket", + version, + }); + const usedIds = new Set(tickets.map(ticket => ticket.ticket_id)); + const availableIds = Array.from({ length: 10000 }, (_, i) => i) + .filter(id => !usedIds.has(id)); + if (availableIds.length === 0) { + return send.deny(); + } + + let tArray = []; + for (let i = 0; i < drawNum && availableIds.length > 0; i++) { + const index = _.random(0, availableIds.length - 1); + const ticket_id = availableIds.splice(index, 1)[0]; + const random = _.random(0, 5039); tArray.push( K.ATTR({ - ticket_id: String(_.random(101, 10000)), + ticket_id: String(ticket_id), arrange_id: String(random), - expire_date: String(4102326000), + expire_date: String(Math.floor((Date.now() / 1000) + 604800)), }) ); + + await DB.Upsert( + refid, + { + collection: "lane_ticket", + version, + ticket_id, + }, + { + $set: { + arrange_id: random, + } + }); } return send.object({ ticket: tArray, session: K.ATTR({ - session_id: String(0), + session_id: String(session_id), }), }); }; diff --git a/iidx@asphyxia/models/badge.ts b/iidx@asphyxia/models/badge.ts index 3ba97cb..e0d724d 100644 --- a/iidx@asphyxia/models/badge.ts +++ b/iidx@asphyxia/models/badge.ts @@ -1,3 +1,39 @@ +export const badgeBaseMap: Record = { + djLevel: 0, + clear: 1, + grade: 2, + step_up: 3, + visitor: 6, + notes_radar: 7, +}; + +export const badgeVersionMap: Record> = { + 30: { + step_up: null, + visitor: 6, + world_tourism: 8, + event1: 9, + }, + 31: { + visitor: 7, + notes_radar: 8, + world_tourism: 12, + event1: 13, + event2: 16, + }, + 32: { + visitor: 7, + notes_radar: 8, + world_tourism: 12, + event1: 13, + event2: 15, + }, + 33: { + event1: 3301, + }, + "default": {} +}; + export interface badge { collection: "badge"; version: number; @@ -7,43 +43,3 @@ export interface badge { flg: number; } -export const badgeBaseMap: Record = { - djLevel: 0, - clear: 1, - grade: 2, -}; - -export const badgeVersionMap: Record> = { - 30: { - visitor: 6, - notes_radar: 7, - world_tourism: 8, - event1: 9, - }, - 31: { - step_up: 3, - visitor: 6, - notes_radar: 7, - event1: 13, - event2: 16, - }, - 32: { - step_up: 3, - visitor: 6, - notes_radar: 7, - event1: 13, - event2: 15, - }, - 33: { - step_up: 3, - visitor: 6, - notes_radar: 7, - event1: 3301, - }, - default: { - step_up: 3, - visitor: 7, - notes_radar: 8, - world_tourism: 12, - }, -}; diff --git a/iidx@asphyxia/models/clearlamp.ts b/iidx@asphyxia/models/clearlamp.ts new file mode 100644 index 0000000..4b175d4 --- /dev/null +++ b/iidx@asphyxia/models/clearlamp.ts @@ -0,0 +1,10 @@ +export enum lamp { + NO_PLAY, + FAILED, + ASSIST_CLEAR, + EASY_CLEAR, + CLEAR, + HARD_CLEAR, + EX_HARD_CLEAR, + FULL_COMBO, +} diff --git a/iidx@asphyxia/models/custom.ts b/iidx@asphyxia/models/custom.ts index 3daea43..aff91dc 100644 --- a/iidx@asphyxia/models/custom.ts +++ b/iidx@asphyxia/models/custom.ts @@ -25,14 +25,14 @@ export interface custom { skin_customize_flg: number[]; - note_size: number; // epolis // + note_size: number; // EPOLIS // lift_cover: number; note_beam_size: number; - cn_color: number; // sparkle shower// + cn_color: number; // Sparkle Shower // cn_size: number; - // appendsettings + // appendsettings // rank_folder: boolean; clear_folder: boolean; diff_folder: boolean; @@ -53,15 +53,15 @@ export interface custom { qpro_face: number; qpro_hand: number; qpro_body: number; - qpro_back: number; // epolis // + qpro_back: number; // EPOLIS // - // qpro_secret (heroic verse) // + // qpro_secret (HEROIC VERSE) // qpro_secret_head: string[]; qpro_secret_hair: string[]; qpro_secret_face: string[]; qpro_secret_hand: string[]; qpro_secret_body: string[]; - qpro_secret_back: string[]; // epolis // + qpro_secret_back: string[]; // EPOLIS // } export const default_custom = { @@ -84,7 +84,8 @@ export const default_custom = { disable_hcn_color: false, first_note_preview: 0, - skin_customize_flg: Array(3).fill(-1), + skin_customize_flg: Array(16).fill(-1), + vskin_customize_flg: Array(6).fill(-1), note_size: 0, lift_cover: 0, diff --git a/iidx@asphyxia/models/ticket.ts b/iidx@asphyxia/models/ticket.ts new file mode 100644 index 0000000..ba3b37f --- /dev/null +++ b/iidx@asphyxia/models/ticket.ts @@ -0,0 +1,8 @@ +export interface lane_ticket { + collection: "lane_ticket"; + version: number; + + ticket_id: number; + + arrange_id: number; +} diff --git a/iidx@asphyxia/pug/LDJ/34pcget.pug b/iidx@asphyxia/pug/LDJ/34pcget.pug new file mode 100644 index 0000000..2ae8076 --- /dev/null +++ b/iidx@asphyxia/pug/LDJ/34pcget.pug @@ -0,0 +1,127 @@ +IIDX34pc(status="0") + pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach mode=pcdata.mode category=pcdata.category pmode=pcdata.pmode ngrade=pcdata.ngrade mdetail=pcdata.mdetail rtype=pcdata.rtype naviflg=pcdata.naviflg bgnasst=pcdata.bgnasst player_kind=pcdata.player_kind sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 gpos=pcdata.gpos s_sorttype=pcdata.s_sorttype d_sorttype=pcdata.d_sorttype s_pace=pcdata.s_pace d_pace=pcdata.d_pace s_gno=pcdata.s_gno d_gno=pcdata.d_gno s_sub_gno=pcdata.s_sub_gno d_sub_gno=pcdata.d_sub_gno s_gtype=pcdata.s_gtype d_gtype=pcdata.d_gtype s_sdlen=pcdata.s_sdlen d_sdlen=pcdata.d_sdlen s_sdtype=pcdata.s_sdtype d_sdtype=pcdata.d_sdtype s_timing=pcdata.s_timing d_timing=pcdata.d_timing s_notes=pcdata.s_notes d_notes=pcdata.d_notes s_judge=pcdata.s_judge d_judge=pcdata.d_judge s_judgeAdj=pcdata.s_judgeAdj d_judgeAdj=pcdata.d_judgeAdj s_hispeed=pcdata.s_hispeed d_hispeed=pcdata.d_hispeed s_liflen=pcdata.s_liflen d_liflen=pcdata.d_liflen s_disp_judge=pcdata.s_disp_judge d_disp_judge=pcdata.d_disp_judge s_opstyle=pcdata.s_opstyle d_opstyle=pcdata.d_opstyle s_graph_score=pcdata.s_graph_score d_graph_score=pcdata.d_graph_score s_auto_scrach=pcdata.s_auto_scrach d_auto_scrach=pcdata.d_auto_scrach s_gauge_disp=pcdata.s_gauge_disp d_gauge_disp=pcdata.d_gauge_disp s_lane_brignt=pcdata.s_lane_brignt d_lane_brignt=pcdata.d_lane_brignt s_camera_layout=pcdata.s_camera_layout d_camera_layout=pcdata.d_camera_layout s_ghost_score=pcdata.s_ghost_score d_ghost_score=pcdata.d_ghost_score s_tsujigiri_disp=pcdata.s_tsujigiri_disp d_tsujigiri_disp=pcdata.d_tsujigiri_disp s_auto_adjust=pcdata.s_auto_adjust d_auto_adjust=pcdata.d_auto_adjust s_timing_split=pcdata.s_timing_split d_timing_split=pcdata.d_timing_split s_visualization=pcdata.s_visualization d_visualization=pcdata.d_visualization s_classic_hispeed=pcdata.s_classic_hispeed d_classic_hispeed=pcdata.d_classic_hispeed movie_thumbnail=pcdata.movie_thumbnail s_laneobj_brignt=pcdata.s_laneobj_brignt d_laneobj_brignt=pcdata.d_laneobj_brignt s_bpm_notice=pcdata.s_bpm_notice d_bpm_notice=pcdata.d_bpm_notice s_sd_adjust=pcdata.s_sd_adjust d_sd_adjust=pcdata.d_sd_adjust s_disp_area_fix=pcdata.s_disp_area_fix d_disp_area_fix=pcdata.d_disp_area_fix s_always_disp_num=pcdata.s_always_disp_num d_always_disp_num=pcdata.d_always_disp_num) + lightning_play_data(dpnum=lm_playdata.dp_num spnum=lm_playdata.sp_num) + lightning_setting(headphone_vol=lm_settings.headphone_vol resistance_dp_left=lm_settings.resistance_dp_left resistance_dp_right=lm_settings.resistance_dp_right resistance_sp_left=lm_settings.resistance_sp_left resistance_sp_right=lm_settings.resistance_sp_right keyboard_kind=lm_settings.keyboard_kind assistant_disp_type=lm_settings.assistant_disp_type assistant_last_tab=lm_settings.assistant_last_tab assistant_chara=lm_settings.assistant_chara) + slider(__type="s32" __count="7") #{lm_settings.slider[0]} #{lm_settings.slider[1]} #{lm_settings.slider[2]} #{lm_settings.slider[3]} #{lm_settings.slider[4]} #{lm_settings.slider[5]} #{lm_settings.slider[6]} + light(__type="bool" __count="10") #{lm_settings.light[0]} #{lm_settings.light[1]} #{lm_settings.light[2]} #{lm_settings.light[3]} #{lm_settings.light[4]} #{lm_settings.light[5]} #{lm_settings.light[6]} #{lm_settings.light[7]} #{lm_settings.light[8]} #{lm_settings.light[9]} + concentration(__type="bool") #{lm_settings.concentration} + spdp_rival(flg="-1") + bind_eaappli + ea_premium_course + dellar_bonus(rate="100") + secret + flg1(__type="s64" __count="3") -1 -1 -1 + flg2(__type="s64" __count="3") -1 -1 -1 + flg3(__type="s64" __count="3") -1 -1 -1 + flg4(__type="s64" __count="3") -1 -1 -1 + flg5(__type="s64" __count="3") -1 -1 -1 + leggendaria + flg1(__type="s64" __count="3") -1 -1 -1 + flg2(__type="s64" __count="3") -1 -1 -1 + music_memo + - for (let m of mArray) + folder(play_style=m.play_style folder_id=m.folder_idx name=m.folder_name) + music_id(__type="s32" __count="10") #{m.music_ids[0]} #{m.music_ids[1]} #{m.music_ids[2]} #{m.music_ids[3]} #{m.music_ids[4]} #{m.music_ids[5]} #{m.music_ids[6]} #{m.music_ids[7]} #{m.music_ids[8]} #{m.music_ids[9]} + music_filter + - for (let f of fArray) + folder(play_style=f.play_style folder_id=f.folder_id filter_id=f.filter_id value0=f.value0 value1=f.value1) + is_valid(__type="bool") #{f.is_valid} + - for (let fs of fsArray) + sort(play_style=fs.play_style folder_id=fs.folder_id sort=fs.sort) + qpro_secret + head(__type="s64" __count="7") #{custom.qpro_secret_head[0]} #{custom.qpro_secret_head[1]} #{custom.qpro_secret_head[2]} #{custom.qpro_secret_head[3]} #{custom.qpro_secret_head[4]} #{custom.qpro_secret_head[5]} #{custom.qpro_secret_head[6]} + hair(__type="s64" __count="7") #{custom.qpro_secret_hair[0]} #{custom.qpro_secret_hair[1]} #{custom.qpro_secret_hair[2]} #{custom.qpro_secret_hair[3]} #{custom.qpro_secret_hair[4]} #{custom.qpro_secret_hair[5]} #{custom.qpro_secret_hair[6]} + face(__type="s64" __count="7") #{custom.qpro_secret_face[0]} #{custom.qpro_secret_face[1]} #{custom.qpro_secret_face[2]} #{custom.qpro_secret_face[3]} #{custom.qpro_secret_face[4]} #{custom.qpro_secret_face[5]} #{custom.qpro_secret_face[6]} + body(__type="s64" __count="7") #{custom.qpro_secret_body[0]} #{custom.qpro_secret_body[1]} #{custom.qpro_secret_body[2]} #{custom.qpro_secret_body[3]} #{custom.qpro_secret_body[4]} #{custom.qpro_secret_body[5]} #{custom.qpro_secret_body[6]} + hand(__type="s64" __count="7") #{custom.qpro_secret_hand[0]} #{custom.qpro_secret_hand[1]} #{custom.qpro_secret_hand[2]} #{custom.qpro_secret_hand[3]} #{custom.qpro_secret_hand[4]} #{custom.qpro_secret_hand[5]} #{custom.qpro_secret_hand[6]} + back(__type="s64" __count="7") #{custom.qpro_secret_back[0]} #{custom.qpro_secret_back[1]} #{custom.qpro_secret_back[2]} #{custom.qpro_secret_back[3]} #{custom.qpro_secret_back[4]} #{custom.qpro_secret_back[5]} #{custom.qpro_secret_back[6]} + grade(sgid=pcdata.sgid dgid=pcdata.dgid) + - for (let d of dArray) + g(__type="u8" __count="4") #{d[0]} #{d[1]} #{d[2]} #{d[3]} + pskin(__type="s32" __count="22") #{appendsettings} #{custom.note_burst} #{custom.bomb_size} #{custom.turntable} #{custom.judge_font} #{custom.note_skin} #{custom.note_size} #{Number(custom.disable_musicpreview)} #{Number(custom.vefx_lock)} #{custom.effect} #{custom.menu_music} #{Number(custom.disable_hcn_color)} #{custom.first_note_preview} #{custom.lane_cover} #{custom.pacemaker_cover} #{custom.lift_cover} #{custom.note_beam} #{custom.note_beam_size} #{custom.full_combo_splash} #{custom.frame} #{custom.cn_color} #{custom.cn_size} + vskin(__type="s32" __count="4") #{lm_custom.premium_skin} #{lm_custom.premium_bg} #{lm_custom.premium_bg_concent} #{lm_custom.entry_bg} + vskin_customize_setting(entrybg_brightness=lm_custom.entry_bg_brightness subbg_brightness=lm_settings.brightness concentration_brightness=lm_settings.brightness_concent) + qprodata(__type="u32" __count="6") #{custom.qpro_head} #{custom.qpro_hair} #{custom.qpro_face} #{custom.qpro_hand} #{custom.qpro_body} #{custom.qpro_back} + //-qproattendant0(__type="u32" __count"6") head hair face hand body back? + //-qproattendant1(__type="u32" __count"6") head hair face hand body back? + //-qproattendant2(__type="u32" __count"6") head hair face hand body back? + rlist + - for (let rd of rArray) + rival(spdp=rd.play_style id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3]) + is_robo(__type="bool") 0 + qprodata(body=rd.qprodata[3] face=rd.qprodata[2] hair=rd.qprodata[0] hand=rd.qprodata[4] head=rd.qprodata[1] back=rd.qprodata[5]) + shop(name=shop_data.opname) + rlist_sub + - for (let rsd of rsArray) + rival(spdp=rsd.play_style id=rsd.profile[2] id_str=rsd.profile[3] djname=rsd.profile[0] pid=rsd.profile[1] sg=rsd.pcdata[0] dg=rsd.pcdata[1] sa=rsd.pcdata[2] da=rsd.pcdata[3]) + is_robo(__type="bool") 0 + qprodata(body=rsd.qprodata[3] face=rsd.qprodata[2] hair=rsd.qprodata[0] hand=rsd.qprodata[4] head=rsd.qprodata[1] back=rsd.qprodata[5]) + shop(name=shop_data.opname) + notes_radar(style="0") + radar_score(__type="s32" __count="6") #{pcdata.nr_spradar[0]} #{pcdata.nr_spradar[1]} #{pcdata.nr_spradar[2]} #{pcdata.nr_spradar[3]} #{pcdata.nr_spradar[4]} #{pcdata.nr_spradar[5]} + notes_radar(style="1") + radar_score(__type="s32" __count="6") #{pcdata.nr_dpradar[0]} #{pcdata.nr_dpradar[1]} #{pcdata.nr_dpradar[2]} #{pcdata.nr_dpradar[3]} #{pcdata.nr_dpradar[4]} #{pcdata.nr_dpradar[5]} + visitor(anum="10" snum="10" pnum="10" vs_flg="1") + step(enemy_damage=pcdata.st_enemy_damage progress=pcdata.st_progress total_point=pcdata.st_total_point enemy_defeat_flg=pcdata.st_enemy_defeat_flg sp_level=pcdata.st_sp_level dp_level=pcdata.st_dp_level sp_level_h=pcdata.st_sp_level_h dp_level_h=pcdata.st_dp_level_h sp_level_exh=pcdata.st_sp_level_exh dp_level_exh=pcdata.st_dp_level_exh sp_fluctuation=pcdata.st_sp_fluctuation dp_fluctuation=pcdata.st_dp_fluctuation sp_mplay=pcdata.st_sp_mplay dp_mplay=pcdata.st_dp_mplay tips_read_list=pcdata.st_tips_read_list) + is_track_ticket(__type="bool") #{Number(pcdata.st_is_track_ticket)} + packinfo(music_0="-1" music_1="-1" music_2="-1" pack_id="1") + achievements(pack=pcdata.achi_pack pack_comp=pcdata.achi_packcomp last_weekly=pcdata.achi_lastweekly weekly_num=pcdata.achi_weeklynum visit_flg=pcdata.achi_visitflg rival_crush=pcdata.achi_rivalcrush) + deller(deller=pcdata.deller) + orb_data(rest_orb=pcdata.orb present_orb=pcdata.present_orb) + old_linkage_secret_flg(triple_tribe_3="65535" triple_tribe_4="65535" triple_tribe_5="65535" triple_tribe_6="65535" popn_cheers="65535" bemani_summer="65535") + battle_setting + default_chat + other + hide_shopname(__type="bool") 0 + pskin_customize_flg(skin_frame_flg="-1" skin_turntable_flg="-1" skin_bomb_flg="-1" skin_bgm_flg="-1" skin_lane_flg0="-1" skin_lane_flg1="-1" skin_lane_flg2="-1" skin_lane_flg3="-1" skin_lane_flg4="-1" skin_lane_flg5="-1" skin_lane_flg6="-1" skin_lane_flg7="-1" skin_notes_flg="-1" skin_fullcombo_flg="-1" skin_keybeam_flg="-1" skin_judgestring_flg="-1") + vskin_customize_flg(skin_subicon_flg="-1" skin_subbg_flg0="-1" skin_subbg_flg1="-1" skin_subbg_flg2="-1" skin_entry_flg0="-1" skin_entry_flg1="-1") + ultimate_mobile_link(music_list="-1") + link_flag + language_setting(language=profile.language) + movie_agreement(agreement_version="1") + movie_setting + hide_name(__type="bool") 0 + world_tourism_secret_flg + flg1(__type="s64" __count="3") -1 -1 -1 + flg2(__type="s64" __count="3") -1 -1 -1 + badge + - for (let b of bArray) + badge_data(category_id=b.id badge_flg_id=b.flg_id badge_flg=b.flg) + activity + today(day_id=activityDayId date=activityTimestamp) + if activityTodaySP != null + today_data(play_style=activityTodaySP.play_style music_num=activityTodaySP.music_num play_time=activityTodaySP.play_time keyboard_num=activityTodaySP.keyboard_num scratch_num=activityTodaySP.scratch_num) + clear_update_num(__type="s32" __count="13") #{activityTodaySP.clear_update_num[0]} #{activityTodaySP.clear_update_num[1]} #{activityTodaySP.clear_update_num[2]} #{activityTodaySP.clear_update_num[3]} #{activityTodaySP.clear_update_num[4]} #{activityTodaySP.clear_update_num[5]} #{activityTodaySP.clear_update_num[6]} #{activityTodaySP.clear_update_num[7]} #{activityTodaySP.clear_update_num[8]} #{activityTodaySP.clear_update_num[9]} #{activityTodaySP.clear_update_num[10]} #{activityTodaySP.clear_update_num[11]} #{activityTodaySP.clear_update_num[12]} + score_update_num(__type="s32" __count="13") #{activityTodaySP.score_update_num[0]} #{activityTodaySP.score_update_num[1]} #{activityTodaySP.score_update_num[2]} #{activityTodaySP.score_update_num[3]} #{activityTodaySP.score_update_num[4]} #{activityTodaySP.score_update_num[5]} #{activityTodaySP.score_update_num[6]} #{activityTodaySP.score_update_num[7]} #{activityTodaySP.score_update_num[8]} #{activityTodaySP.score_update_num[9]} #{activityTodaySP.score_update_num[10]} #{activityTodaySP.score_update_num[11]} #{activityTodaySP.score_update_num[12]} + if activityTodayDP != null + today_data(play_style=activityTodayDP.play_style music_num=activityTodayDP.music_num play_time=activityTodayDP.play_time keyboard_num=activityTodayDP.keyboard_num scratch_num=activityTodayDP.scratch_num) + clear_update_num(__type="s32" __count="13") #{activityTodayDP.clear_update_num[0]} #{activityTodayDP.clear_update_num[1]} #{activityTodayDP.clear_update_num[2]} #{activityTodayDP.clear_update_num[3]} #{activityTodayDP.clear_update_num[4]} #{activityTodayDP.clear_update_num[5]} #{activityTodayDP.clear_update_num[6]} #{activityTodayDP.clear_update_num[7]} #{activityTodayDP.clear_update_num[8]} #{activityTodayDP.clear_update_num[9]} #{activityTodayDP.clear_update_num[10]} #{activityTodayDP.clear_update_num[11]} #{activityTodayDP.clear_update_num[12]} + score_update_num(__type="s32" __count="13") #{activityTodayDP.score_update_num[0]} #{activityTodayDP.score_update_num[1]} #{activityTodayDP.score_update_num[2]} #{activityTodayDP.score_update_num[3]} #{activityTodayDP.score_update_num[4]} #{activityTodayDP.score_update_num[5]} #{activityTodayDP.score_update_num[6]} #{activityTodayDP.score_update_num[7]} #{activityTodayDP.score_update_num[8]} #{activityTodayDP.score_update_num[9]} #{activityTodayDP.score_update_num[10]} #{activityTodayDP.score_update_num[11]} #{activityTodayDP.score_update_num[12]} + weekly + week_data(play_style="0") + - for (let a of activityWeekSP) + week(week_index=a.week_index week_id=a.week_id date=a.date music_num=a.music_num play_time=a.play_time keyboard_num=a.keyboard_num scratch_num=a.scratch_num) + clear_update_num(__type="s32" __count="13") #{a.clear_update_num[0]} #{a.clear_update_num[1]} #{a.clear_update_num[2]} #{a.clear_update_num[3]} #{a.clear_update_num[4]} #{a.clear_update_num[5]} #{a.clear_update_num[6]} #{a.clear_update_num[7]} #{a.clear_update_num[8]} #{a.clear_update_num[9]} #{a.clear_update_num[10]} #{a.clear_update_num[11]} #{a.clear_update_num[12]} + score_update_num(__type="s32" __count="13") #{a.score_update_num[0]} #{a.score_update_num[1]} #{a.score_update_num[2]} #{a.score_update_num[3]} #{a.score_update_num[4]} #{a.score_update_num[5]} #{a.score_update_num[6]} #{a.score_update_num[7]} #{a.score_update_num[8]} #{a.score_update_num[9]} #{a.score_update_num[10]} #{a.score_update_num[11]} #{a.score_update_num[12]} + week_data(play_style="1") + - for (let b of activityWeekDP) + week(week_index=b.week_index week_id=b.week_id date=b.date music_num=b.music_num play_time=b.play_time keyboard_num=b.keyboard_num scratch_num=b.scratch_num) + clear_update_num(__type="s32" __count="13") #{b.clear_update_num[0]} #{b.clear_update_num[1]} #{b.clear_update_num[2]} #{b.clear_update_num[3]} #{b.clear_update_num[4]} #{b.clear_update_num[5]} #{b.clear_update_num[6]} #{b.clear_update_num[7]} #{b.clear_update_num[8]} #{b.clear_update_num[9]} #{b.clear_update_num[10]} #{b.clear_update_num[11]} #{b.clear_update_num[12]} + score_update_num(__type="s32" __count="13") #{b.score_update_num[0]} #{b.score_update_num[1]} #{b.score_update_num[2]} #{b.score_update_num[3]} #{b.score_update_num[4]} #{b.score_update_num[5]} #{b.score_update_num[6]} #{b.score_update_num[7]} #{b.score_update_num[8]} #{b.score_update_num[9]} #{b.score_update_num[10]} #{b.score_update_num[11]} #{b.score_update_num[12]} + mynews + - for (let a of activityMynews) + detail(play_style=a.play_style kind=a.kind news_no=a.news_no index=a.index day_id=a.day_id music_id=a.music_id note_id=a.note_id best_score=a.best_score now_score=a.now_score now_clear=a.now_clear news_time=a.news_time) + best_result + - for (let a of activityMybest) + best_data(play_style=a.play_style kind=a.kind play_side=a.play_side music_id=a.music_id note_id=a.note_id target_graph=a.target_graph target_score=a.target_score pacemaker=a.pacemaker best_clear=a.best_clear best_score=a.best_score best_misscount=a.best_misscount now_clear=a.now_clear now_score=a.now_score now_misscount=a.now_misscount now_pgreat=a.now_pgreat now_great=a.now_great now_good=a.now_good now_bad=a.now_bad now_poor=a.now_poor now_combo=a.now_combo now_fast=a.now_fast now_slow=a.now_slow option=a.option option2=a.option_2 gauge_type=a.gauge_type result_type=a.result_type update_date=a.update_date) + ghost_gauge_data(__type="bin") #{a.ghost_gauge_data} + is_special_result(__type="bool") #{a.is_special_result} + djl_v(view_type=(custom.djl_v ? "0" : "2")) + //-voice + fvoice(id="" prev="") [loop] + music_retry_sp + - for (let a of retry_ticket_sp) + ticket(ticket_id=a.ticket_id music_id=a.music_id class_id=a.class_id arrange_id=a.arrange_id arrange_id2=a.arrange_id2 option=a.option option2=a.option2 expire_date=a.expire_date) + music_retry_dp + - for (let b of retry_ticket_dp) + ticket(ticket_id=b.ticket_id music_id=b.music_id class_id=b.class_id arrange_id=b.arrange_id arrange_id2=b.arrange_id2 option=b.option option2=b.option2 expire_date=a.expire_date) diff --git a/iidx@asphyxia/util.ts b/iidx@asphyxia/util.ts index a5a7496..5405ac5 100644 --- a/iidx@asphyxia/util.ts +++ b/iidx@asphyxia/util.ts @@ -1,3 +1,4 @@ +import { lamp } from "./models/clearlamp"; import { custom } from "./models/custom"; import { pcdata } from "./models/pcdata"; import { profile } from "./models/profile"; @@ -246,3 +247,97 @@ export function GetCommand(data: any) { return command.split(' '); } + +export function LampIn(version: number, cflg: number) { + if (version == 9) { + return cflg == 1 ? lamp.CLEAR : lamp.FAILED; + } + else if (version == 10) { + switch (cflg) { + case 1: return lamp.EASY_CLEAR; + case 2: return lamp.CLEAR; + case 3: return lamp.FULL_COMBO; + default: return lamp.FAILED; + } + } + else if (version >= 11 && version < 14) { + switch (cflg) { + case 0: return lamp.NO_PLAY; + case 1: return lamp.FAILED; + case 2: return lamp.EASY_CLEAR; + case 3: return lamp.CLEAR; + case 4: return lamp.HARD_CLEAR; + case 5: return lamp.FULL_COMBO; + default: return lamp.FAILED; + } + } + else if (version >= 14 && version < 20) { + switch (cflg) { + case 0: return lamp.NO_PLAY; + case 1: return lamp.FAILED; + case 2: return lamp.ASSIST_CLEAR; + case 3: return lamp.EASY_CLEAR; + case 4: return lamp.CLEAR; + case 5: return lamp.HARD_CLEAR; + case 6: return lamp.FULL_COMBO; + default: return lamp.FAILED; + } + } + + return cflg; +} + +export function LampOut(version: number, cflg: number) { + if (version == 9) { + return cflg == lamp.NO_PLAY || cflg == lamp.FAILED ? 0 : 1; + } + else if (version == 10) { + switch (cflg) { + case lamp.NO_PLAY: + case lamp.FAILED: + return 0; + case lamp.ASSIST_CLEAR: + case lamp.EASY_CLEAR: + return 1; + case lamp.CLEAR: + case lamp.HARD_CLEAR: + case lamp.EX_HARD_CLEAR: + return 2; + case lamp.FULL_COMBO: + return 3; + default: + return 0; + } + } + else if (version >= 11 && version < 14) { + switch (cflg) { + case lamp.NO_PLAY: return 0; + case lamp.FAILED: return 1; + case lamp.ASSIST_CLEAR: + case lamp.EASY_CLEAR: + return 2; + case lamp.CLEAR: return 3; + case lamp.HARD_CLEAR: + case lamp.EX_HARD_CLEAR: + return 4; + case lamp.FULL_COMBO: return 5; + default: return 0; + } + } + else if (version >= 14 && version < 20) { + switch (cflg) { + case lamp.NO_PLAY: return 0; + case lamp.FAILED: return 1; + case lamp.ASSIST_CLEAR: return 2; + case lamp.EASY_CLEAR: return 3; + case lamp.CLEAR: return 4; + case lamp.HARD_CLEAR: + case lamp.EX_HARD_CLEAR: + return 5; + case lamp.FULL_COMBO: return 6; + default: return 0; + } + } + + return cflg; +} diff --git a/iidx@asphyxia/webui/asset/js/setting.js b/iidx@asphyxia/webui/asset/js/setting.js index a8502cb..1424249 100644 --- a/iidx@asphyxia/webui/asset/js/setting.js +++ b/iidx@asphyxia/webui/asset/js/setting.js @@ -31,7 +31,7 @@ $("#version").on("change", function () { $("#effect").val(data["custom"].effect); $("#bomb_size").val(data["custom"].bomb_size); $("#disable_hcn_color").prop("checked", data["custom"].disable_hcn_color); - $("#first_note_preview").prop("checked", Number(data["custom"].first_note_preview) === 1); + $("#first_note_preview").val(data["custom"].first_note_preview); if (data["custom"].note_size == undefined) $("#note_size").val(0); else $("#note_size").val(data["custom"].note_size); diff --git a/iidx@asphyxia/webui/profile_-----detail.pug b/iidx@asphyxia/webui/profile_-----detail.pug index e86a49c..d61ad56 100644 --- a/iidx@asphyxia/webui/profile_-----detail.pug +++ b/iidx@asphyxia/webui/profile_-----detail.pug @@ -1,8 +1,9 @@ //DATA// profile: DB.FindOne(refid, { collection: 'profile' }) - pcdata: DB.FindOne(refid, { collection: 'pcdata' }) + pcdatas: DB.Find(refid, { collection: 'pcdata' }) - + const pcdata = (pcdatas || []).sort((a, b) => b.updatedAt - a.updatedAt)[0]; const version = [ 10, 11, diff --git a/iidx@asphyxia/webui/profile_----setting.pug b/iidx@asphyxia/webui/profile_----setting.pug index f3ca996..244569d 100644 --- a/iidx@asphyxia/webui/profile_----setting.pug +++ b/iidx@asphyxia/webui/profile_----setting.pug @@ -1,10 +1,12 @@ //DATA// - profile: DB.FindOne(refid, { collection: "profile" }) - pcdata: DB.FindOne(refid, { collection: "pcdata" }) - custom: DB.FindOne(refid, { collection: "custom" }) - lm_custom: DB.FindOne(refid, { collection: "lightning_custom" }) - + profile: DB.FindOne(refid, { collection: 'profile' }) + pcdatas: DB.Find(refid, { collection: 'pcdata' }) + customs: DB.Find(refid, { collection: 'custom' }) + lm_customs: DB.Find(refid, { collection: 'lightning_custom' }) - + const pcdata = (pcdatas || []).sort((a, b) => b.updatedAt - a.updatedAt)[0]; + const custom = (customs || []).filter((data) => data.version == pcdata.version)[0]; + const lm_custom = (lm_customs || []).filter((data) => data.version == pcdata.version)[0]; const version = [ 10, 11, @@ -189,7 +191,8 @@ div const note_size_types = [ {val: 0, name: 'Default'}, {val: 1, name: 'Short'}, - {val: 2, name: 'Very Short'} + {val: 2, name: 'Very Short'}, + {val: 3, name: 'Large'}, ] each item in note_size_types option(value=item.val, selected=(custom.note_size == item.val)) #{item.name} @@ -225,6 +228,7 @@ div - const beam_sizes = [ {val: 0, name: 'Default'}, + {val: 1, name: 'Short'}, {val: 2, name: 'Very Short'}, {val: 3, name: 'Long'} ] @@ -1346,17 +1350,11 @@ div .field label.label Charge Note Size .control - if custom.cn_size === undefined - input.input(type="number" name="cn_size", id="cn_size", value="0") - else - input.input(type="number" name="cn_size", id="cn_size", value=custom.cn_size) + input.input(type="number" name="cn_size", id="cn_size", value=(custom.cn_size || "0")) .field label.label Charge Note Color .control - if custom.cn_color === undefined - input.input(type="number" name="cn_color", id="cn_color", value="0") - else - input.input(type="number" name="cn_color", id="cn_color", value=custom.cn_color) + input.input(type="number" name="cn_color", id="cn_color", value=(custom.cn_color || "0")) .field label.label Disable Music Preview .control @@ -1364,7 +1362,7 @@ div .field label.label Disable HCN Color .control - input(type="checkbox" name="disable_hcn_color", id="disable_hcn_color", checked=Boolean(custom.disable_hcn_color)) + input(type="checkbox" name="disable_hcn_color", id="disable_hcn_color", checked=Boolean(custom.disable_hcn_color)) //- APPEND SETTINGS .field label.label Rank Folder @@ -1417,10 +1415,7 @@ div .field label.label Disable Beginner Option .control - if custom.disable_beginner_option === undefined - input(type="checkbox" name="disable_beginner_option", id="disable_beginner_option", checked=Boolean(false)) - else - input(type="checkbox" name="disable_beginner_option", id="disable_beginner_option", checked=Boolean(custom.disable_beginner_option)) + input(type="checkbox" name="disable_beginner_option", id="disable_beginner_option", checked=Boolean(custom.disable_beginner_option || false)) //- QPRO .field label.label QPRO Head @@ -1445,10 +1440,7 @@ div .field label.label QPRO Back .control - if custom.qpro_back === undefined - input.input(type="number" name="qpro_back", id="qpro_back", value="0") - else - input.input(type="number" name="qpro_back", id="qpro_back", value=custom.qpro_back) + input.input(type="number" name="qpro_back", id="qpro_back", value=(custom.qpro_back || "0")) //- LIGHTNING CUSTOM if lm_custom != null .field @@ -1462,24 +1454,15 @@ div .field label.label Premium Area Background (Concentration Mode) .control - if lm_custom.premium_bg_concent === undefined - input.input(type="number" name="lm_bg_2", id="lm_bg_2", value="0") - else - input.input(type="number" name="lm_bg_2", id="lm_bg_2", value=lm_custom.premium_bg_concent) + input.input(type="number" name="lm_bg_2", id="lm_bg_2", value=(lm_custom.premium_bg_concent || "0")) .field label.label Entry BG .control - if lm_custom.entry_bg === undefined - input.input(type="number" name="lm_entry_bg", id="lm_entry_bg", value="0") - else - input.input(type="number" name="lm_entry_bg", id="lm_entry_bg", value=lm_custom.entry_bg) + input.input(type="number" name="lm_entry_bg", id="lm_entry_bg", value=(lm_custom.entry_bg || "0")) .field label.label Entry BG Brightness .control - if lm_custom.entry_bg_brightness === undefined - input.input(type="number" name="lm_entry_bg_bright", id="lm_entry_bg_bright", value="0") - else - input.input(type="number" name="lm_entry_bg_bright", id="lm_entry_bg_bright", value=lm_custom.entry_bg_brightness) + input.input(type="number" name="lm_entry_bg_bright", id="lm_entry_bg_bright", value=(lm_custom.entry_bg_brightness || "0")) .field button.button.is-primary(type="submit") span.icon