Some initial CSharp scripting functionality

This commit is contained in:
Oiltanker
2022-04-09 20:47:55 +03:00
parent 86a88c6e20
commit 429557ad7d
12 changed files with 466 additions and 1 deletions
@@ -3236,6 +3236,28 @@ namespace Barotrauma
GameMain.Lua.Initialize();
}));
commands.Add(new Command("cl_net", "lua_net: runs a script on the client", (string[] args) =>
{
if (GameMain.Client != null && !GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
{
ThrowError("Command not permitted.");
return;
}
GameMain.Lua.DoString(string.Join(" ", args));
}));
commands.Add(new Command("cl_reloadnet", "reloads lua on the client", (string[] args) =>
{
if (GameMain.Client != null && !GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
{
ThrowError("Command not permitted.");
return;
}
GameMain.Lua.Initialize();
}));
}
private static void ReloadWearables(Character character, int variant = 0)