20 lines
618 B
C#
20 lines
618 B
C#
public class DayRebirth : TargetedCompareRequirementBase
|
|
{
|
|
public override bool IsValid(MinEventParams _params)
|
|
{
|
|
if (!this.ParamsValid(_params))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
ulong worldTime = GameManager.Instance.World.worldTime;
|
|
ValueTuple<int, int, int> valueTuple = GameUtils.WorldTimeToElements(worldTime);
|
|
|
|
if (this.invert)
|
|
{
|
|
return !RequirementBase.compareValues(valueTuple.Item1, this.operation, (int)this.value);
|
|
}
|
|
return RequirementBase.compareValues(valueTuple.Item1, this.operation, (int)this.value);
|
|
}
|
|
}
|