新增文档,修复小bug,更新版本

This commit is contained in:
2023-01-05 17:30:36 +08:00
parent be40f8f920
commit d64540bfd0
5 changed files with 105 additions and 24 deletions

View File

@ -7,7 +7,7 @@
# 若需转载或借鉴 许可声明请查看仓库目录下的 Lisence.md
__version__ = '0.1.0'
__version__ = '0.1.3'
__all__ = []
__author__ = (('金羿', 'Eilles Wan'), ('诸葛亮与八卦阵', 'bgArray'), ('鸣凤鸽子', 'MingFengPigeon'))

4
msctPkgver/bdxRead.py Normal file
View File

@ -0,0 +1,4 @@
import brotli
input(brotli.decompress(open(input("BDX文件"),'rb').read()[3:]))

View File

@ -1327,13 +1327,13 @@ class midiConvert:
commands += track
if isAutoReset:
commands += (
commands.append(
"scoreboard players reset @a[scores={"
+ scoreboardname
+ "="
+ str(maxScore + 20)
+ "}] "
+ scoreboardname
+ scoreboardname,
)
# 此处是对于仅有 True 的参数和自定义参数的判断
@ -1351,7 +1351,7 @@ class midiConvert:
(1 if yforward else 0)
if (
((nowy != 0) and (not yforward))
or ((yforward) and (nowy != maxheight))
or ((yforward) and (nowy != (maxheight - 1)))
)
else (3 if zforward else 2)
if (
@ -1370,7 +1370,7 @@ class midiConvert:
nowy += 1 if yforward else -1
if ((nowy > maxheight) and (yforward)) or ((nowy < 0) and (not yforward)):
if ((nowy >= maxheight) and (yforward)) or ((nowy < 0) and (not yforward)):
nowy -= 1 if yforward else -1
yforward = not yforward
@ -1398,7 +1398,7 @@ class midiConvert:
) as f:
f.write(brotli.compress(_bytes + b"XE"))
return (True, totalcount, maxScore, _bytes, (nowx, maxheight, _sideLength))
return (True, totalcount, maxScore, (nowx, maxheight, _sideLength))
def toBDXfile_withDelay(
self,
@ -1469,7 +1469,7 @@ class midiConvert:
(1 if yforward else 0)
if (
((nowy != 0) and (not yforward))
or ((yforward) and (nowy != maxheight))
or ((yforward) and (nowy != (maxheight - 1)))
)
else (3 if zforward else 2)
if (
@ -1488,7 +1488,7 @@ class midiConvert:
nowy += 1 if yforward else -1
if ((nowy > maxheight) and (yforward)) or ((nowy < 0) and (not yforward)):
if ((nowy >= maxheight) and (yforward)) or ((nowy < 0) and (not yforward)):
nowy -= 1 if yforward else -1
yforward = not yforward