update msctPkgver/main.py.

Signed-off-by: bgArray <474037765@qq.com>
This commit is contained in:
bgArray 2022-12-29 11:52:10 +00:00 committed by Gitee
parent b04c01772f
commit bde2b4e378
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -523,23 +523,23 @@ class midiConvert:
# /playsound <sound: string> [player: target] [position: x y z] # /playsound <sound: string> [player: target] [position: x y z]
# [volume: float] [pitch: float] [minimumVolume: float] # [volume: float] [pitch: float] [minimumVolume: float]
volume_d = 1 / volume - 1 # volume_d = 1 / volume - 1
if volume_d == 0.0: # if volume_d == 0.0:
volume_d = "" # volume_d = ""
command_now = "playsound {0} @a[scores={{{1}}}] ~ ~{2} ~ {3} {4}" \ # command_now = "playsound {0} @a[scores={{{1}}}] ~ ~{2} ~ {3} {4}" \
.format(soundID, "{}={}".format(scoreboardname, # .format(soundID, "{}={}".format(scoreboardname,
nowscore), volume_d, # nowscore), volume_d,
msg.velocity, 2 ** ((msg.note - 60 - _X) / 12)) # msg.velocity, 2 ** ((msg.note - 60 - _X) / 12))
singleTrack.append(command_now) # singleTrack.append(command_now)
# singleTrack.append( singleTrack.append(
# "execute @a[scores={" "execute @a[scores={"
# + str(scoreboardname) + str(scoreboardname)
# + "=" + "="
# + str(nowscore) + str(nowscore)
# + "}" + "}"
# + f"] ~ ~ ~ playsound {soundID} @s ~ ~{1 / volume - 1} ~ " + f"] ~ ~ ~ playsound {soundID} @s ~ ~{1 / volume - 1} ~ "
# f"{msg.velocity * (0.7 if msg.channel == 0 else 0.9)} {2 ** ((msg.note - 60 - _X) / 12)}" f"{msg.velocity * (0.7 if msg.channel == 0 else 0.9)} {2 ** ((msg.note - 60 - _X) / 12)}"
# ) )
commands += 1 commands += 1
if len(singleTrack) != 0: if len(singleTrack) != 0:
tracks.append(singleTrack) tracks.append(singleTrack)