diff --git a/Zframework/bg.lua b/Zframework/bg.lua index 3952e442..e8299df4 100644 --- a/Zframework/bg.lua +++ b/Zframework/bg.lua @@ -430,6 +430,10 @@ function BG.set(bg,data) BG.discard() collectgarbage() end + if not back[bg]then + LOG.print("No BG called"..bg,"warn") + return + end BG.cur=bg bg=back[bg] diff --git a/Zframework/bgm.lua b/Zframework/bgm.lua index 4d0d4d2c..58eb5f2d 100644 --- a/Zframework/bgm.lua +++ b/Zframework/bgm.lua @@ -41,7 +41,7 @@ function BGM.loadOne(N) BGM.list[N]:setLooping(true) BGM.list[N]:setVolume(0) else - LOG.print("No BGM file: "..N,color.red) + LOG.print("No BGM file: "..N,"warn") end end function BGM.loadAll() diff --git a/Zframework/log.lua b/Zframework/log.lua index c988459a..31df921d 100644 --- a/Zframework/log.lua +++ b/Zframework/log.lua @@ -43,7 +43,7 @@ function LOG.draw() end end end -function LOG.print(text,T,C)--type/time,color +function LOG.print(text,T,C)--text,type/time,color local time local his if T=="warn"then diff --git a/Zframework/sfx.lua b/Zframework/sfx.lua index 6fedd484..d5820ece 100644 --- a/Zframework/sfx.lua +++ b/Zframework/sfx.lua @@ -30,7 +30,7 @@ function SFX.loadOne(_) if love.filesystem.getInfo(N)then SFX.list[_]={love.audio.newSource(N,"static")} else - LOG.print("No SFX file: "..N,color.red) + LOG.print("No SFX file: "..N,"warn") end end function SFX.loadAll() diff --git a/parts/scenes.lua b/parts/scenes.lua index 6e2e3183..687006ee 100644 --- a/parts/scenes.lua +++ b/parts/scenes.lua @@ -92,7 +92,7 @@ do--calculator elseif S.val==196000+022 then S.pass=true marking=nil - LOG.print("\68\69\86\58\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100","warn",color.lBlue) + LOG.print("\68\69\86\58\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100","message") SFX.play("clear") elseif S.val==72943816 then S.pass=true @@ -102,7 +102,7 @@ do--calculator end end FILE.saveUnlock() - LOG.print("\68\69\86\58\85\78\76\79\67\75\65\76\76","warn",color.lBlue) + LOG.print("\68\69\86\58\85\78\76\79\67\75\65\76\76","message") SFX.play("clear_2") elseif S.val==1379e8+2626e4+1379 then S.pass=true @@ -981,10 +981,10 @@ do--mode if mapCam.sel=="custom_clear"or mapCam.sel=="custom_puzzle"then if customEnv.opponent>1 then if customEnv.seq=="fixed"then - LOG.print(text.ai_fixed,"warn",color.red) + LOG.print(text.ai_fixed,"warn") return elseif #preBag>0 then - LOG.print(text.ai_prebag,"warn",color.red) + LOG.print(text.ai_prebag,"warn") return end end diff --git a/parts/skin.lua b/parts/skin.lua index 97bafa98..85be4745 100644 --- a/parts/skin.lua +++ b/parts/skin.lua @@ -64,7 +64,7 @@ function SKIN.load() I=gc.newImage(N) else I=gc.newImage("/image/skin/"..list[1]..".png") - LOG.print("No skin file: "..list[i],color.red) + LOG.print("No skin file: "..list[i],"warn") end for j=1,11 do SKIN.lib[i][j]=C(30,30)