Files
7d2dXG/Mods/zzz_REBIRTH__Utils/Scripts/Requirements/IsSleeping.cs
Nathaniel Cosford 062dfab2cd Patched
2025-05-30 01:04:40 +09:30

26 lines
610 B
C#

using UnityEngine.Scripting;
[Preserve]
public class IsSleeping : TargetedCompareRequirementBase
{
public override bool IsValid(MinEventParams _params)
{
if (!base.IsValid(_params))
{
return false;
}
EntityAlive entityAlive = this.target as EntityAlive;
if (entityAlive == null)
{
return false;
}
//Log.Out("IsSleeping entityAlive.IsSleeping: " + entityAlive.IsSleeping);
if (!this.invert)
{
return entityAlive.IsSleeping;
}
return !entityAlive.IsSleeping;
}
}