Skip to content

Commit

Permalink
Opt: 在对NoteGroup进行偏移时,新增的0时间点Timing会出现在NoteGroup开头
Browse files Browse the repository at this point in the history
Opt: 移除了Note和NoteGroup的type()冗余方法
  • Loading branch information
feightwywx committed Jul 28, 2021
1 parent 0d3167a commit 1231835
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="arcfutil",
version="0.5.4",
version="0.5.5",
author=".direwolf",
author_email="[email protected]",
description="A Python module designed for processing Arcaea related files(.aff chart, songlist, etc.)",
Expand Down
6 changes: 0 additions & 6 deletions src/arcfutil/aff/note/common_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ def offsetto(self, value: int):
self.time += value
return self

def type(self):
return type(self).__name__


class NoteGroup(list):
def __init__(self, *notes):
Expand Down Expand Up @@ -69,6 +66,3 @@ def moveto(self, dest: int):
if each is not None:
each.moveto(dest)
return self

def type(self):
return type(self).__name__
4 changes: 2 additions & 2 deletions src/arcfutil/aff/note/notegroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def offsetto(self, value: int):
for each in self:
if each is not None:
each.offsetto(value)
self.append(Timing(0, basebpm, 4))
self.insert(0, Timing(0, basebpm, 4))
return sort(self)


Expand Down Expand Up @@ -64,6 +64,6 @@ def offsetto(self, value: int):
for each in self:
if each is not None:
each.offsetto(value)
self.append(Timing(0, basebpm, 4))
self.insert(0, Timing(0, basebpm, 4))
return sort(self)

0 comments on commit 1231835

Please sign in to comment.