Merge remote-tracking branch 'upstream/master' into develop

This commit is contained in:
EvilFactory
2024-10-31 06:31:11 -03:00
29 changed files with 183 additions and 62 deletions
@@ -1747,7 +1747,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);
}
}
);