diff --git a/Content.Client/Construction/ConstructionSystem.cs b/Content.Client/Construction/ConstructionSystem.cs index 6e99f38591..5e5d4755ba 100644 --- a/Content.Client/Construction/ConstructionSystem.cs +++ b/Content.Client/Construction/ConstructionSystem.cs @@ -226,7 +226,7 @@ namespace Content.Client.Construction { if (_ghosts.TryGetValue(ghostId, out var ghost)) { - ghost.Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(ghost.Owner.Uid); _ghosts.Remove(ghostId); } } @@ -238,7 +238,7 @@ namespace Content.Client.Construction { foreach (var (_, ghost) in _ghosts) { - ghost.Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(ghost.Owner.Uid); } _ghosts.Clear(); diff --git a/Content.Server/AME/Components/AMEPartComponent.cs b/Content.Server/AME/Components/AMEPartComponent.cs index 75d0445d78..d37b019ca9 100644 --- a/Content.Server/AME/Components/AMEPartComponent.cs +++ b/Content.Server/AME/Components/AMEPartComponent.cs @@ -58,7 +58,7 @@ namespace Content.Server.AME.Components SoundSystem.Play(Filter.Pvs(Owner), _unwrapSound.GetSound(), Owner); - Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(Owner.Uid); return true; } diff --git a/Content.Server/Atmos/Components/GasTankComponent.cs b/Content.Server/Atmos/Components/GasTankComponent.cs index 5a6b42137c..22d7812bb9 100644 --- a/Content.Server/Atmos/Components/GasTankComponent.cs +++ b/Content.Server/Atmos/Components/GasTankComponent.cs @@ -271,7 +271,7 @@ namespace Content.Server.Atmos.Components EntitySystem.Get().SpawnExplosion(OwnerUid, (int) (range * 0.25f), (int) (range * 0.5f), (int) (range * 1.5f), 1); - Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(Owner.Uid); return; } @@ -285,7 +285,7 @@ namespace Content.Server.Atmos.Components SoundSystem.Play(Filter.Pvs(Owner), _ruptureSound.GetSound(), Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.125f)); - Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(Owner.Uid); return; } diff --git a/Content.Server/Body/Components/BodyComponent.cs b/Content.Server/Body/Components/BodyComponent.cs index 6a9bf73417..a53ee3f57b 100644 --- a/Content.Server/Body/Components/BodyComponent.cs +++ b/Content.Server/Body/Components/BodyComponent.cs @@ -103,7 +103,7 @@ namespace Content.Server.Body.Components } } - Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(Owner.Uid); } } } diff --git a/Content.Server/Botany/Components/LogComponent.cs b/Content.Server/Botany/Components/LogComponent.cs index 1ecd881ecd..eca2ca419b 100644 --- a/Content.Server/Botany/Components/LogComponent.cs +++ b/Content.Server/Botany/Components/LogComponent.cs @@ -27,7 +27,7 @@ namespace Content.Server.Botany.Components plank.RandomOffset(0.25f); } - Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(Owner.Uid); return true; } diff --git a/Content.Server/Botany/Components/PlantHolderComponent.cs b/Content.Server/Botany/Components/PlantHolderComponent.cs index 59fdf4e4fd..b20e7d4eec 100644 --- a/Content.Server/Botany/Components/PlantHolderComponent.cs +++ b/Content.Server/Botany/Components/PlantHolderComponent.cs @@ -661,7 +661,7 @@ namespace Content.Server.Botany.Components if (seeds.Seed == null) { user.PopupMessageCursor(Loc.GetString("plant-holder-component-empty-seed-packet-message")); - usingItem.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(usingItem.Uid); return false; } @@ -675,7 +675,7 @@ namespace Content.Server.Botany.Components Health = Seed.Endurance; _lastCycle = _gameTiming.CurTime; - usingItem.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(usingItem.Uid); CheckLevelSanity(); UpdateSprite(); @@ -823,7 +823,7 @@ namespace Content.Server.Botany.Components ForceUpdateByExternalCause(); } - usingItem.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(usingItem.Uid); return true; } diff --git a/Content.Server/Botany/Components/SeedExtractorComponent.cs b/Content.Server/Botany/Components/SeedExtractorComponent.cs index 84b9ccdb66..44647c2ae3 100644 --- a/Content.Server/Botany/Components/SeedExtractorComponent.cs +++ b/Content.Server/Botany/Components/SeedExtractorComponent.cs @@ -31,7 +31,7 @@ namespace Content.Server.Botany.Components { eventArgs.User.PopupMessageCursor(Loc.GetString("seed-extractor-component-interact-message",("name", eventArgs.Using.Name))); - eventArgs.Using.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(eventArgs.Using.Uid); var random = _random.Next(_minSeeds, _maxSeeds); diff --git a/Content.Server/Chemistry/Components/FoamSolutionAreaEffectComponent.cs b/Content.Server/Chemistry/Components/FoamSolutionAreaEffectComponent.cs index 402e8dc290..284d7904a7 100644 --- a/Content.Server/Chemistry/Components/FoamSolutionAreaEffectComponent.cs +++ b/Content.Server/Chemistry/Components/FoamSolutionAreaEffectComponent.cs @@ -82,7 +82,7 @@ namespace Content.Server.Chemistry.Components IoCManager.Resolve().SpawnEntity(_foamedMetalPrototype, Owner.Transform.Coordinates); } - Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(Owner.Uid); }); } } diff --git a/Content.Server/Chemistry/EntitySystems/RehydratableSystem.cs b/Content.Server/Chemistry/EntitySystems/RehydratableSystem.cs index eb0c4705ac..256c28824d 100644 --- a/Content.Server/Chemistry/EntitySystems/RehydratableSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/RehydratableSystem.cs @@ -45,7 +45,7 @@ namespace Content.Server.Chemistry.EntitySystems ent.Transform.AttachToGridOrMap(); } - owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(owner.Uid); } } } diff --git a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs index a552c69983..8da6d20227 100644 --- a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs @@ -123,7 +123,7 @@ namespace Content.Server.Chemistry.EntitySystems if (contents.CurrentVolume == 0 || vapor.Timer > vapor.AliveTime) { // Delete this - entity.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(entity.Uid); } } } diff --git a/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs b/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs index 9418f02d7e..94cb2d989f 100644 --- a/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs +++ b/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs @@ -122,7 +122,7 @@ namespace Content.Server.Chemistry.ReactionEffects if (areaEffectComponent == null) { Logger.Error("Couldn't get AreaEffectComponent from " + _prototypeId); - ent.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(ent.Uid); return; } diff --git a/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs b/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs index 7f0fd17062..de609a939e 100644 --- a/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs +++ b/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs @@ -5,6 +5,8 @@ using Content.Shared.Chemistry; using Content.Shared.Chemistry.Reaction; using Content.Shared.Chemistry.Reagent; using Content.Shared.FixedPoint; +using Robust.Shared.GameObjects; +using Robust.Shared.IoC; using Robust.Shared.Map; using Robust.Shared.Serialization.Manager.Attributes; @@ -31,7 +33,7 @@ namespace Content.Server.Chemistry.TileReactions break; amount = next; - entity.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(entity.Uid); } } diff --git a/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs b/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs index c66e8abf1d..0bc8bf79fa 100644 --- a/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs +++ b/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs @@ -3,6 +3,7 @@ using System.Threading.Tasks; using Content.Shared.Construction; using Robust.Shared.Containers; using Robust.Shared.GameObjects; +using Robust.Shared.IoC; using Robust.Shared.Serialization.Manager.Attributes; namespace Content.Server.Construction.Completions @@ -22,7 +23,7 @@ namespace Content.Server.Construction.Completions foreach (var contained in container.ContainedEntities.ToArray()) { if(container.Remove(contained)) - contained.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(contained.Uid); } } } diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs index a45506f3ca..87f7e46b24 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs @@ -124,7 +124,7 @@ namespace Content.Server.Fluids.EntitySystems if (!puddle.Owner.Transform.Anchored) return; - puddle.Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(puddle.Owner.Uid); } /// diff --git a/Content.Server/Hands/Systems/HandVirtualItemSystem.cs b/Content.Server/Hands/Systems/HandVirtualItemSystem.cs index fa9937a6e4..8ccca07d2d 100644 --- a/Content.Server/Hands/Systems/HandVirtualItemSystem.cs +++ b/Content.Server/Hands/Systems/HandVirtualItemSystem.cs @@ -5,6 +5,7 @@ using Content.Shared.Hands.Components; using Content.Shared.Interaction; using JetBrains.Annotations; using Robust.Shared.GameObjects; +using Robust.Shared.IoC; namespace Content.Server.Hands.Systems { @@ -73,7 +74,7 @@ namespace Content.Server.Hands.Systems var targEv = new VirtualItemDeletedEvent(comp.BlockingEntity, user); RaiseLocalEvent(comp.BlockingEntity, targEv, false); - comp.Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(comp.Owner.Uid); } /// diff --git a/Content.Server/Radiation/RadiationPulseComponent.cs b/Content.Server/Radiation/RadiationPulseComponent.cs index 58b0e9b830..9d5f8547a5 100644 --- a/Content.Server/Radiation/RadiationPulseComponent.cs +++ b/Content.Server/Radiation/RadiationPulseComponent.cs @@ -112,7 +112,7 @@ namespace Content.Server.Radiation return; if (_duration <= 0f) - Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(Owner.Uid); _duration -= frameTime; } diff --git a/Content.Server/Recycling/Components/RecyclableComponent.cs b/Content.Server/Recycling/Components/RecyclableComponent.cs index 69713aae5d..31f070736e 100644 --- a/Content.Server/Recycling/Components/RecyclableComponent.cs +++ b/Content.Server/Recycling/Components/RecyclableComponent.cs @@ -38,7 +38,7 @@ namespace Content.Server.Recycling.Components } - Owner.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(Owner.Uid); } } } diff --git a/Content.Server/Singularity/EntitySystems/SingularitySystem.cs b/Content.Server/Singularity/EntitySystems/SingularitySystem.cs index 4665461bbe..2ef6034c0f 100644 --- a/Content.Server/Singularity/EntitySystems/SingularitySystem.cs +++ b/Content.Server/Singularity/EntitySystems/SingularitySystem.cs @@ -125,7 +125,7 @@ namespace Content.Server.Singularity.EntitySystems otherSingulo.BeingDeletedByAnotherSingularity = true; } - entity.QueueDelete(); + IoCManager.Resolve().QueueDeleteEntity(entity.Uid); if (entity.TryGetComponent(out var singuloFood)) component.Energy += singuloFood.Energy;