]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Update ToolshedTest for engine PR (#22989)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Wed, 27 Dec 2023 21:51:42 +0000 (16:51 -0500)
committerGitHub <noreply@github.com>
Wed, 27 Dec 2023 21:51:42 +0000 (08:51 +1100)
Content.IntegrationTests/Tests/Toolshed/ToolshedTest.cs
Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Commands.cs

index d6aec781a99e7bd410bd9b814a85666e9e20ca67..1c9abc963205af9fce7522b773a4ced0e9dfb5c9 100644 (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
     {
index 649a7a34f16b68a57ef344b1540755a992be40a2..d840a1f209d1521e1059d72032db3a6d4aba041b 100644 (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;