danoniplus 30.5.0 → 30.6.1
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 +33 -9
- 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 : 2023/03/
|
|
7
|
+
* Revised : 2023/03/22
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 30.
|
|
12
|
-
const g_revisedDate = `2023/03/
|
|
11
|
+
const g_version = `Ver 30.6.1`;
|
|
12
|
+
const g_revisedDate = `2023/03/22`;
|
|
13
13
|
const g_alphaVersion = ``;
|
|
14
14
|
|
|
15
15
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
@@ -115,7 +115,9 @@ let g_finishFlg = true;
|
|
|
115
115
|
/** 共通オブジェクト */
|
|
116
116
|
const g_loadObj = {};
|
|
117
117
|
const g_rootObj = {};
|
|
118
|
-
const g_presetObj = {
|
|
118
|
+
const g_presetObj = {
|
|
119
|
+
keysDataLib: [],
|
|
120
|
+
};
|
|
119
121
|
let g_headerObj = {};
|
|
120
122
|
let g_scoreObj = {};
|
|
121
123
|
let g_attrObj = {};
|
|
@@ -1873,9 +1875,13 @@ const initialControl = async () => {
|
|
|
1873
1875
|
|
|
1874
1876
|
// 譜面ヘッダー、特殊キー情報の読込
|
|
1875
1877
|
Object.assign(g_headerObj, headerConvert(g_rootObj));
|
|
1876
|
-
|
|
1877
|
-
keysConvert(dosConvert(
|
|
1878
|
+
const importKeysData = _data => {
|
|
1879
|
+
keysConvert(dosConvert(_data));
|
|
1878
1880
|
g_headerObj.undefinedKeyLists = g_headerObj.undefinedKeyLists.filter(key => g_keyObj[`chara${key}_0`] === undefined);
|
|
1881
|
+
};
|
|
1882
|
+
g_presetObj.keysDataLib.forEach(list => importKeysData(list));
|
|
1883
|
+
if (g_presetObj.keysData !== undefined) {
|
|
1884
|
+
importKeysData(g_presetObj.keysData);
|
|
1879
1885
|
}
|
|
1880
1886
|
g_headerObj.keyExtraList = keysConvert(g_rootObj, {
|
|
1881
1887
|
keyExtraList: (g_rootObj.keyExtraList !== undefined ?
|
|
@@ -4313,6 +4319,9 @@ const createOptionWindow = _sprite => {
|
|
|
4313
4319
|
setDifficulty(true);
|
|
4314
4320
|
deleteChildspriteAll(`difList`);
|
|
4315
4321
|
makeDifList(difList, g_stateObj.filterKeys);
|
|
4322
|
+
if (g_keyObj.prevKey !== g_keyObj.currentKey) {
|
|
4323
|
+
g_keyObj.prevKey = g_keyObj.currentKey;
|
|
4324
|
+
}
|
|
4316
4325
|
}, {
|
|
4317
4326
|
x: 430 + _scrollNum * 10, y: 40, w: 20, h: 20, siz: C_SIZ_JDGCNTS,
|
|
4318
4327
|
}, g_cssObj.button_Mini);
|
|
@@ -5905,6 +5914,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
5905
5914
|
createCss2Button(`keycon${j}_${k}`, g_kCd[g_keyObj[`keyCtrl${keyCtrlPtn}`][j][k]], _ => {
|
|
5906
5915
|
g_currentj = j;
|
|
5907
5916
|
g_currentk = k;
|
|
5917
|
+
g_prevKey = -1;
|
|
5908
5918
|
g_keycons.cursorNum = g_keycons.cursorNumList.findIndex(val => val === g_currentj);
|
|
5909
5919
|
setKeyConfigCursor();
|
|
5910
5920
|
}, {
|
|
@@ -6094,8 +6104,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6094
6104
|
cursor.style.left = `${nextLeft}px`;
|
|
6095
6105
|
const baseY = C_KYC_HEIGHT * Number(posj > divideCnt) + 57;
|
|
6096
6106
|
cursor.style.top = `${baseY + C_KYC_REPHEIGHT * g_currentk}px`;
|
|
6097
|
-
if (
|
|
6098
|
-
g_kcType =
|
|
6107
|
+
if (g_kcType !== C_FLG_ALL) {
|
|
6108
|
+
g_kcType = (g_currentk === 0 ? `Main` : `Replaced`);
|
|
6099
6109
|
lnkKcType.textContent = getStgDetailName(g_kcType);
|
|
6100
6110
|
}
|
|
6101
6111
|
|
|
@@ -6112,9 +6122,23 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6112
6122
|
|
|
6113
6123
|
g_currentj = g_keycons.cursorNumList[_nextj];
|
|
6114
6124
|
g_currentk = 0;
|
|
6115
|
-
if (g_kcType === `Replaced`
|
|
6125
|
+
if (g_kcType === `Replaced`) {
|
|
6116
6126
|
g_currentk = 1;
|
|
6127
|
+
|
|
6128
|
+
// 代替キー設定の場合は次の代替キーが見つかるまで移動
|
|
6129
|
+
while (g_keyObj[`keyCtrl${keyCtrlPtn}`][g_currentj][1] === undefined) {
|
|
6130
|
+
g_keycons.cursorNum = (g_keycons.cursorNum + 1) % g_keycons.cursorNumList.length;
|
|
6131
|
+
g_currentj = g_keycons.cursorNumList[g_keycons.cursorNum];
|
|
6132
|
+
|
|
6133
|
+
// 一周して対象が無い場合は代替キーが無いため処理を抜ける(無限ループ対策)
|
|
6134
|
+
if (g_keycons.cursorNum === _nextj) {
|
|
6135
|
+
g_kcType = `Main`;
|
|
6136
|
+
g_currentk = 0;
|
|
6137
|
+
break;
|
|
6138
|
+
}
|
|
6139
|
+
}
|
|
6117
6140
|
}
|
|
6141
|
+
|
|
6118
6142
|
setKeyConfigCursor();
|
|
6119
6143
|
keyconSprite.scrollLeft = - maxLeftX;
|
|
6120
6144
|
};
|