Files
crystall-punk-14/Content.Server/_CP14/Lighthouse/CP14LighthouseSystem.cs
Ed 52a0f44aa1 Bank progression mechanic (#633)
* bank progression mechanic

* loc fix

* minor random fixes

* minor tweaks

* lighthouse

* Vladimirs Alerts!

* offset alerts

* lighthouse
2024-12-07 00:39:05 +03:00

24 lines
759 B
C#

using Robust.Server.GameStates;
namespace Content.Server._CP14.Lighthouse;
public sealed partial class CP14LighthouseSystem : EntitySystem
{
[Dependency] private readonly PvsOverrideSystem _pvs = default!;
public override void Initialize()
{
SubscribeLocalEvent<CP14LighthouseComponent, ComponentStartup>(OnLighthouseStartup);
SubscribeLocalEvent<CP14LighthouseComponent, ComponentShutdown>(OnLighthouseShutdown);
}
private void OnLighthouseShutdown(Entity<CP14LighthouseComponent> ent, ref ComponentShutdown args)
{
_pvs.RemoveGlobalOverride(ent);
}
private void OnLighthouseStartup(Entity<CP14LighthouseComponent> ent, ref ComponentStartup args)
{
_pvs.AddGlobalOverride(ent);
}
}