diff --git a/Musicreater.py b/Musicreater.py index b9fd8f1..b892c02 100644 --- a/Musicreater.py +++ b/Musicreater.py @@ -186,7 +186,7 @@ def __main__(): print('音·创 正在启动……') print('载入日志功能...') - from nmcsup.log import log + from msctLib.log import log from nmcsup.log import end print('完成!') @@ -1299,7 +1299,6 @@ def __main__(): initialfile=dataset[0]['mainset']['PackName'] + '.bdx') maxHeight = 200 - print(maxHeight) # 使用变量 while True: maxHeight = tkinter.simpledialog.askinteger(title=READABLETEXT[28], @@ -1320,7 +1319,7 @@ def __main__(): log('获得文件名:' + fileName) - res = music2BDX(fileName, dire, dataset[0], ) + res = music2BDX(fileName, dire, dataset[0], height = maxHeight ) log('转换结束!\n' + str(res)) tkinter.messagebox.showinfo(READABLETEXT[33], READABLETEXT[124].format(str(res))) diff --git a/bgArrayLib/__pycache__/bpm.cpython-38.pyc b/bgArrayLib/__pycache__/bpm.cpython-38.pyc index 672e09b..a0ea2eb 100644 Binary files a/bgArrayLib/__pycache__/bpm.cpython-38.pyc and b/bgArrayLib/__pycache__/bpm.cpython-38.pyc differ diff --git a/msctLib/__pycache__/log.cpython-38.pyc b/msctLib/__pycache__/log.cpython-38.pyc index 253559d..341344e 100644 Binary files a/msctLib/__pycache__/log.cpython-38.pyc and b/msctLib/__pycache__/log.cpython-38.pyc differ diff --git a/msctLib/log.py b/msctLib/log.py index 3252339..3352f13 100644 --- a/msctLib/log.py +++ b/msctLib/log.py @@ -48,7 +48,7 @@ StrStartTime = str(datetime.datetime.now()).replace(':', '_')[:-7] '''字符串型的程序开始时间''' -def log(info:str = '',level : str = 'INFO', isPrinted:bool = False): +def log(info:str = '',level : str = 'INFO', isPrinted:bool = True): '''将信息连同当前时间载入日志 :param info : str 日志信息 @@ -66,12 +66,12 @@ def log(info:str = '',level : str = 'INFO', isPrinted:bool = False): try: - if not os.path.exists('./log/'): - os.makedirs('./log/') + if not os.path.exists('./logs/'): + os.makedirs('./logs/') outputinfo = f'{str(datetime.datetime.now())[11:19]}-[{level}] {info}' - with open('./log/'+StrStartTime+'.msct.log', 'a',encoding='UTF-8') as f: + with open('./logs/'+StrStartTime+'.msct.log', 'a',encoding='UTF-8') as f: f.write(outputinfo+'\n') if isPrinted: diff --git a/msctspt/__pycache__/transfer.cpython-38.pyc b/msctspt/__pycache__/transfer.cpython-38.pyc index 2e10188..284e02d 100644 Binary files a/msctspt/__pycache__/transfer.cpython-38.pyc and b/msctspt/__pycache__/transfer.cpython-38.pyc differ diff --git a/msctspt/transfer.py b/msctspt/transfer.py index 8c4d4e5..28df32c 100644 --- a/msctspt/transfer.py +++ b/msctspt/transfer.py @@ -12,7 +12,7 @@ import amulet from amulet.api.block import Block from amulet.utils.world_utils import block_coords_to_chunk_coords as bc2cc from amulet_nbt import TAG_String as ts -from nmcsup.log import log +from msctLib.log import log def hans2pinyin(hans, style=3): @@ -33,11 +33,8 @@ def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, playerSel commands = [] length = len(List) j = 1 - print(List) for k in range(len(List)): i = List[k][0] - print(i) - print(type(i)) try: commands.append( f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}=" @@ -54,7 +51,6 @@ def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, playerSel pass # a += List[i][1] # commands.append("\n\n# 凌云我的世界开发团队 x 凌云软件开发团队 : W-YI(金羿)\n") - print(commands) return commands @@ -268,6 +264,7 @@ def music2cmdBlocks(direction: Iterable, music: dict, isProsess: bool = False, h :return 返回一个列表,其中包含了音乐生成的所有的指令方块数据""" from msctspt.threadOpera import NewThread + allblocks = [] '''需要放置的方块''' baseDire = direction @@ -279,9 +276,9 @@ def music2cmdBlocks(direction: Iterable, music: dict, isProsess: bool = False, h cmdList = classList_conversion_SinglePlayer(track['notes'], track['set']['ScoreboardName'], music['mainset']['PlayerSelect'], isProsess) if len(cmdList) == 0: - return + return [] elif cmdList is []: - return + return [] dire = direction down = False '''当前是否为向下的阶段?''' @@ -317,7 +314,7 @@ def music2cmdBlocks(direction: Iterable, music: dict, isProsess: bool = False, h threads = [] for track in music['musics']: threads.append(NewThread(trackDealing,(direction,track))) - threads[threads.__len__()-1].start() + threads[-1].start() direction[2] += 2 for th in threads: