mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 03:30:13 +01:00
Separated gen3 and shinuchi scores into their own DBs
This commit is contained in:
10
PyTaiko.py
10
PyTaiko.py
@@ -15,7 +15,7 @@ from raylib.defines import (
|
||||
)
|
||||
|
||||
from libs.audio import audio
|
||||
from libs.global_data import PlayerNum
|
||||
from libs.global_data import PlayerNum, ScoreMethod
|
||||
from libs.screen import Screen
|
||||
from libs.song_hash import DB_VERSION
|
||||
from libs.tja import TJAParser
|
||||
@@ -45,7 +45,6 @@ from scenes.dan.dan_result import DanResultScreen
|
||||
|
||||
from pypresence.presence import Presence
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
DISCORD_APP_ID = '1451423960401973353'
|
||||
try:
|
||||
@@ -128,7 +127,7 @@ def handle_exception(exc_type, exc_value, exc_traceback):
|
||||
|
||||
def create_song_db():
|
||||
"""Create the scores database if it doesn't exist"""
|
||||
with sqlite3.connect('scores.db') as con:
|
||||
with sqlite3.connect(global_data.score_db) as con:
|
||||
cursor = con.cursor()
|
||||
|
||||
cursor.execute('''
|
||||
@@ -199,6 +198,11 @@ def update_camera_for_window_size(camera, virtual_width, virtual_height):
|
||||
def main():
|
||||
force_dedicated_gpu()
|
||||
global_data.config = get_config()
|
||||
match global_data.config["general"]["score_method"]:
|
||||
case ScoreMethod.GEN3:
|
||||
global_data.score_db = 'scores_gen3.db'
|
||||
case ScoreMethod.SHINUCHI:
|
||||
global_data.score_db = 'scores_shinuchi.db'
|
||||
log_level = global_data.config["general"]["log_level"]
|
||||
if sys.platform == 'win32':
|
||||
import io
|
||||
|
||||
Reference in New Issue
Block a user