Inline QueueDelete

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:43:22 +01:00
parent e3227546b3
commit c2e6da1e54
18 changed files with 26 additions and 22 deletions

View File

@@ -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);
});
}
}

View File

@@ -45,7 +45,7 @@ namespace Content.Server.Chemistry.EntitySystems
ent.Transform.AttachToGridOrMap();
}
owner.QueueDelete();
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(owner.Uid);
}
}
}

View File

@@ -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);
}
}
}

View File

@@ -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;
}

View File

@@ -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);
}
}