升级bgm模块,不再需要在启动时就加载好音乐资源

This commit is contained in:
MrZ626
2021-07-21 02:16:05 +08:00
parent 0265793a3f
commit 0023c0a4c6
3 changed files with 64 additions and 61 deletions

View File

@@ -171,7 +171,7 @@ BGM.init((function()
local L={}
for _,v in next,fs.getDirectoryItems('media/BGM')do
if fs.getRealDirectory('media/BGM/'..v)~=SAVEDIR then
table.insert(L,v:sub(1,-5))
table.insert(L,{name=v:sub(1,-5),path='media/BGM/'..v})
else
MES.new('warn',"Dangerous file : %SAVE%/media/BGM/"..v)
end