Inline QueueDelete
This commit is contained in:
@@ -226,7 +226,7 @@ namespace Content.Client.Construction
|
||||
{
|
||||
if (_ghosts.TryGetValue(ghostId, out var ghost))
|
||||
{
|
||||
ghost.Owner.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().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<IEntityManager>().QueueDeleteEntity(ghost.Owner.Uid);
|
||||
}
|
||||
|
||||
_ghosts.Clear();
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Content.Server.AME.Components
|
||||
|
||||
SoundSystem.Play(Filter.Pvs(Owner), _unwrapSound.GetSound(), Owner);
|
||||
|
||||
Owner.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(Owner.Uid);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace Content.Server.Atmos.Components
|
||||
|
||||
EntitySystem.Get<ExplosionSystem>().SpawnExplosion(OwnerUid, (int) (range * 0.25f), (int) (range * 0.5f), (int) (range * 1.5f), 1);
|
||||
|
||||
Owner.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().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<IEntityManager>().QueueDeleteEntity(Owner.Uid);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Content.Server.Body.Components
|
||||
}
|
||||
}
|
||||
|
||||
Owner.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(Owner.Uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Content.Server.Botany.Components
|
||||
plank.RandomOffset(0.25f);
|
||||
}
|
||||
|
||||
Owner.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(Owner.Uid);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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<IEntityManager>().QueueDeleteEntity(usingItem.Uid);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -675,7 +675,7 @@ namespace Content.Server.Botany.Components
|
||||
Health = Seed.Endurance;
|
||||
_lastCycle = _gameTiming.CurTime;
|
||||
|
||||
usingItem.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(usingItem.Uid);
|
||||
|
||||
CheckLevelSanity();
|
||||
UpdateSprite();
|
||||
@@ -823,7 +823,7 @@ namespace Content.Server.Botany.Components
|
||||
ForceUpdateByExternalCause();
|
||||
}
|
||||
|
||||
usingItem.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(usingItem.Uid);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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<IEntityManager>().QueueDeleteEntity(eventArgs.Using.Uid);
|
||||
|
||||
var random = _random.Next(_minSeeds, _maxSeeds);
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Content.Server.Chemistry.Components
|
||||
IoCManager.Resolve<IEntityManager>().SpawnEntity(_foamedMetalPrototype, Owner.Transform.Coordinates);
|
||||
}
|
||||
|
||||
Owner.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(Owner.Uid);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
ent.Transform.AttachToGridOrMap();
|
||||
}
|
||||
|
||||
owner.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(owner.Uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
if (contents.CurrentVolume == 0 || vapor.Timer > vapor.AliveTime)
|
||||
{
|
||||
// Delete this
|
||||
entity.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(entity.Uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Content.Server.Chemistry.ReactionEffects
|
||||
if (areaEffectComponent == null)
|
||||
{
|
||||
Logger.Error("Couldn't get AreaEffectComponent from " + _prototypeId);
|
||||
ent.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(ent.Uid);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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<IEntityManager>().QueueDeleteEntity(entity.Uid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<IEntityManager>().QueueDeleteEntity(contained.Uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Content.Server.Fluids.EntitySystems
|
||||
if (!puddle.Owner.Transform.Anchored)
|
||||
return;
|
||||
|
||||
puddle.Owner.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(puddle.Owner.Uid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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<IEntityManager>().QueueDeleteEntity(comp.Owner.Uid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace Content.Server.Radiation
|
||||
return;
|
||||
|
||||
if (_duration <= 0f)
|
||||
Owner.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(Owner.Uid);
|
||||
|
||||
_duration -= frameTime;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Content.Server.Recycling.Components
|
||||
|
||||
}
|
||||
|
||||
Owner.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(Owner.Uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace Content.Server.Singularity.EntitySystems
|
||||
otherSingulo.BeingDeletedByAnotherSingularity = true;
|
||||
}
|
||||
|
||||
entity.QueueDelete();
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(entity.Uid);
|
||||
|
||||
if (entity.TryGetComponent<SinguloFoodComponent>(out var singuloFood))
|
||||
component.Energy += singuloFood.Energy;
|
||||
|
||||
Reference in New Issue
Block a user