Inline IsValid

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:32:53 +01:00
parent 1b13e5e0ec
commit 2d130e31d6
8 changed files with 17 additions and 11 deletions

View File

@@ -146,7 +146,13 @@ namespace Content.Client.DoAfter.UI
{
base.FrameUpdate(args);
if (AttachedEntity?.IsValid() != true ||
IEntity? tempQualifier = AttachedEntity;
if (tempQualifier != null)
{
IoCManager.Resolve<IEntityManager>().EntityExists(tempQualifier.Uid);
}
if (RETURNED_VALUE != true ||
!AttachedEntity.TryGetComponent(out DoAfterComponent? doAfterComponent))
{
Visible = false;