整 理 代 码
(应该没有改到字符串里面的东西吧…)起码不直接影响运行
This commit is contained in:
@@ -13,15 +13,15 @@ function THEME.calculate(Y,M,D)
|
||||
--Festival calculate within one statement
|
||||
return
|
||||
--Christmas
|
||||
M=='12'and math.abs(D-25)<4 and
|
||||
'xmas'or
|
||||
M=='12' and math.abs(D-25)<4 and
|
||||
'xmas' or
|
||||
|
||||
--Birthday
|
||||
M=='06'and D=='06'and
|
||||
'birth'or
|
||||
M=='06' and D=='06' and
|
||||
'birth' or
|
||||
|
||||
--Spring festival
|
||||
M<'03'and math.abs((({
|
||||
M<'03' and math.abs((({
|
||||
--Festival days. Jan 26=26, Feb 1=32, etc.
|
||||
24,43,32,22,40,29,49,38,26,45,
|
||||
34,23,41,31,50,39,28,47,36,25,
|
||||
@@ -30,63 +30,63 @@ function THEME.calculate(Y,M,D)
|
||||
32,22,41,30,48,37,26,45,33,23,
|
||||
42,32,50,39,28,46,35,24,43,33,
|
||||
21,40,
|
||||
})[Y-2000]or -26)-((M-1)*31+D))<6 and
|
||||
'sprfes'or
|
||||
})[Y-2000] or -26)-((M-1)*31+D))<6 and
|
||||
'sprfes' or
|
||||
|
||||
--April fool's day
|
||||
M=='04'and D=='01'and
|
||||
'fool'or
|
||||
M=='04' and D=='01' and
|
||||
'fool' or
|
||||
|
||||
--Z day
|
||||
D=='26'and(
|
||||
(M=='03'or M=='04'or M=='05'or M=='06')and'zday1'or
|
||||
(M=='07'or M=='08'or M=='09'or M=='10')and'zday2'or
|
||||
(M=='11'or M=='12'or M=='01'or M=='02')and'zday3'
|
||||
)or
|
||||
D=='26' and (
|
||||
(M=='03' or M=='04' or M=='05' or M=='06') and 'zday1' or
|
||||
(M=='07' or M=='08' or M=='09' or M=='10') and 'zday2' or
|
||||
(M=='11' or M=='12' or M=='01' or M=='02') and 'zday3'
|
||||
) or
|
||||
|
||||
--Normal
|
||||
(
|
||||
(M=='02'or M=='03'or M=='04')and'season1'or
|
||||
(M=='05'or M=='06'or M=='07')and'season2'or
|
||||
(M=='08'or M=='09'or M=='10')and'season3'or
|
||||
(M=='11'or M=='12'or M=='01')and'season4'
|
||||
(M=='02' or M=='03' or M=='04') and 'season1' or
|
||||
(M=='05' or M=='06' or M=='07') and 'season2' or
|
||||
(M=='08' or M=='09' or M=='10') and 'season3' or
|
||||
(M=='11' or M=='12' or M=='01') and 'season4'
|
||||
)
|
||||
end
|
||||
|
||||
function THEME.set(theme)
|
||||
if theme=='xmas'then
|
||||
if theme=='xmas' then
|
||||
BG.setDefault('snow')
|
||||
BGM.setDefault('xmas')
|
||||
MES.new('info',"==Merry Christmas==")
|
||||
elseif theme=='birth'then
|
||||
elseif theme=='birth' then
|
||||
BG.setDefault('firework')
|
||||
BGM.setDefault('magicblock')
|
||||
elseif theme=='sprfes'then
|
||||
elseif theme=='sprfes' then
|
||||
BG.setDefault('firework')
|
||||
BGM.setDefault('spring festival')
|
||||
MES.new('info',"★☆新年快乐☆★")
|
||||
elseif theme=='zday1'then
|
||||
elseif theme=='zday1' then
|
||||
BG.setDefault('lanterns')
|
||||
BGM.setDefault('overzero')
|
||||
elseif theme=='zday2'then
|
||||
elseif theme=='zday2' then
|
||||
BG.setDefault('lanterns')
|
||||
BGM.setDefault('jazz nihilism')
|
||||
elseif theme=='zday3'then
|
||||
elseif theme=='zday3' then
|
||||
BG.setDefault('lanterns')
|
||||
BGM.setDefault('empty')
|
||||
elseif theme=='season1'then
|
||||
elseif theme=='season1' then
|
||||
BG.setDefault('space')
|
||||
BGM.setDefault('null')
|
||||
elseif theme=='season2'then
|
||||
elseif theme=='season2' then
|
||||
BG.setDefault('space')
|
||||
BGM.setDefault('nil')
|
||||
elseif theme=='season3'then
|
||||
elseif theme=='season3' then
|
||||
BG.setDefault('space')
|
||||
BGM.setDefault('vacuum')
|
||||
elseif theme=='season4'then
|
||||
elseif theme=='season4' then
|
||||
BG.setDefault('space')
|
||||
BGM.setDefault('space')
|
||||
elseif theme=='fool'then
|
||||
elseif theme=='fool' then
|
||||
BG.setDefault('blockrain')
|
||||
BGM.setDefault('how feeling')
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user