小程序cmd添加playbgm命令
This commit is contained in:
@@ -209,6 +209,14 @@ do--commands.help(arg)
|
|||||||
"Usage: play [mode_name]",
|
"Usage: play [mode_name]",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
playbgm={
|
||||||
|
description="Play a BGM.",
|
||||||
|
details={
|
||||||
|
"Play a BGM.",
|
||||||
|
"",
|
||||||
|
"Usage: playbgm [bgmName]"
|
||||||
|
},
|
||||||
|
},
|
||||||
theme={
|
theme={
|
||||||
description="Load a theme.",
|
description="Load a theme.",
|
||||||
details={
|
details={
|
||||||
@@ -235,6 +243,7 @@ do--commands.help(arg)
|
|||||||
"rmwtm",
|
"rmwtm",
|
||||||
"unlockall",
|
"unlockall",
|
||||||
"play",
|
"play",
|
||||||
|
"playbgm",
|
||||||
"theme",
|
"theme",
|
||||||
}
|
}
|
||||||
local pageSize=10
|
local pageSize=10
|
||||||
@@ -347,12 +356,27 @@ end
|
|||||||
function commands.play(m)--marathon_bfmax can only entered through here
|
function commands.play(m)--marathon_bfmax can only entered through here
|
||||||
if MODES[m]then
|
if MODES[m]then
|
||||||
loadGame(m)
|
loadGame(m)
|
||||||
elseif m then
|
elseif m~=""then
|
||||||
log("No mode called "..m)
|
log("No mode called "..m)
|
||||||
else
|
else
|
||||||
log{COLOR.water,"Usage: play [modeName]"}
|
log{COLOR.water,"Usage: play [modeName]"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function commands.playbgm(bgm)
|
||||||
|
if bgm~=""then
|
||||||
|
if bgm~=BGM.nowPlay then
|
||||||
|
local t=BGM.nowPlay
|
||||||
|
BGM.play(bgm)
|
||||||
|
if t==BGM.nowPlay then
|
||||||
|
log("No BGM called "..bgm)
|
||||||
|
else
|
||||||
|
log("Now playing: "..bgm)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
log{COLOR.water,"Usage: playbgm [bgmName]"}
|
||||||
|
end
|
||||||
|
end
|
||||||
function commands.theme(name)
|
function commands.theme(name)
|
||||||
if name=="classic"then
|
if name=="classic"then
|
||||||
THEME=false
|
THEME=false
|
||||||
|
|||||||
Reference in New Issue
Block a user