mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* 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>
35 lines
1 KiB
C#
35 lines
1 KiB
C#
using Content.Shared.Atmos.Components;
|
|
using Content.Shared.Atmos.EntitySystems;
|
|
|
|
namespace Content.Client.Atmos.EntitySystems;
|
|
|
|
public sealed class GasTankSystem : SharedGasTankSystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<GasTankComponent, AfterAutoHandleStateEvent>(OnGasTankState);
|
|
}
|
|
|
|
protected override void DeviceUpdated(Entity<GasTankComponent> entity, ref AtmosDeviceUpdateEvent args)
|
|
{
|
|
// Atmos not predicted :(
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
private void OnGasTankState(Entity<GasTankComponent> ent, ref AfterAutoHandleStateEvent args)
|
|
{
|
|
if (UI.TryGetOpenUi(ent.Owner, SharedGasTankUiKey.Key, out var bui))
|
|
{
|
|
bui.Update<GasTankBoundUserInterfaceState>();
|
|
}
|
|
}
|
|
|
|
public override void UpdateUserInterface(Entity<GasTankComponent> ent)
|
|
{
|
|
if (UI.TryGetOpenUi(ent.Owner, SharedGasTankUiKey.Key, out var bui))
|
|
{
|
|
bui.Update<GasTankBoundUserInterfaceState>();
|
|
}
|
|
}
|
|
}
|