This commit is contained in:
bgArray
2022-02-01 21:35:46 +08:00
parent 9d4a75cd41
commit 55eeddb108
37 changed files with 492 additions and 542 deletions

View File

@ -92,7 +92,6 @@ def funSplit(bigFile, maxCmdLen: int = 10000):
return parts
# 注意播放器应该为个人独立播放器此处bug需要修改
def makeFuncFiles(musicset, path='./'):
"""在指定目录下生成函数文件"""
from nmcsup.trans import Note2Cmd
@ -139,6 +138,20 @@ def makeFuncFiles(musicset, path='./'):
log("完成============================")
def makeFunDir(musicset, path='./'):
"""在指定目录下生成函数包文件夹"""
import os
@ -299,7 +312,6 @@ def makeClassFuncFiles(musicset, path='./'):
encoding='UTF-8') as f:
f.writelines(classList_conversion_SinglePlayer(musicset['musics'][i]['notes'],
musicset['musics'][i]['set']['ScoreboardName'],
musicset['musics'][i]['set']['Instrument'],
musicset['mainset']['PlayerSelect'],
True))
if musicset['mainset']['IsRepeat']:

View File

@ -1,18 +1,18 @@
# -*- coding:utf-8 -*-
settings = {
'language' : 'zh-CN',
'theme' : {
'' : '',
},
}
class msctSetting:
def __init__(self,**settings) -> None:
pass
def __call__(self, **kwds):
# -*- coding:utf-8 -*-
settings = {
'language' : 'zh-CN',
'theme' : {
'' : '',
},
}
class msctSetting:
def __init__(self,**settings) -> None:
pass
def __call__(self, **kwds):
pass

View File

@ -25,10 +25,11 @@ def hans2pinyin(hans, style=3):
return final
def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, Instrument: str, playerSelection: str = '',
def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, playerSelection: str = '',
isProsess: bool = False) -> list:
from bgArrayLib.compute import round_up
from bgArrayLib.pitchStrConstant import pitch
from bgArrayLib.instrumentConstant import instrument_list
commands = []
length = len(List)
j = 1
@ -38,20 +39,18 @@ def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, Instrumen
print(i)
print(type(i))
try:
if i.instrument > 119:
pass
else:
commands.append(
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~{127 - i.velocity} "
f"~ playsound note.{instrument_list.get(str(i.instrument))} @s ~ ~ ~ "
f"1000 {pitch.get(str(i.pitch))} 1000\n")
if isProsess:
commands.append(
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~{127 - i.velocity} "
f"~ playsound {Instrument} @s ~ ~ ~ 1000 {pitch.get(str(i.pitch))} 1000\n")
if isProsess:
commands.append(
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~ ~ "
f"title @s actionbar §e▶ 播放中: §a{j}/{length} || {int(j / length * 1000) / 10}\n")
j += 1
except:
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~ ~ "
f"title @s actionbar §e▶ 播放中: §a{j}/{length} || {int(j / length * 1000) / 10}\n")
j += 1
except Exception:
pass
# a += List[i][1]
# commands.append("\n\n# 凌云我的世界开发团队 x 凌云软件开发团队 : W-YI金羿\n")