From 8d54f898eeec558a7d73cdfba6a8b9c201fe9abf Mon Sep 17 00:00:00 2001 From: feightwywx Date: Sun, 11 Feb 2024 11:59:11 +0800 Subject: [PATCH] =?UTF-8?q?Update=200.11.1=20Fix:=206k=E8=B0=B1=E9=9D=A2?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 2 +- src/arcfutil/aff/note/scenecontrol.py | 15 ++++++++------- src/arcfutil/aff/parser.py | 4 +--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index dfcadf8..f7fe37d 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name="arcfutil", - version="0.11.0", + version="0.11.1", author=".direwolf", author_email="kururinmiracle@outlook.com", description="A Python module designed for processing Arcaea related files(.aff chart, songlist, etc.)", diff --git a/src/arcfutil/aff/note/scenecontrol.py b/src/arcfutil/aff/note/scenecontrol.py index 3c97bca..7d69b7a 100644 --- a/src/arcfutil/aff/note/scenecontrol.py +++ b/src/arcfutil/aff/note/scenecontrol.py @@ -19,16 +19,17 @@ def __init__(self, time: int, scenetype: str, x: float = 0, y: int = 0): def __str__(self): if self.scenetype in ['trackshow', 'trackhide']: return 'scenecontrol({0},{1});'.format(self.time, self.scenetype) - elif self.scenetype in ['redline', 'arcahvdistort', 'arcahvdebris', 'hidegroup']: + else: return 'scenecontrol({0},{1},{2:.2f},{3});'.format( int(self.time), self.scenetype, self.x, int(self.y)) - else: - raise AffSceneTypeError('{0} is not a valid scene type'.format(self.scenetype)) + # else: + # raise AffSceneTypeError('{0} is not a valid scene type'.format(self.scenetype)) def __setattr__(self, key, value): super(SceneControl, self).__setattr__(key, value) if key == 'scenetype': - if value not in validstrings.scenetypelist: - raise AffNoteValueError('invalid value {} for attribute "scenetype" (only accept {})'.format( - value, str(validstrings.scenetypelist) - )) + pass + # if value not in validstrings.scenetypelist: + # raise AffNoteValueError('invalid value {} for attribute "scenetype" (only accept {})'.format( + # value, str(validstrings.scenetypelist) + # )) diff --git a/src/arcfutil/aff/parser.py b/src/arcfutil/aff/parser.py index 863662a..723fd70 100644 --- a/src/arcfutil/aff/parser.py +++ b/src/arcfutil/aff/parser.py @@ -118,15 +118,13 @@ def loadline(notestr: str): time=int(paralist[0]), scenetype=scenetype ) - elif scenetype in ['redline', 'arcahvdistort', 'arcahvdebris', 'hidegroup']: + else: return note.SceneControl( time=int(paralist[0]), scenetype=scenetype, x=float(paralist[2]), y=int(paralist[3]) ) - else: - raise AffSceneTypeError elif keyword == 'flick': return note.Flick( time=int(paralist[0]),