Inline Deleted

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:30:03 +01:00
parent 149707a566
commit b2035543e2
60 changed files with 94 additions and 79 deletions

View File

@@ -105,7 +105,7 @@ namespace Content.Server.Morgue.Components
_cremateCancelToken = new CancellationTokenSource();
Owner.SpawnTimer(_burnMilis, () =>
{
if (Owner.Deleted)
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(Owner.Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(Owner.Uid).EntityLifeStage) >= EntityLifeStage.Deleted)
return;
Appearance?.SetData(CrematoriumVisuals.Burning, false);

View File

@@ -1,5 +1,6 @@
using Content.Shared.Interaction;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.ViewVariables;
namespace Content.Server.Morgue.Components
@@ -15,7 +16,7 @@ namespace Content.Server.Morgue.Components
void IActivate.Activate(ActivateEventArgs eventArgs)
{
if (Morgue != null && !Morgue.Deleted && Morgue.TryGetComponent<MorgueEntityStorageComponent>(out var comp))
if (Morgue != null && !((!IoCManager.Resolve<IEntityManager>().EntityExists(Morgue.Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(Morgue.Uid).EntityLifeStage) >= EntityLifeStage.Deleted) && Morgue.TryGetComponent<MorgueEntityStorageComponent>(out var comp))
{
comp.Activate(new ActivateEventArgs(eventArgs.User, Morgue));
}