Skip to content

Commit

Permalink
Update 0.11.1
Browse files Browse the repository at this point in the history
Fix: 6k谱面读取问题
  • Loading branch information
feightwywx committed Feb 11, 2024
1 parent a701765 commit 8d54f89
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setuptools.setup(
name="arcfutil",
version="0.11.0",
version="0.11.1",
author=".direwolf",
author_email="[email protected]",
description="A Python module designed for processing Arcaea related files(.aff chart, songlist, etc.)",
Expand Down
15 changes: 8 additions & 7 deletions src/arcfutil/aff/note/scenecontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
# ))
4 changes: 1 addition & 3 deletions src/arcfutil/aff/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]),
Expand Down

0 comments on commit 8d54f89

Please sign in to comment.