danoniplus 51.0.2 → 51.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js/danoni_main.js +3 -3
- package/js/lib/dosConverter.js +12 -34
- package/package.json +1 -1
package/js/danoni_main.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Source by tickle
|
|
6
6
|
* Created : 2018/10/08
|
|
7
|
-
* Revised : 2026/09/
|
|
7
|
+
* Revised : 2026/09/26
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 51.0.
|
|
12
|
-
const g_revisedDate = `2026/09/
|
|
11
|
+
const g_version = `Ver 51.0.3`;
|
|
12
|
+
const g_revisedDate = `2026/09/26`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
package/js/lib/dosConverter.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2026/09/13
|
|
8
|
-
* Revised : 2026/09/
|
|
8
|
+
* Revised : 2026/09/26 (v51.0.3)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -228,9 +228,6 @@ const initialControl = async () => {
|
|
|
228
228
|
// 初期色設定(譜面ヘッダー)の初期設定
|
|
229
229
|
Object.assign(g_headerObj, resetBaseColorList(g_headerObj, g_rootObj));
|
|
230
230
|
|
|
231
|
-
// 非分割時は getGaugeSetting が全難易度を一括構築するため、初回のみで十分
|
|
232
|
-
const loopCount = g_stateObj.dosDivideFlg ? g_headerObj.keyLabels.length : 1;
|
|
233
|
-
|
|
234
231
|
for (let j = 0; j < g_headerObj.difLabels.length; j++) {
|
|
235
232
|
|
|
236
233
|
// 譜面ファイルが分割されている場合、譜面詳細情報取得のために譜面をロード
|
|
@@ -261,11 +258,8 @@ const initialControl = async () => {
|
|
|
261
258
|
|
|
262
259
|
// カスタムゲージの設定(譜面ヘッダー側)
|
|
263
260
|
resetCustomGauge(g_rootObj, { scoreId: j });
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
Object.keys(g_gaugeOptionObj.customFulls).forEach(gaugePtn =>
|
|
267
|
-
getGaugeSetting(g_rootObj, gaugePtn, g_headerObj.difLabels.length, { scoreId: j }));
|
|
268
|
-
}
|
|
261
|
+
Object.keys(g_gaugeOptionObj.customFulls).forEach(gaugePtn =>
|
|
262
|
+
getGaugeSetting(g_rootObj, gaugePtn, { scoreId: j }));
|
|
269
263
|
}
|
|
270
264
|
}
|
|
271
265
|
safeExecuteCustomHooks(`g_customJsObj.preTitle`, g_customJsObj.preTitle);
|
|
@@ -2103,31 +2097,17 @@ const resetCustomGauge = (_dosObj, { scoreId = 0 } = {}) => {
|
|
|
2103
2097
|
* ゲージ別個別設定の取得
|
|
2104
2098
|
* @param {object} _dosObj
|
|
2105
2099
|
* @param {string} _name
|
|
2106
|
-
* @param {number} _difLength
|
|
2107
2100
|
* @param {string} [object.scoreId=0]
|
|
2108
2101
|
*/
|
|
2109
|
-
const getGaugeSetting = (_dosObj, _name,
|
|
2110
|
-
|
|
2111
|
-
/** ゲージ設定上書きフラグ */
|
|
2112
|
-
const gaugeUpdateFlg = g_stateObj.scoreLockFlg && scoreId > 0;
|
|
2102
|
+
const getGaugeSetting = (_dosObj, _name, { scoreId = 0 } = {}) => {
|
|
2113
2103
|
const gauges = hasVal(_dosObj[`gauge${_name}`]) ? splitLF2(_dosObj[`gauge${_name}`]) : [];
|
|
2114
2104
|
|
|
2115
|
-
const registerGaugeDetails = (_scoreId) => {
|
|
2116
|
-
const gaugeDetails = getGaugeDetailList(_scoreId);
|
|
2117
|
-
if (!hasVal(gaugeDetails)) return; // baseも譜面別ヘッダーもどちらも無ければ何もしない
|
|
2118
|
-
const [border, recovery, damage, init] = gaugeDetails;
|
|
2119
|
-
g_gaugeSelObj[_scoreId] ??= structuredClone(g_gaugeSelObj.default ?? { __order: [] });
|
|
2120
|
-
g_gaugeSelObj[_scoreId][_name] = { ...g_gaugeSelObj[_scoreId][_name], Border: border, Recovery: recovery, Damage: damage, Init: init };
|
|
2121
|
-
};
|
|
2122
|
-
|
|
2123
2105
|
/**
|
|
2124
2106
|
* gaugeNormal2, gaugeEasy2などの個別設定があった場合にその値から配列を作成
|
|
2125
|
-
* @param {number} _scoreId
|
|
2126
|
-
* @param {number[]} _defaultGaugeList
|
|
2127
2107
|
* @returns {number[]}
|
|
2128
2108
|
*/
|
|
2129
|
-
const getGaugeDetailList = (
|
|
2130
|
-
const idHeader = (
|
|
2109
|
+
const getGaugeDetailList = () => {
|
|
2110
|
+
const idHeader = (scoreId === 0) ? 1 : setScoreIdHeader(scoreId, g_stateObj.scoreLockFlg, false);
|
|
2131
2111
|
if (hasVal(idHeader)) {
|
|
2132
2112
|
const dosId = (idHeader || 0) - 1;
|
|
2133
2113
|
const headerName = `gauge${_name}${idHeader}`;
|
|
@@ -2136,16 +2116,14 @@ const getGaugeSetting = (_dosObj, _name, _difLength, { scoreId = 0 } = {}) => {
|
|
|
2136
2116
|
return (detailGauges[dosId] || detailGauges[0])?.split(`,`);
|
|
2137
2117
|
}
|
|
2138
2118
|
}
|
|
2139
|
-
return (gauges[
|
|
2119
|
+
return (gauges[scoreId] || gauges[0])?.split(`,`);
|
|
2140
2120
|
};
|
|
2141
2121
|
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2122
|
+
const gaugeDetails = getGaugeDetailList();
|
|
2123
|
+
if (!hasVal(gaugeDetails)) return;
|
|
2124
|
+
const [border, recovery, damage, init] = gaugeDetails;
|
|
2125
|
+
g_gaugeSelObj[scoreId] ??= structuredClone(g_gaugeSelObj.default ?? { __order: [] });
|
|
2126
|
+
g_gaugeSelObj[scoreId][_name] = { ...g_gaugeSelObj[scoreId][_name], Border: border, Recovery: recovery, Damage: damage, Init: init };
|
|
2149
2127
|
};
|
|
2150
2128
|
|
|
2151
2129
|
/**
|