]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Admin Respawn Verb now works as intended (#21840)
authornikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Sun, 26 Nov 2023 21:11:59 +0000 (21:11 +0000)
committerGitHub <noreply@github.com>
Sun, 26 Nov 2023 21:11:59 +0000 (15:11 -0600)
* Respawn verb actually works now

For some reason the respawn verb was using the name of the person who used it instead of the person that was targetted.

* added changelog

* typo moment

* Removed unnecessary check

Content.Server/Administration/Systems/AdminVerbSystem.cs
Resources/Changelog/Admin.yml

index bc065745f5ea0a594558ca62422efab4d1f660a6..5ac4bc417115228bf5221fd7ea6e20f2443ccc0d 100644 (file)
@@ -156,6 +156,19 @@ namespace Content.Server.Administration.Systems
                         Impact = LogImpact.Extreme,
                         ConfirmationPopup = true
                     });
+
+                // Respawn
+                    args.Verbs.Add(new Verb()
+                    {
+                        Text = Loc.GetString("admin-player-actions-respawn"),
+                        Category = VerbCategory.Admin,
+                        Act = () =>
+                        {
+                            _console.ExecuteCommand(player, $"respawn {targetActor.PlayerSession.Name}");
+                        },
+                        ConfirmationPopup = true,
+                        // No logimpact as the command does it internally.
+                    });
                 }
 
                 // Admin Logs
@@ -211,21 +224,6 @@ namespace Content.Server.Administration.Systems
                     Impact = LogImpact.Low
                 });
 
-                // Respawn
-                if (HasComp<ActorComponent>(args.Target))
-                {
-                    args.Verbs.Add(new Verb()
-                    {
-                        Text = Loc.GetString("admin-player-actions-respawn"),
-                        Category = VerbCategory.Admin,
-                        Act = () =>
-                        {
-                            _console.ExecuteCommand(player, $"respawn {actor.PlayerSession.Name}");
-                        },
-                        ConfirmationPopup = true,
-                        // No logimpact as the command does it internally.
-                    });
-                }
             }
         }
 
index 6b7763d14d25447ea28ab053b42b3f40b9d75b25..4e0beb10e76e60caae56d7205c8d63b28f2186dc 100644 (file)
@@ -1,4 +1,4 @@
-Name: Admin
+Name: Admin
 AdminOnly: true
 Order: 1
 Entries:
@@ -66,3 +66,7 @@ Entries:
   - {message: 'AME and PA make a sound effect when they are being overloaded. Similar to being sent a fax.', type: Add}
   id: 10
   time: '2023-11-07T15:03:00.0000000+00:00'
+- author: nikthechampiongr
+  changes:
+    - {message: 'The respawn verb now respawns the targeted player instead of the admin', type: Fix}
+  time: '2023-11-22T16:39:00.0000000+00:00'