From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Wed, 1 Mar 2023 15:26:37 +0000 (+1300) Subject: Prevent possible future game state bugs (#14323) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=56ef88a9132a4db581074b7697d3618e0123a590;p=space-station-14.git Prevent possible future game state bugs (#14323) --- diff --git a/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs b/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs index 70b145512d..a4220a0271 100644 --- a/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs +++ b/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs @@ -26,7 +26,7 @@ using Robust.Shared.Utility; namespace Content.Server.Atmos.EntitySystems { [UsedImplicitly] - internal sealed class GasTileOverlaySystem : SharedGasTileOverlaySystem + public sealed class GasTileOverlaySystem : SharedGasTileOverlaySystem { [Robust.Shared.IoC.Dependency] private readonly IGameTiming _gameTiming = default!; [Robust.Shared.IoC.Dependency] private readonly IPlayerManager _playerManager = default!; @@ -65,6 +65,14 @@ namespace Content.Server.Atmos.EntitySystems SubscribeLocalEvent(Reset); SubscribeLocalEvent(OnGetState); + SubscribeLocalEvent(OnStartup); + } + + private void OnStartup(EntityUid uid, GasTileOverlayComponent component, ComponentStartup args) + { + // This **shouldn't** be required, but just in case we ever get entity prototypes that have gas overlays, we + // need to ensure that we send an initial full state to players. + Dirty(component); } public override void Shutdown() diff --git a/Content.Shared/Decals/SharedDecalSystem.cs b/Content.Shared/Decals/SharedDecalSystem.cs index 7043a7b396..29f628c7ae 100644 --- a/Content.Shared/Decals/SharedDecalSystem.cs +++ b/Content.Shared/Decals/SharedDecalSystem.cs @@ -38,6 +38,10 @@ namespace Content.Shared.Decals component.DecalIndex[decalUid] = indices; } } + + // This **shouldn't** be required, but just in case we ever get entity prototypes that have decal grids, we + // need to ensure that we send an initial full state to players. + Dirty(component); } protected Dictionary? ChunkCollection(EntityUid gridEuid, DecalGridComponent? comp = null)