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