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

@@ -88,11 +88,8 @@ namespace Content.Server.Fluids.Components
_currentlyUsing.Remove(eventArgs.Using);
if (result == DoAfterStatus.Cancelled ||
(!_entMan.EntityExists(Owner) ? EntityLifeStage.Deleted : _entMan.GetComponent<MetaDataComponent>(Owner).EntityLifeStage) >= EntityLifeStage.Deleted ||
mopComponent.Deleted ||
CurrentVolume <= 0 ||
!Owner.InRangeUnobstructed(mopComponent.Owner))
if (result == DoAfterStatus.Cancelled || _entMan.Deleted(Owner) || mopComponent.Deleted ||
CurrentVolume <= 0 || !Owner.InRangeUnobstructed(mopComponent.Owner))
return false;
// Top up mops solution given it needs it to annihilate puddles I guess

View File

@@ -130,7 +130,7 @@ namespace Content.Server.Fluids.Components
Mopping = false;
if (result == DoAfterStatus.Cancelled ||
(!_entities.EntityExists(Owner) ? EntityLifeStage.Deleted : _entities.GetComponent<MetaDataComponent>(Owner).EntityLifeStage) >= EntityLifeStage.Deleted ||
_entities.Deleted(Owner) ||
puddleComponent.Deleted)
return false;

View File

@@ -57,7 +57,7 @@ namespace Content.Server.Fluids.EntitySystems
private void UpdateVisuals(EntityUid uid, PuddleComponent puddleComponent)
{
if ((!EntityManager.EntityExists(puddleComponent.Owner) ? EntityLifeStage.Deleted : EntityManager.GetComponent<MetaDataComponent>(puddleComponent.Owner).EntityLifeStage) >= EntityLifeStage.Deleted || EmptyHolder(uid, puddleComponent) ||
if (Deleted(puddleComponent.Owner) || EmptyHolder(uid, puddleComponent) ||
!EntityManager.TryGetComponent<AppearanceComponent>(uid, out var appearanceComponent))
{
return;