using Content.Shared._CP14.Religion.Components; using Content.Shared._CP14.Religion.Prototypes; using Robust.Shared.Prototypes; namespace Content.Shared._CP14.Religion.Systems; public abstract partial class CP14SharedReligionGodSystem : EntitySystem { [Dependency] private readonly SharedTransformSystem _transform = default!; [Dependency] private readonly IPrototypeManager _proto = default!; public override void Initialize() { base.Initialize(); InitializeObservation(); InitializeFollowers(); InitializeAltars(); } public HashSet> GetGods(ProtoId religion) { HashSet> gods = new(); var query = EntityQueryEnumerator(); while (query.MoveNext(out var uid, out var god)) { if (god.Religion != religion) continue; gods.Add(new Entity(uid, god)); } return gods; } public abstract void SendMessageToGods(ProtoId religion, string msg, EntityUid source); } /// /// It is invoked on altars and followers when they change their religion. /// public sealed class CP14ReligionChangedEvent(ProtoId? oldRel, ProtoId? newRel) : EntityEventArgs { public ProtoId? OldReligion = oldRel; public ProtoId? NewReligion = newRel; }