修复BG.set不存在的背景时爆炸

This commit is contained in:
MrZ626
2021-01-06 00:52:44 +08:00
parent 59f0d190cb
commit 223ce05fad

View File

@@ -33,9 +33,8 @@ function BG.setDefault(bg)
BG.default=bg
end
function BG.set(background)
if not background then
background=BG.default
end
if not background then background=BG.default end
if not BGs[background]then LOG.print("No BGM file: "..background,10,COLOR.orange)end
if background==BG.cur or not SETTING.bg then return end
BG.discard()
BG.cur=background