2023-06-28 21:22:03 +10:00
|
|
|
|
using Content.Client.Atmos.Components;
|
|
|
|
|
|
using Content.Shared.Atmos.Components;
|
|
|
|
|
|
using Content.Shared.Atmos.EntitySystems;
|
|
|
|
|
|
using Robust.Shared.GameStates;
|
2020-08-25 16:14:26 +02:00
|
|
|
|
|
2023-06-28 21:22:03 +10:00
|
|
|
|
namespace Content.Client.Atmos.EntitySystems;
|
|
|
|
|
|
|
|
|
|
|
|
public sealed class AtmosphereSystem : SharedAtmosphereSystem
|
2020-08-25 16:14:26 +02:00
|
|
|
|
{
|
2023-06-28 21:22:03 +10:00
|
|
|
|
public override void Initialize()
|
2020-08-25 16:14:26 +02:00
|
|
|
|
{
|
2023-06-28 21:22:03 +10:00
|
|
|
|
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;
|
2020-08-25 16:14:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|