启动时会遍历所有模式文件补充不在地图上的模式

This commit is contained in:
MrZ626
2021-10-18 15:05:35 +08:00
parent d4539c3a23
commit 93af618fa0
2 changed files with 7 additions and 5 deletions

View File

@@ -359,6 +359,13 @@ for i=1,#MODES do
MODES[m.name],MODES[i]=MODES[i]
end
end
for _,v in next,fs.getDirectoryItems('parts/modes')do
if isSafeFile('parts/modes/'..v)and not MODES[v:sub(1,-5)]then
local M={name=v:sub(1,-5)}
TABLE.complete(require('parts.modes.'..M.name),M)
MODES[M.name]=M
end
end
--Update data
do