]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix admin "Spawn here" verb (#36080)
authorScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Tue, 25 Mar 2025 18:40:54 +0000 (19:40 +0100)
committerGitHub <noreply@github.com>
Tue, 25 Mar 2025 18:40:54 +0000 (19:40 +0100)
* init

* review

* review

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Content.Server/Administration/Systems/AdminVerbSystem.cs

index 39ae699683da54f0bb1deb3bdc3b28c365397a8b..17f205bd9b0551b2af3d7202fa1b19f0d8a4c4bb 100644 (file)
@@ -153,12 +153,10 @@ namespace Content.Server.Administration.Systems
 
                             var profile = _ticker.GetPlayerProfile(targetActor.PlayerSession);
                             var mobUid = _spawning.SpawnPlayerMob(coords.Value, null, profile, stationUid);
-                            var targetMind = _mindSystem.GetMind(args.Target);
 
-                            if (targetMind != null)
-                            {
-                                _mindSystem.TransferTo(targetMind.Value, mobUid, true);
-                            }
+                            if (_mindSystem.TryGetMind(args.Target, out var mindId, out var mindComp))
+                                _mindSystem.TransferTo(mindId, mobUid, true, mind: mindComp);
+
                         },
                         ConfirmationPopup = true,
                         Impact = LogImpact.High,