fix many warnings (#889)

* fix many warnings

some of them can be solved by using a prototype-based system
maybe I can try to use some of these systems to reform backgrounds...

* Update app_mahjong.lua

---------

Co-authored-by: MrZ_26 <1046101471@qq.com>
This commit is contained in:
Imple Lee
2023-05-03 00:27:54 +08:00
committed by GitHub
parent 7dd73ef8d3
commit fe29cc532d
15 changed files with 15 additions and 19 deletions

View File

@@ -334,7 +334,7 @@ SKIN.load{
SFX.init((function()--[Warning] Not loading files here, just get the list of sound needed
local L={}
for _,v in next,fs.getDirectoryItems('media/effect/chiptune/') do
if FILE.isSafe('media/effect/chiptune/'..v,"Dangerous file : %SAVE%/media/effect/chiptune/"..v) then
if FILE.isSafe('media/effect/chiptune/'..v) then
table.insert(L,v:sub(1,-5))
end
end
@@ -343,7 +343,7 @@ end)())
BGM.init((function()
local L={}
for _,v in next,fs.getDirectoryItems('media/music') do
if FILE.isSafe('media/music/'..v,"Dangerous file : %SAVE%/media/music/"..v) then
if FILE.isSafe('media/music/'..v) then
L[v:sub(1,-5)]='media/music/'..v
end
end