FESTIVAL变量改名THEME
This commit is contained in:
@@ -974,11 +974,11 @@ function WIDGET.set(list)
|
|||||||
for i=1,#list do
|
for i=1,#list do
|
||||||
list[i]:reset()
|
list[i]:reset()
|
||||||
end
|
end
|
||||||
if FESTIVAL and SCN.cur~="custom_field"then
|
if THEME and SCN.cur~="custom_field"then
|
||||||
local c1,c2,c3
|
local c1,c2,c3
|
||||||
if FESTIVAL=="xMas"then
|
if THEME=="xMas"then
|
||||||
c1,c2,c3=COLOR.red,COLOR.white,COLOR.green
|
c1,c2,c3=COLOR.red,COLOR.white,COLOR.green
|
||||||
elseif FESTIVAL=="sprFes"then
|
elseif THEME=="sprFes"then
|
||||||
c1,c2,c3=COLOR.red,COLOR.orange,COLOR.yellow
|
c1,c2,c3=COLOR.red,COLOR.orange,COLOR.yellow
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
|||||||
8
main.lua
8
main.lua
@@ -29,7 +29,7 @@ WSCONN=false
|
|||||||
LATEST_VERSION=false
|
LATEST_VERSION=false
|
||||||
|
|
||||||
--Festival check within one statement
|
--Festival check within one statement
|
||||||
FESTIVAL=(
|
THEME=(
|
||||||
--Christmas
|
--Christmas
|
||||||
os.date"%m"=="12"and math.abs(os.date"%d"-25)<4 and
|
os.date"%m"=="12"and math.abs(os.date"%d"-25)<4 and
|
||||||
"Xmas"or
|
"Xmas"or
|
||||||
@@ -406,13 +406,13 @@ do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if FESTIVAL=="Xmas"then
|
if THEME=="Xmas"then
|
||||||
BG.setDefault("snow")
|
BG.setDefault("snow")
|
||||||
BGM.setDefault("mXmas")
|
BGM.setDefault("mXmas")
|
||||||
elseif FESTIVAL=="sprFes"then
|
elseif THEME=="sprFes"then
|
||||||
BG.setDefault("firework")
|
BG.setDefault("firework")
|
||||||
BGM.setDefault("spring festival")
|
BGM.setDefault("spring festival")
|
||||||
elseif FESTIVAL=="zDay"then
|
elseif THEME=="zDay"then
|
||||||
BG.setDefault("lanterns")
|
BG.setDefault("lanterns")
|
||||||
BGM.setDefault("overzero")
|
BGM.setDefault("overzero")
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -205,14 +205,14 @@ do--commands.help(arg)
|
|||||||
"Usage: play [mode_name]",
|
"Usage: play [mode_name]",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
festival={
|
theme={
|
||||||
description="Load a festival theme.",
|
description="Load a theme.",
|
||||||
details={
|
details={
|
||||||
"Load a festival theme.",
|
"Load a theme.",
|
||||||
"",
|
"",
|
||||||
"Usage: festival [festival_name]",
|
"Usage: theme [theme_name]",
|
||||||
"",
|
"",
|
||||||
"Available festivals:",
|
"Available themes:",
|
||||||
"classic|xmas|sprfes|zday",
|
"classic|xmas|sprfes|zday",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -233,7 +233,7 @@ do--commands.help(arg)
|
|||||||
"rmwtm",
|
"rmwtm",
|
||||||
"unlockall",
|
"unlockall",
|
||||||
"play",
|
"play",
|
||||||
"festival"
|
"theme"
|
||||||
}
|
}
|
||||||
local total_pages=math.ceil(#command_help_list/10)
|
local total_pages=math.ceil(#command_help_list/10)
|
||||||
function commands.help(arg)
|
function commands.help(arg)
|
||||||
@@ -334,32 +334,32 @@ function commands.play(m)--marathon_bfmax can only entered through here
|
|||||||
log{COLOR.water,"Usage: play [modeName]"}
|
log{COLOR.water,"Usage: play [modeName]"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function commands.festival(name)
|
function commands.theme(name)
|
||||||
if name=="classic"then
|
if name=="classic"then
|
||||||
FESTIVAL=false
|
THEME=false
|
||||||
BG.setDefault("space")
|
BG.setDefault("space")
|
||||||
BGM.setDefault("blank")
|
BGM.setDefault("blank")
|
||||||
BGM.play()
|
BGM.play()
|
||||||
elseif name=="xmas"then
|
elseif name=="xmas"then
|
||||||
FESTIVAL="xMas"
|
THEME="xMas"
|
||||||
BG.setDefault("snow")
|
BG.setDefault("snow")
|
||||||
BGM.setDefault("mXmas")
|
BGM.setDefault("mXmas")
|
||||||
BGM.play()
|
BGM.play()
|
||||||
elseif name=="sprfes"then
|
elseif name=="sprfes"then
|
||||||
FESTIVAL="sprFes"
|
THEME="sprFes"
|
||||||
BG.setDefault("firework")
|
BG.setDefault("firework")
|
||||||
BGM.setDefault("spring festival")
|
BGM.setDefault("spring festival")
|
||||||
BGM.play()
|
BGM.play()
|
||||||
elseif name=="zday"then
|
elseif name=="zday"then
|
||||||
FESTIVAL="zDay"
|
THEME="zDay"
|
||||||
BG.setDefault("lanterns")
|
BG.setDefault("lanterns")
|
||||||
BGM.setDefault("overzero")
|
BGM.setDefault("overzero")
|
||||||
BGM.play()
|
BGM.play()
|
||||||
else
|
else
|
||||||
if name~=""then
|
if name~=""then
|
||||||
log("No festival called "..name)
|
log("No theme called "..name)
|
||||||
end
|
end
|
||||||
log{COLOR.water,"Usage: festival [fesitivalName]"}
|
log{COLOR.water,"Usage: theme [themeName]"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -117,11 +117,11 @@ local loadingThread=coroutine.create(function()
|
|||||||
authToken=USER.authToken,
|
authToken=USER.authToken,
|
||||||
})
|
})
|
||||||
]]
|
]]
|
||||||
if FESTIVAL=="Xmas"then
|
if THEME=="Xmas"then
|
||||||
LOG.print("==============",COLOR.red)
|
LOG.print("==============",COLOR.red)
|
||||||
LOG.print("Merry Christmas!",COLOR.white)
|
LOG.print("Merry Christmas!",COLOR.white)
|
||||||
LOG.print("==============",COLOR.red)
|
LOG.print("==============",COLOR.red)
|
||||||
elseif FESTIVAL=="sprFes"then
|
elseif THEME=="sprFes"then
|
||||||
LOG.print(" ★☆☆★",COLOR.red)
|
LOG.print(" ★☆☆★",COLOR.red)
|
||||||
LOG.print("新年快乐!",COLOR.white)
|
LOG.print("新年快乐!",COLOR.white)
|
||||||
LOG.print(" ★☆☆★",COLOR.red)
|
LOG.print(" ★☆☆★",COLOR.red)
|
||||||
|
|||||||
Reference in New Issue
Block a user