using Content.Shared.Weather; using Robust.Server.GameStates; namespace Content.Server.Weather; public sealed partial class WeatherSystem : SharedWeatherSystem { //I dont really like to PVS override weather entities, but map status effect containers dont PVS-ing out of the box [Dependency] private PvsOverrideSystem _pvs = default!; public override void Initialize() { SubscribeLocalEvent(OnCompInit); SubscribeLocalEvent(OnCompShutdown); } private void OnCompInit(Entity ent, ref ComponentInit args) { // The map entitiy itself is networked by PVS if the player is on that map but not anything inside a container, // So we need to add an overridce to make sure the client sees it. _pvs.AddGlobalOverride(ent); } private void OnCompShutdown(Entity ent, ref ComponentShutdown args) { _pvs.RemoveGlobalOverride(ent); } }