cs script runner + mod store + cs-lua interface

This commit is contained in:
Oiltanker
2022-04-17 16:05:00 +03:00
parent 6aeac06112
commit a7b4004058
9 changed files with 336 additions and 65 deletions
@@ -3223,7 +3223,17 @@ namespace Barotrauma
return;
}
GameMain.LuaCs.DoString(string.Join(" ", args));
GameMain.LuaCs.Lua.DoString(string.Join(" ", args));
}));
commands.Add(new Command("cl_cs", "cs_cl: runs a string on the client", (string[] args) =>
{
if (GameMain.Client != null && !GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
{
ThrowError("Command not permitted.");
return;
}
GameMain.LuaCs.CsScript.Run(string.Join(" ", args));
}));
commands.Add(new Command("cl_reloadlua", "reloads lua on the client", (string[] args) =>
@@ -3236,28 +3246,6 @@ namespace Barotrauma
GameMain.LuaCs.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.LuaCs.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.LuaCs.Initialize();
}));
}
private static void ReloadWearables(Character character, int variant = 0)