danoniplus 26.6.1 → 26.7.0
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 +24 -50
- package/js/lib/danoni_constants.js +16 -1
- 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 : 2022/03/
|
|
7
|
+
* Revised : 2022/03/12
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 26.
|
|
12
|
-
const g_revisedDate = `2022/03/
|
|
11
|
+
const g_version = `Ver 26.7.0`;
|
|
12
|
+
const g_revisedDate = `2022/03/12`;
|
|
13
13
|
const g_alphaVersion = ``;
|
|
14
14
|
|
|
15
15
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
@@ -3017,16 +3017,14 @@ const headerConvert = _dosObj => {
|
|
|
3017
3017
|
* 曲名(1行)の取得
|
|
3018
3018
|
* @param {string} _musicName
|
|
3019
3019
|
*/
|
|
3020
|
-
const getMusicNameSimple = _musicName =>
|
|
3021
|
-
return _musicName.split(`<br>`).join(` `).split(`<nbr>`).join(``).split(`<dbr>`).join(` `);
|
|
3022
|
-
};
|
|
3020
|
+
const getMusicNameSimple = _musicName => replaceStr(_musicName, g_escapeStr.musicNameSimple);
|
|
3023
3021
|
|
|
3024
3022
|
/**
|
|
3025
3023
|
* 曲名(複数行)の取得
|
|
3026
3024
|
* @param {string} _musicName
|
|
3027
3025
|
*/
|
|
3028
3026
|
const getMusicNameMultiLine = _musicName => {
|
|
3029
|
-
const tmpName = _musicName.
|
|
3027
|
+
const tmpName = replaceStr(_musicName, g_escapeStr.musicNameMultiLine).split(`<br>`);
|
|
3030
3028
|
return tmpName.length === 1 ? [tmpName[0], ``] : tmpName;
|
|
3031
3029
|
};
|
|
3032
3030
|
|
|
@@ -6722,17 +6720,7 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
6722
6720
|
}
|
|
6723
6721
|
|
|
6724
6722
|
// 矢印名からフリーズアロー名への変換
|
|
6725
|
-
let frzName = g_keyObj[`chara${_keyCtrlPtn}`][j].
|
|
6726
|
-
frzName = frzName.replace(`rightdia`, `frzRdia`);
|
|
6727
|
-
frzName = frzName.replace(`left`, `frzLeft`);
|
|
6728
|
-
frzName = frzName.replace(`down`, `frzDown`);
|
|
6729
|
-
frzName = frzName.replace(`up`, `frzUp`);
|
|
6730
|
-
frzName = frzName.replace(`right`, `frzRight`);
|
|
6731
|
-
frzName = frzName.replace(`space`, `frzSpace`);
|
|
6732
|
-
frzName = frzName.replace(`iyo`, `frzIyo`);
|
|
6733
|
-
frzName = frzName.replace(`gor`, `frzGor`);
|
|
6734
|
-
frzName = frzName.replace(`oni`, `foni`);
|
|
6735
|
-
|
|
6723
|
+
let frzName = replaceStr(g_keyObj[`chara${_keyCtrlPtn}`][j], g_escapeStr.frzName);
|
|
6736
6724
|
if (frzName.indexOf(`frz`) === -1 && frzName.indexOf(`foni`) === -1) {
|
|
6737
6725
|
if ((frzName.startsWith(`s`)) || frzName.startsWith(`t`) ||
|
|
6738
6726
|
(frzName.startsWith(`a`) && !frzName.startsWith(`arrow`))) {
|
|
@@ -8684,22 +8672,10 @@ const MainInit = _ => {
|
|
|
8684
8672
|
* @param _j 矢印の位置
|
|
8685
8673
|
*/
|
|
8686
8674
|
const checkKeyUpFunc = {
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
frzON: (_j) => {
|
|
8693
|
-
return true;
|
|
8694
|
-
},
|
|
8695
|
-
|
|
8696
|
-
dummyFrzOFF: (_j) => {
|
|
8697
|
-
return true;
|
|
8698
|
-
},
|
|
8699
|
-
|
|
8700
|
-
dummyFrzON: (_j) => {
|
|
8701
|
-
return true;
|
|
8702
|
-
},
|
|
8675
|
+
frzOFF: (_j) => g_workObj.keyHitFlg[_j].find(flg => flg),
|
|
8676
|
+
frzON: (_j) => true,
|
|
8677
|
+
dummyFrzOFF: (_j) => true,
|
|
8678
|
+
dummyFrzON: (_j) => true,
|
|
8703
8679
|
};
|
|
8704
8680
|
|
|
8705
8681
|
/**
|
|
@@ -9780,10 +9756,7 @@ const resultInit = _ => {
|
|
|
9780
9756
|
}
|
|
9781
9757
|
|
|
9782
9758
|
const keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`;
|
|
9783
|
-
|
|
9784
|
-
if (hasVal(g_keyObj[`transKey${keyCtrlPtn}`])) {
|
|
9785
|
-
transKeyData = `(` + g_keyObj[`transKey${keyCtrlPtn}`] + `)`;
|
|
9786
|
-
}
|
|
9759
|
+
const transKeyData = hasVal(g_keyObj[`transKey${keyCtrlPtn}`]) ? `(` + g_keyObj[`transKey${keyCtrlPtn}`] + `)` : ``;
|
|
9787
9760
|
|
|
9788
9761
|
/**
|
|
9789
9762
|
* プレイスタイルのカスタム有無
|
|
@@ -10027,18 +10000,19 @@ const resultInit = _ => {
|
|
|
10027
10000
|
tweetMaxCombo += `-${g_resultObj.fmaxCombo}`;
|
|
10028
10001
|
}
|
|
10029
10002
|
|
|
10030
|
-
let tweetResultTmp = g_headerObj.resultFormat
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10003
|
+
let tweetResultTmp = replaceStr(g_headerObj.resultFormat, [
|
|
10004
|
+
[`[hashTag]`, hashTag],
|
|
10005
|
+
[`[musicTitle]`, musicTitle],
|
|
10006
|
+
[`[keyLabel]`, tweetDifData],
|
|
10007
|
+
[`[maker]`, g_headerObj.tuning],
|
|
10008
|
+
[`[rank]`, rankMark],
|
|
10009
|
+
[`[score]`, g_resultObj.score],
|
|
10010
|
+
[`[playStyle]`, playStyleData],
|
|
10011
|
+
[`[arrowJdg]`, `${g_resultObj.ii}-${g_resultObj.shakin}-${g_resultObj.matari}-${g_resultObj.shobon}-${g_resultObj.uwan}`],
|
|
10012
|
+
[`[frzJdg]`, tweetFrzJdg],
|
|
10013
|
+
[`[maxCombo]`, tweetMaxCombo],
|
|
10014
|
+
[`[url]`, g_isLocal ? `` : `${twiturl.toString()}`.replace(/[\t\n]/g, ``)]
|
|
10015
|
+
]);
|
|
10042
10016
|
if (g_presetObj.resultVals !== undefined) {
|
|
10043
10017
|
Object.keys(g_presetObj.resultVals).forEach(key => {
|
|
10044
10018
|
tweetResultTmp = tweetResultTmp.split(`[${key}]`).join(g_resultObj[g_presetObj.resultVals[key]]);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2022/
|
|
8
|
+
* Revised : 2022/03/12 (v26.7.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -2393,6 +2393,10 @@ const g_dfColorLightObj = {
|
|
|
2393
2393
|
],
|
|
2394
2394
|
};
|
|
2395
2395
|
|
|
2396
|
+
/**
|
|
2397
|
+
* 特殊文字列の置き換えリスト
|
|
2398
|
+
* (置き換え元、置き換え先の組で二次元配列として定義。主にreplaceStr関数で使用)
|
|
2399
|
+
*/
|
|
2396
2400
|
const g_escapeStr = {
|
|
2397
2401
|
escape: [[`&`, `&`], [`<`, `<`], [`>`, `>`], [`"`, `"`]],
|
|
2398
2402
|
escapeTag: [
|
|
@@ -2407,6 +2411,17 @@ const g_escapeStr = {
|
|
|
2407
2411
|
escapeCode: [
|
|
2408
2412
|
[`<script>`, ``], [`</script>`, ``],
|
|
2409
2413
|
],
|
|
2414
|
+
musicNameSimple: [
|
|
2415
|
+
[`<br>`, ` `], [`<nbr>`, ``], [`<dbr>`, ` `],
|
|
2416
|
+
],
|
|
2417
|
+
musicNameMultiLine: [
|
|
2418
|
+
[`<nbr>`, `<br>`], [`<dbr>`, `<br>`],
|
|
2419
|
+
],
|
|
2420
|
+
frzName: [
|
|
2421
|
+
[`leftdia`, `frzLdia`], [`rightdia`, `frzRdia`],
|
|
2422
|
+
[`left`, `frzLeft`], [`down`, `frzDown`], [`up`, `frzUp`], [`right`, `frzRight`],
|
|
2423
|
+
[`space`, `frzSpace`], [`iyo`, `frzIyo`], [`gor`, `frzGor`], [`oni`, `foni`],
|
|
2424
|
+
],
|
|
2410
2425
|
};
|
|
2411
2426
|
|
|
2412
2427
|
/**
|