danoniplus 34.0.0 → 34.1.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.
Files changed (2) hide show
  1. package/js/danoni_main.js +20 -5
  2. 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/09/24
7
+ * Revised : 2023/09/27
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 34.0.0`;
12
- const g_revisedDate = `2023/09/24`;
11
+ const g_version = `Ver 34.1.0`;
12
+ const g_revisedDate = `2023/09/27`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -368,6 +368,13 @@ const splitLF = _str => _str?.split(`\r`).join(`\n`).split(`\n`);
368
368
  */
369
369
  const splitLF2 = (_str, _delim = `$`) => splitLF(_str)?.filter(val => val !== ``).join(_delim).split(_delim);
370
370
 
371
+ /**
372
+ * カンマ区切り処理
373
+ * (ただし、カンマ+半角スペースの組の場合は区切り文字と見做さない)
374
+ * @param {string} _str
375
+ */
376
+ const splitComma = _str => _str?.split(`, `).join(`*comma* `).split(`,`);
377
+
371
378
  /**
372
379
  * 重複を排除した配列の生成
373
380
  * @param {array} _array1
@@ -2743,7 +2750,7 @@ const headerConvert = _dosObj => {
2743
2750
  }
2744
2751
 
2745
2752
  for (let j = 0; j < musicData.length; j++) {
2746
- const musics = musicData[j].split(`,`);
2753
+ const musics = splitComma(musicData[j]);
2747
2754
 
2748
2755
  if (obj.musicNos.length >= j) {
2749
2756
  obj.musicTitles[j] = escapeHtml(getMusicNameSimple(musics[0]));
@@ -2751,7 +2758,7 @@ const headerConvert = _dosObj => {
2751
2758
  obj.artistNames[j] = escapeHtml(musics[1] ?? ``);
2752
2759
  }
2753
2760
  }
2754
- const musics = musicData[0].split(`,`);
2761
+ const musics = splitComma(musicData[0]);
2755
2762
  obj.musicTitle = obj.musicTitles[0];
2756
2763
  obj.musicTitleForView = obj.musicTitlesForView[0];
2757
2764
  obj.artistName = obj.artistNames[0] ?? ``;
@@ -7623,6 +7630,14 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
7623
7630
  wordMaxDepth = tmpWordData[k + 1];
7624
7631
  }
7625
7632
 
7633
+ // 同一行数で数字が取得できるまでは歌詞表示と見做して結合
7634
+ let m = 3;
7635
+ while (hasVal(tmpWordData[m]) && isNaN(parseInt(tmpWordData[m])) && m < tmpWordData.length) {
7636
+ tmpWordData[k + 2] += `,${tmpWordData[k + m]}`;
7637
+ tmpWordData.splice(k + m, 1);
7638
+ }
7639
+
7640
+ // 歌詞表示データの格納
7626
7641
  let dataCnts = 0;
7627
7642
  [wordData[tmpWordData[k]], dataCnts] =
7628
7643
  checkDuplicatedObjects(wordData[tmpWordData[k]]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "34.0.0",
3
+ "version": "34.1.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {