Fix weird lifestage autorefactors.

This commit is contained in:
Vera Aguilera Puerto
2021-12-09 12:29:27 +01:00
parent 3a9e1ff929
commit 8b09d55b10
43 changed files with 55 additions and 69 deletions

View File

@@ -94,7 +94,7 @@ namespace Content.Server.Explosion.Components
return false;
Owner.SpawnTimer((int) (_delay * 1000), () =>
{
if ((!_entMan.EntityExists(Owner) ? EntityLifeStage.Deleted : _entMan.GetComponent<MetaDataComponent>(Owner).EntityLifeStage) >= EntityLifeStage.Deleted)
if (_entMan.Deleted(Owner))
return;
_countDown = true;
var random = IoCManager.Resolve<IRobustRandom>();

View File

@@ -130,7 +130,7 @@ namespace Content.Server.Explosion.EntitySystems
// and splitted into two lists based on if they are Impassable or not
foreach (var entity in entitiesInRange)
{
if ((!EntityManager.EntityExists(entity) ? EntityLifeStage.Deleted : EntityManager.GetComponent<MetaDataComponent>(entity).EntityLifeStage) >= EntityLifeStage.Deleted || entity.IsInContainer())
if (Deleted(entity) || entity.IsInContainer())
{
continue;
}