]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Update stomach removal and lung removal smite to not use Component.Owner (#29927)
authorPlykiya <58439124+Plykiya@users.noreply.github.com>
Sun, 28 Jul 2024 08:25:40 +0000 (01:25 -0700)
committerGitHub <noreply@github.com>
Sun, 28 Jul 2024 08:25:40 +0000 (01:25 -0700)
* Update stomach removal and lung removal smite

* New function makes things simple

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs

index 3328563116135e83eb3a68da1fe71655a061c049..1f5abf6726bab29f99d062f3ba9951ec5f0f574b 100644 (file)
@@ -361,9 +361,9 @@ public sealed partial class AdminVerbSystem
                 Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "stomach"),
                 Act = () =>
                 {
-                    foreach (var (component, _) in _bodySystem.GetBodyOrganComponents<StomachComponent>(args.Target, body))
+                    foreach (var entity in _bodySystem.GetBodyOrganEntityComps<StomachComponent>((args.Target, body)))
                     {
-                        QueueDel(component.Owner);
+                        QueueDel(entity.Owner);
                     }
 
                     _popupSystem.PopupEntity(Loc.GetString("admin-smite-stomach-removal-self"), args.Target,
@@ -381,9 +381,9 @@ public sealed partial class AdminVerbSystem
                 Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "lung-r"),
                 Act = () =>
                 {
-                    foreach (var (component, _) in _bodySystem.GetBodyOrganComponents<LungComponent>(args.Target, body))
+                    foreach (var entity in _bodySystem.GetBodyOrganEntityComps<LungComponent>((args.Target, body)))
                     {
-                        QueueDel(component.Owner);
+                        QueueDel(entity.Owner);
                     }
 
                     _popupSystem.PopupEntity(Loc.GetString("admin-smite-lung-removal-self"), args.Target,