made the loader a lua script and added a few useful functions

This commit is contained in:
Evil Factory
2021-09-06 23:30:52 -03:00
parent 995d0d9488
commit 5df4207521
3 changed files with 76 additions and 13 deletions
@@ -106,7 +106,10 @@ namespace Barotrauma
}
}
public static bool CheckPermission(Client client, ClientPermissions permissions)
{
return client.Permissions.HasFlag(permissions);
}
}
public class LuaGame
@@ -431,6 +434,16 @@ namespace Barotrauma
return File.Exists(path);
}
public static bool DirectoryExists(string path)
{
return Directory.Exists(path);
}
public static string[] GetDirectories(string path)
{
return Directory.GetDirectories(path);
}
public static string[] DirSearch(string sDir)
{
List<string> files = new List<string>();