Update ToolshedTest for engine PR (#22989)

This commit is contained in:
Leon Friedrich
2023-12-27 16:51:42 -05:00
committed by GitHub
parent b032d778fa
commit eb04a98294
2 changed files with 5 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using Content.IntegrationTests.Pair;
using Content.Server.Administration.Managers;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Toolshed;
using Robust.Shared.Toolshed.Errors;
@@ -95,6 +96,7 @@ public abstract class ToolshedTest : IInvocationContext
}
protected ICommonSession? InvocationSession { get; set; }
public NetUserId? User => Session?.UserId;
public ICommonSession? Session
{

View File

@@ -23,7 +23,10 @@ public partial class ArtifactSystem
private void ForceArtifactNode(IConsoleShell shell, string argstr, string[] args)
{
if (args.Length != 2)
{
shell.WriteError("Argument length must be 2");
return;
}
if (!NetEntity.TryParse(args[0], out var uidNet) || !TryGetEntity(uidNet, out var uid) || !int.TryParse(args[1], out var id))
return;