]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Update SpawnAfterInteractSystem.cs to not use Component.Owner (#29968)
authorPlykiya <58439124+Plykiya@users.noreply.github.com>
Sat, 13 Jul 2024 11:50:21 +0000 (04:50 -0700)
committerGitHub <noreply@github.com>
Sat, 13 Jul 2024 11:50:21 +0000 (21:50 +1000)
* Update SpawnAfterInteractSystem.cs

* what the fuck is that condition

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs

index 281bbc472117e68cc34fc4400a94006e5ddf33a1..8391e8faada5fbb08f439d78bfe959d059014179 100644 (file)
@@ -65,8 +65,8 @@ namespace Content.Server.Engineering.EntitySystems
 
             EntityManager.SpawnEntity(component.Prototype, args.ClickLocation.SnapToGrid(grid));
 
-            if (component.RemoveOnInteract && stackComp == null && !((!EntityManager.EntityExists(uid) ? EntityLifeStage.Deleted : EntityManager.GetComponent<MetaDataComponent>(component.Owner).EntityLifeStage) >= EntityLifeStage.Deleted))
-                EntityManager.DeleteEntity(uid);
+            if (component.RemoveOnInteract && stackComp == null)
+                TryQueueDel(uid);
         }
     }
 }