v1.6.19.1 (Unto the Breach Hotfix 1)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user