mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-06-09 10:06:46 +02:00
77dd687183
* Working commit * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * fix the tests I broke * Remove methods that the client shouldn't be calling. Hamburger. * light cleanup for now * review * whoop * Commit this shit * More stages. Something something, hamburger. * last of the sprites. Now it's just lights, shaking, and sounds * move comments * bomb * fuck it I'm done * whoops! * fix test fails * review * actually this is better™️ * forgot about you! * remove unused space * make it actually build smile * borger * grah!!!! * review time * Adj powerfactor --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using Content.Client.Atmos.UI;
|
|
using Content.Shared.Atmos.Components;
|
|
using Content.Shared.Atmos.Piping.Binary.Components;
|
|
using Content.Shared.Atmos.Piping.Unary.Components;
|
|
using Content.Shared.Atmos.Piping.Unary.Systems;
|
|
using Content.Shared.NodeContainer;
|
|
|
|
namespace Content.Client.Atmos.Piping.Unary.Systems;
|
|
|
|
public sealed class GasCanisterSystem : SharedGasCanisterSystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<GasCanisterComponent, AfterAutoHandleStateEvent>(OnGasState);
|
|
}
|
|
|
|
protected override void DeviceUpdated(Entity<GasCanisterComponent> entity, ref AtmosDeviceUpdateEvent args)
|
|
{
|
|
// Atmos not predicted :(
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
private void OnGasState(Entity<GasCanisterComponent> ent, ref AfterAutoHandleStateEvent args)
|
|
{
|
|
if (UI.TryGetOpenUi<GasCanisterBoundUserInterface>(ent.Owner, GasCanisterUiKey.Key, out var bui))
|
|
{
|
|
bui.Update<GasCanisterBoundUserInterfaceState>();
|
|
}
|
|
}
|
|
|
|
protected override void DirtyUI(EntityUid uid, GasCanisterComponent? component = null, NodeContainerComponent? nodes = null)
|
|
{
|
|
if (UI.TryGetOpenUi<GasCanisterBoundUserInterface>(uid, GasCanisterUiKey.Key, out var bui))
|
|
{
|
|
bui.Update<GasCanisterBoundUserInterfaceState>();
|
|
}
|
|
}
|
|
}
|