only allow cs commands if cs package present
This commit is contained in:
@@ -3227,6 +3227,8 @@ namespace Barotrauma
|
|||||||
}));
|
}));
|
||||||
commands.Add(new Command("cl_cs", "cs_cl: runs a string on the client", (string[] args) =>
|
commands.Add(new Command("cl_cs", "cs_cl: runs a string on the client", (string[] args) =>
|
||||||
{
|
{
|
||||||
|
if (LuaCsSetup.GetPackage("CsForBarotrauma", false) == null) { return; }
|
||||||
|
|
||||||
if (GameMain.Client != null && !GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
|
if (GameMain.Client != null && !GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
|
||||||
{
|
{
|
||||||
ThrowError("Command not permitted.");
|
ThrowError("Command not permitted.");
|
||||||
|
|||||||
@@ -1247,6 +1247,8 @@ namespace Barotrauma
|
|||||||
}));
|
}));
|
||||||
commands.Add(new Command("cs", "cs: runs a string", (string[] args) =>
|
commands.Add(new Command("cs", "cs: runs a string", (string[] args) =>
|
||||||
{
|
{
|
||||||
|
if(LuaCsSetup.GetPackage("CsForBarotrauma", false) == null) { return; }
|
||||||
|
|
||||||
GameMain.LuaCs.CsScript.Run(string.Join(" ", args));
|
GameMain.LuaCs.CsScript.Run(string.Join(" ", args));
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user