new hook call method + function to delegate conversion

This commit is contained in:
Oiltanker
2022-04-15 17:15:45 +03:00
parent 891efb4c4f
commit 3eba20ecb7
39 changed files with 470 additions and 676 deletions
@@ -13,14 +13,14 @@ namespace Barotrauma
public override object LoadFile(string file, Table globalContext)
{
if (!LuaFile.IsPathAllowedLuaException(file, false)) return null;
if (!LuaCsFile.IsPathAllowedLuaException(file, false)) return null;
return File.ReadAllText(file);
}
public override bool ScriptFileExists(string file)
{
if (!LuaFile.IsPathAllowedLuaException(file, false)) return false;
if (!LuaCsFile.IsPathAllowedLuaException(file, false)) return false;
return File.Exists(file);
}