Files
crystall-punk-14/Content.Shared/_CP14/Random/Rules/IsDaylight.cs
Ed ca318a1849 Cucumber! Potato! (#430)
* some ambient loops tweak

* cucumber! potato!

* seed craft

* fix CLA

* Update CP14DayCycleSystem.cs

* Update CP14DayCycleSystem.cs

* weather
2024-09-01 16:14:56 +03:00

21 lines
561 B
C#

using Content.Shared._CP14.DayCycle;
using Content.Shared.Random.Rules;
namespace Content.Shared._CP14.Random.Rules;
/// <summary>
/// Returns true if the attached entity is in space.
/// </summary>
public sealed partial class IsDaylight : RulesRule
{
public override bool Check(EntityManager entManager, EntityUid uid)
{
var dayCycle = entManager.System<CP14SharedDayCycleSystem>();
if (Inverted)
return !dayCycle.TryDaylightThere(uid, true);
else
return dayCycle.TryDaylightThere(uid, true);
}
}