Prevent possible future game state bugs (#14323)

This commit is contained in:
Leon Friedrich
2023-03-02 04:26:37 +13:00
committed by GitHub
parent 17da1cafc6
commit 56ef88a913
2 changed files with 13 additions and 1 deletions

View File

@@ -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<RoundRestartCleanupEvent>(Reset);
SubscribeLocalEvent<GasTileOverlayComponent, ComponentGetState>(OnGetState);
SubscribeLocalEvent<GasTileOverlayComponent, ComponentStartup>(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()

View File

@@ -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<Vector2i, DecalChunk>? ChunkCollection(EntityUid gridEuid, DecalGridComponent? comp = null)