暂时注释掉bgm和voice模块缺失文件时弹出消息的代码 close #288

This commit is contained in:
MrZ626
2021-09-10 17:38:22 +08:00
parent e9cd7ef5ca
commit 2ec91f58ae
2 changed files with 6 additions and 7 deletions

View File

@@ -36,13 +36,13 @@ function BGM.init(list)
Sources[name]:setLooping(true) Sources[name]:setLooping(true)
Sources[name]:setVolume(0) Sources[name]:setVolume(0)
return true return true
else -- else
MES.new('warn',"No BGM file: "..Sources[name],5) -- MES.new('warn',"No BGM file: "..Sources[name],5)
end end
elseif Sources[name]then elseif Sources[name]then
return true return true
elseif name then -- elseif name then
MES.new('warn',"No BGM: "..name,5) -- MES.new('warn',"No BGM: "..name,5)
end end
end end
function BGM.loadAll()for name in next,Sources do _load(name)end end function BGM.loadAll()for name in next,Sources do _load(name)end end

View File

@@ -45,9 +45,8 @@ function VOC.init(list)
repeat n=n+1 until not _loadVoiceFile(list[i],list[i]..'_'..n) repeat n=n+1 until not _loadVoiceFile(list[i],list[i]..'_'..n)
if n==1 then if n==1 then
if not _loadVoiceFile(list[i],list[i])then _loadVoiceFile(list[i],list[i])
MES.new('warn',"No VOICE file: "..list[i],.1) -- if not _loadVoiceFile(list[i],list[i])then MES.new('warn',"No VOICE file: "..list[i],.1)end
end
end end
if not Source[list[i]][1]then if not Source[list[i]][1]then
Source[list[i]]=nil Source[list[i]]=nil