v1.6.19.1 (Unto the Breach Hotfix 1)

This commit is contained in:
Regalis11
2024-10-31 11:27:32 +02:00
parent c015059218
commit 26ffd2104e
28 changed files with 182 additions and 61 deletions
@@ -1711,7 +1711,34 @@ namespace Barotrauma
SpawnItem(args, cursorWorldPos, client.Character, out string errorMsg);
if (!string.IsNullOrWhiteSpace(errorMsg))
{
GameMain.Server.SendConsoleMessage(errorMsg, client);
GameMain.Server.SendConsoleMessage(errorMsg, client, Color.Red);
}
}
);
AssignOnClientRequestExecute(
"give",
(Client client, Vector2 cursorWorldPos, string[] args) =>
{
if (client.Character == null)
{
GameMain.Server.SendConsoleMessage("No character is selected!", client, Color.Red);
return;
}
if (args.Length == 0)
{
GameMain.Server.SendConsoleMessage("Please give the name or identifier of the item to spawn.", client, Color.Red);
return;
}
var modifiedArgs = new List<string>(args);
modifiedArgs.Insert(1, "inventory");
SpawnItem(modifiedArgs.ToArray(), cursorWorldPos, client.Character, out string errorMsg);
if (!string.IsNullOrWhiteSpace(errorMsg))
{
GameMain.Server.SendConsoleMessage(errorMsg, client, Color.Red);
}
}
);