Draw MapAtmosphere gasses (#17688)

This commit is contained in:
metalgearsloth
2023-06-28 21:22:03 +10:00
committed by GitHub
parent 2488dd4ecd
commit 44a3db398b
11 changed files with 250 additions and 81 deletions

View File

@@ -1,10 +1,24 @@
using Content.Shared.Atmos.EntitySystems;
using JetBrains.Annotations;
using Content.Client.Atmos.Components;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
using Robust.Shared.GameStates;
namespace Content.Client.Atmos.EntitySystems
namespace Content.Client.Atmos.EntitySystems;
public sealed class AtmosphereSystem : SharedAtmosphereSystem
{
[UsedImplicitly]
public sealed class AtmosphereSystem : SharedAtmosphereSystem
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<MapAtmosphereComponent, ComponentHandleState>(OnMapHandleState);
}
private void OnMapHandleState(EntityUid uid, MapAtmosphereComponent component, ref ComponentHandleState args)
{
if (args.Current is not MapAtmosphereComponentState state)
return;
// Struct so should just copy by value.
component.OverlayData = state.Overlay;
}
}