春节主题+背景+音乐

This commit is contained in:
MrZ626
2021-01-04 21:01:33 +08:00
parent fd7574e7fd
commit 861f6f7127
5 changed files with 128 additions and 3 deletions

View File

@@ -26,7 +26,16 @@ LOGIN=false
EDITING=""
WSCONN=false
FESTIVAL=
os.date"%m"=="12"and math.abs(os.date"%d"-25)<4 and"Xmas"
os.date"%m"=="12"and math.abs(os.date"%d"-25)<4 and"Xmas"or
os.date"%m"<"03"and math.abs(({--Spring festival dates, 1.2=2, 2.1=32, etc.
24,43,32,22,40,29,49,38,26,45,
34,23,41,31,50,39,28,47,36,25,
43,32,22,41,29,48,37,26,44,34,
23,42,31,50,39,28,46,35,24,43,
32,22,41,30,48,37,26,45,33,23,
42,32,50,39,28,46,35,24,43,33,
21,40,
})[0+os.date"%y"]-((os.date"%m"=="01"and 0 or 31)+os.date"%d"))<8 and"sprFes"
math.randomseed(os.time()*626)
love.keyboard.setKeyRepeat(true)
@@ -356,5 +365,13 @@ do
end
end
BG.setDefault(FESTIVAL=="Xmas"and"snow"or"space")
BGM.setDefault(FESTIVAL=="Xmas"and"mXmas"or"blank")
if FESTIVAL=="Xmas"then
BG.setDefault("snow")
BGM.setDefault("mXmas")
elseif FESTIVAL=="sprFes"then
BG.setDefault("firework")
BGM.setDefault("spring festival")
else
BG.setDefault("space")
BGM.setDefault("blank")
end