From 5509c7c16ef6111f9b2ea78b15ebce04f79a5935 Mon Sep 17 00:00:00 2001 From: 5UP3RB Date: Thu, 25 Jul 2024 00:37:42 +0700 Subject: [PATCH] fixed chuni.py error when importing c2s with no JUDGE count --- scripts/asset-extract chuni.bat | 3 +++ scripts/db-import chuni.bat | 3 +++ scripts/importers/chuni.py | 7 +++++-- start.bat | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 scripts/asset-extract chuni.bat create mode 100644 scripts/db-import chuni.bat create mode 100644 start.bat diff --git a/scripts/asset-extract chuni.bat b/scripts/asset-extract chuni.bat new file mode 100644 index 0000000..8a20950 --- /dev/null +++ b/scripts/asset-extract chuni.bat @@ -0,0 +1,3 @@ +python asset-extract.py chuni --data-dir "D:\Programs\Sega\Games\CHUNITHM LUMINOUS (SDHD 2.22.00)\data" --opt-dir "D:\Programs\Sega\Games\CHUNITHM LUMINOUS (SDHD 2.22.00)\bin\option" + +pause \ No newline at end of file diff --git a/scripts/db-import chuni.bat b/scripts/db-import chuni.bat new file mode 100644 index 0000000..49775f9 --- /dev/null +++ b/scripts/db-import chuni.bat @@ -0,0 +1,3 @@ +python db-import.py chuni --data-dir "D:\Programs\Sega\Games\CHUNITHM LUMINOUS (SDHD 2.22.00)\data" --opt-dir "D:\Programs\Sega\Games\CHUNITHM LUMINOUS (SDHD 2.22.00)\bin\option" + +pause \ No newline at end of file diff --git a/scripts/importers/chuni.py b/scripts/importers/chuni.py index b77d559..f2b9115 100644 --- a/scripts/importers/chuni.py +++ b/scripts/importers/chuni.py @@ -87,10 +87,13 @@ class Chuni(Importer): if creator is None or judgeTap is None or judgeHold is None or judgeSlide is None or judgeAir is None or judgeFlick is None or judgeAll is None: print('warning: chart file missing data') - inserts.append((song, chart, creator or '', judgeTap or 0, judgeHold or 0, judgeSlide or 0, - judgeAir or 0, judgeFlick or 0, judgeAll or 0)) + inserts.append((song, chart, creator or '', judgeTap or '0', judgeHold or '0', judgeSlide or '0', + judgeAir or '0', judgeFlick or '0', judgeAll or '0')) fields = ['songId', 'chartId', 'chartDesigner', 'tapJudgeCount', 'holdJudgeCount', 'slideJudgeCount', 'airJudgeCount', 'flickJudgeCount', 'allJudgeCount'] + #DEBUG + print(inserts) + self.cur.executemany( f'''INSERT INTO actaeon_chuni_static_music_ext({','.join(fields)}) VALUES ({','.join(['%s'] * len(fields))}) diff --git a/start.bat b/start.bat new file mode 100644 index 0000000..a01add9 --- /dev/null +++ b/start.bat @@ -0,0 +1 @@ +npm run start \ No newline at end of file