]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix mark verb
authorElectroJr <leonsfriedrich@gmail.com>
Fri, 3 Jan 2025 05:45:02 +0000 (18:45 +1300)
committerElectroJr <leonsfriedrich@gmail.com>
Fri, 3 Jan 2025 05:45:02 +0000 (18:45 +1300)
Content.Server/Administration/Systems/AdminVerbSystem.cs
Content.Server/Administration/Toolshed/MarkedCommand.cs

index 0640537f57ecd93a1c4de1f40764ec59a299903a..43b6007583783790156fd6570276deb2c48cf9b2 100644 (file)
@@ -105,7 +105,7 @@ namespace Content.Server.Administration.Systems
                 mark.Text = Loc.GetString("toolshed-verb-mark");
                 mark.Message = Loc.GetString("toolshed-verb-mark-description");
                 mark.Category = VerbCategory.Admin;
-                mark.Act = () => _toolshed.InvokeCommand(player, "=> $marked", Enumerable.Repeat(args.Target, 1), out _);
+                mark.Act = () => _toolshed.InvokeCommand(player, "=> $marked", new List<EntityUid> {args.Target}, out _);
                 mark.Impact = LogImpact.Low;
                 args.Verbs.Add(mark);
 
index 54d45a352de781bcad1ad829c274145d20d50ecb..c2b9ecf79a0dac376c24a471d163e08d5daf3e94 100644 (file)
@@ -9,8 +9,7 @@ public sealed class MarkedCommand : ToolshedCommand
     [CommandImplementation]
     public IEnumerable<EntityUid> Marked(IInvocationContext ctx)
     {
-        var res = (IEnumerable<EntityUid>?)ctx.ReadVar("marked");
-        res ??= Array.Empty<EntityUid>();
-        return res;
+        var marked = ctx.ReadVar("marked") as IEnumerable<EntityUid>;
+        return marked ?? Array.Empty<EntityUid>();
     }
 }