检测资源文件是否来自工程的过程改为函数

This commit is contained in:
MrZ626
2021-10-18 15:05:34 +08:00
parent f40b2f75bd
commit 3d70a5ac79
2 changed files with 15 additions and 14 deletions

View File

@@ -71,6 +71,13 @@ do--function applyXxxSatur(mode)
SHADER.fieldSatur:send('k',m[2])
end
end
function isSafeFile(file,mes)
if love.filesystem.getRealDirectory(file)~=SAVEDIR then
return true
elseif mes then
MES.new('warn',mes)
end
end
--Royale mode
function randomTarget(P)--Return a random opponent for P