mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
* PROJECT 0 WARNINGS: Resolve `'EntitySystem.Get<T>()' is obsolete` in content * pass entman * dog ass test * webeditor (cherry picked from commit 993eef1e7c22b2b79e528967ef5bb669f50236b1)
18 lines
506 B
C#
18 lines
506 B
C#
using System.Linq;
|
|
using Content.Server.Holiday;
|
|
|
|
namespace Content.Server.Maps.Conditions;
|
|
|
|
public sealed partial class HolidayMapCondition : GameMapCondition
|
|
{
|
|
[DataField("holidays")]
|
|
public string[] Holidays { get; private set; } = default!;
|
|
|
|
public override bool Check(GameMapPrototype map)
|
|
{
|
|
var holidaySystem = IoCManager.Resolve<IEntityManager>().System<HolidaySystem>();
|
|
|
|
return Holidays.Any(holiday => holidaySystem.IsCurrentlyHoliday(holiday)) ^ Inverted;
|
|
}
|
|
}
|