diff --git a/Content.Client/GameObjects/EntitySystems/ConstructionSystem.cs b/Content.Client/GameObjects/EntitySystems/ConstructionSystem.cs index b55d5cbf03d..d681396f45b 100644 --- a/Content.Client/GameObjects/EntitySystems/ConstructionSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/ConstructionSystem.cs @@ -184,7 +184,7 @@ namespace Content.Client.GameObjects.EntitySystems { if (_ghosts.TryGetValue(ghostId, out var ghost)) { - ghost.Owner.Delete(); + ghost.Owner.QueueDelete(); _ghosts.Remove(ghostId); } } @@ -196,7 +196,7 @@ namespace Content.Client.GameObjects.EntitySystems { foreach (var (_, ghost) in _ghosts) { - ghost.Owner.Delete(); + ghost.Owner.QueueDelete(); } _ghosts.Clear(); diff --git a/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs b/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs index 65a9dfdea54..aa1b17c22a2 100644 --- a/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs +++ b/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs @@ -129,7 +129,7 @@ namespace Content.Server.Chemistry.ReactionEffects if (areaEffectComponent == null) { Logger.Error("Couldn't get AreaEffectComponent from " + _prototypeId); - ent.Delete(); + ent.QueueDelete(); return; } diff --git a/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs b/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs index 8455f1bb532..a47215d53ae 100644 --- a/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs +++ b/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs @@ -25,7 +25,7 @@ namespace Content.Server.Chemistry.TileReactions break; amount = next; - entity.Delete(); + entity.QueueDelete(); } } diff --git a/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs b/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs index e45bd8ccfa1..8cfbd939539 100644 --- a/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs +++ b/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs @@ -22,7 +22,7 @@ namespace Content.Server.Construction.Completions foreach (var contained in container.ContainedEntities.ToArray()) { if(container.Remove(contained)) - contained.Delete(); + contained.QueueDelete(); } } } diff --git a/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs b/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs index daae1f09d9a..176b783b915 100644 --- a/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs @@ -269,7 +269,7 @@ namespace Content.Server.GameObjects.Components.Atmos Owner.SpawnExplosion((int) (range * 0.25f), (int) (range * 0.5f), (int) (range * 1.5f), 1); - Owner.Delete(); + Owner.QueueDelete(); return; } @@ -283,7 +283,7 @@ namespace Content.Server.GameObjects.Components.Atmos SoundSystem.Play(Filter.Pvs(Owner), "Audio/Effects/spray.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.125f)); - Owner.Delete(); + Owner.QueueDelete(); return; } diff --git a/Content.Server/GameObjects/Components/Botany/LogComponent.cs b/Content.Server/GameObjects/Components/Botany/LogComponent.cs index ce20d91bcfb..eb3ffa03f9e 100644 --- a/Content.Server/GameObjects/Components/Botany/LogComponent.cs +++ b/Content.Server/GameObjects/Components/Botany/LogComponent.cs @@ -25,7 +25,7 @@ namespace Content.Server.GameObjects.Components.Botany plank.RandomOffset(0.25f); } - Owner.Delete(); + Owner.QueueDelete(); return true; } diff --git a/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs b/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs index b4d5b629d93..7449d18a3b2 100644 --- a/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs +++ b/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs @@ -655,7 +655,7 @@ namespace Content.Server.GameObjects.Components.Botany if (seeds.Seed == null) { user.PopupMessageCursor(Loc.GetString("The packet seems to be empty. You throw it away.")); - usingItem.Delete(); + usingItem.QueueDelete(); return false; } @@ -667,7 +667,7 @@ namespace Content.Server.GameObjects.Components.Botany Health = Seed.Endurance; _lastCycle = _gameTiming.CurTime; - usingItem.Delete(); + usingItem.QueueDelete(); CheckLevelSanity(); UpdateSprite(); @@ -799,7 +799,7 @@ namespace Content.Server.GameObjects.Components.Botany ForceUpdateByExternalCause(); } - usingItem.Delete(); + usingItem.QueueDelete(); return true; } diff --git a/Content.Server/GameObjects/Components/Botany/SeedExtractorComponent.cs b/Content.Server/GameObjects/Components/Botany/SeedExtractorComponent.cs index d1878065df2..a5e2d0981e4 100644 --- a/Content.Server/GameObjects/Components/Botany/SeedExtractorComponent.cs +++ b/Content.Server/GameObjects/Components/Botany/SeedExtractorComponent.cs @@ -32,7 +32,7 @@ namespace Content.Server.GameObjects.Components.Botany { eventArgs.User.PopupMessageCursor(Loc.GetString("You extract some seeds from the {0}.", eventArgs.Using.Name)); - eventArgs.Using.Delete(); + eventArgs.Using.QueueDelete(); var random = _random.Next(_minSeeds, _maxSeeds); diff --git a/Content.Server/GameObjects/Components/Chemistry/FoamSolutionAreaEffectComponent.cs b/Content.Server/GameObjects/Components/Chemistry/FoamSolutionAreaEffectComponent.cs index c27d791218f..0627cb96198 100644 --- a/Content.Server/GameObjects/Components/Chemistry/FoamSolutionAreaEffectComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/FoamSolutionAreaEffectComponent.cs @@ -75,7 +75,7 @@ namespace Content.Server.GameObjects.Components.Chemistry { Owner.EntityManager.SpawnEntity(_foamedMetalPrototype, Owner.Transform.Coordinates); } - Owner.Delete(); + Owner.QueueDelete(); }); } } diff --git a/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs b/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs index 46c7fa044da..cd25cc5f889 100644 --- a/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs @@ -108,7 +108,7 @@ namespace Content.Server.GameObjects.Components.Chemistry trueTarget.PopupMessage(user, Loc.GetString("You swallow the pill.")); - Owner.Delete(); + Owner.QueueDelete(); return true; } } diff --git a/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs b/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs index f3168ac56dd..b9cadc3bc40 100644 --- a/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs @@ -44,7 +44,7 @@ namespace Content.Server.GameObjects.Components.Nutrition solution.Solution.SpillAt(Owner, "PuddleSmear", false); } - Owner.Delete(); + Owner.QueueDelete(); } } } diff --git a/Content.Server/GameObjects/Components/Recycling/RecyclableComponent.cs b/Content.Server/GameObjects/Components/Recycling/RecyclableComponent.cs index 18b0b0ee2b0..8faeacd42b2 100644 --- a/Content.Server/GameObjects/Components/Recycling/RecyclableComponent.cs +++ b/Content.Server/GameObjects/Components/Recycling/RecyclableComponent.cs @@ -38,7 +38,7 @@ namespace Content.Server.GameObjects.Components.Recycling } - Owner.Delete(); + Owner.QueueDelete(); } } } diff --git a/Content.Server/GameObjects/EntitySystems/PuddleSystem.cs b/Content.Server/GameObjects/EntitySystems/PuddleSystem.cs index 0718c5cfcaf..595c81e8e89 100644 --- a/Content.Server/GameObjects/EntitySystems/PuddleSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/PuddleSystem.cs @@ -40,7 +40,7 @@ namespace Content.Server.GameObjects.EntitySystems grid.TileIndicesFor(puddleTransform.Coordinates) == eventArgs.NewTile.GridIndices && eventArgs.NewTile.Tile.IsEmpty) { - puddle.Owner.Delete(); + puddle.Owner.QueueDelete(); break; // Currently it's one puddle per tile, if that changes remove this } } diff --git a/Content.Shared/GameObjects/EntitySystems/ActSystem.cs b/Content.Shared/GameObjects/EntitySystems/ActSystem.cs index 0634aaeae6b..4d94a76a60d 100644 --- a/Content.Shared/GameObjects/EntitySystems/ActSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/ActSystem.cs @@ -68,7 +68,7 @@ namespace Content.Shared.GameObjects.EntitySystems destroyAct.OnDestroy(eventArgs); } - owner.Delete(); + owner.QueueDelete(); } public void HandleExplosion(EntityCoordinates source, IEntity target, ExplosionSeverity severity)