diff --git a/Content.Client/GameObjects/EntitySystems/ConstructionSystem.cs b/Content.Client/GameObjects/EntitySystems/ConstructionSystem.cs index b55d5cbf03..d681396f45 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 65a9dfdea5..aa1b17c22a 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 8455f1bb53..a47215d53a 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 e45bd8ccfa..8cfbd93953 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 daae1f09d9..176b783b91 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 ce20d91bcf..eb3ffa03f9 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 b4d5b629d9..7449d18a3b 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 d1878065df..a5e2d0981e 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 c27d791218..0627cb9619 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 46c7fa044d..cd25cc5f88 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 f3168ac56d..b9cadc3bc4 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 18b0b0ee2b..8faeacd42b 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 0718c5cfca..595c81e8e8 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 0634aaeae6..4d94a76a60 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)