Fix Disable theme and Lock B.G.'s weird behaviors (#1091)

This commit is contained in:
SweetSea
2024-02-22 10:07:41 +07:00
committed by GitHub
parent 7e1a5805b3
commit 1859e5bb96
4 changed files with 10 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ function THEME.calculate(Y,M,D)
)
end
function THEME.set(theme)
function THEME.set(theme,keepBGM)
if type(theme)=='string' and theme:sub(1,6)=='season' then
BG.setDefault(SETTING.defaultBG)
BGM.setDefault(({season1='null',season2='nil',season3='vaccum',season4='space'})[theme])
@@ -99,7 +99,7 @@ function THEME.set(theme)
THEME.cur=theme
BG.set()
BGM.play()
if not keepBGM then BGM.play() end
return true
end