Files

39 lines
1.1 KiB
C#
Raw Permalink Normal View History

using Content.Shared._White.Cult.Components;
namespace Content.Shared._White.Cult.Systems;
2024-01-27 15:19:52 +03:00
/// <summary>
/// Thats need for chat perms update
/// </summary>
public sealed class CultistSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ConstructComponent, ComponentStartup>(OnInit);
SubscribeLocalEvent<ConstructComponent, ComponentShutdown>(OnRemove);
SubscribeLocalEvent<CultistComponent, ComponentStartup>(OnInit);
SubscribeLocalEvent<CultistComponent, ComponentShutdown>(OnRemove);
2024-01-27 15:19:52 +03:00
}
private void OnInit<T>(EntityUid uid, T component, ComponentStartup args)
2024-01-27 15:19:52 +03:00
{
RaiseLocalEvent(new EventCultistComponentState(true));
}
private void OnRemove<T>(EntityUid uid, T component, ComponentShutdown args)
2024-01-27 15:19:52 +03:00
{
RaiseLocalEvent(new EventCultistComponentState(false));
}
}
public sealed class EventCultistComponentState
{
public bool Created { get; }
public EventCultistComponentState(bool state)
{
Created = state;
}
}