using Content.Server.Station.Systems; using Content.Shared.GameTicking.Rules; using Robust.Shared.Random; namespace Content.Server.GameTicking.Rules.VariationPass; /// /// Base class for procedural variation rule passes, which apply some kind of variation to a station, /// so we simply reduce the boilerplate for the event handling a bit with this. /// public abstract partial class VariationPassSystem : GameRuleSystem where T: IComponent { [Dependency] protected ServerStationSystem Stations = default!; [Dependency] protected IRobustRandom Random = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(ApplyVariation); } protected bool IsMemberOfStation(Entity ent, ref StationVariationPassEvent args) { return Stations.GetOwningStation(ent, ent.Comp) == args.Station.Owner; } protected abstract void ApplyVariation(Entity ent, ref StationVariationPassEvent args); }