CatStation/Content.Shared/Atmos/Components/GasTankComponent.cs
Princess Cheeseballs 77dd687183
The Grand Max Cap Rewrite (#43281)
* 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>
2026-04-19 05:22:42 +00:00

56 lines
1.7 KiB
C#

using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Atmos.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
public sealed partial class GasTankComponent : GasMaxPressureHolderComponent
{
private const float DefaultLowPressure = Atmospherics.OneAtmosphere;
public bool IsLowPressure => Air.Pressure <= TankLowPressure;
[DataField]
public SoundSpecifier? ConnectSound =
new SoundPathSpecifier("/Audio/Effects/internals.ogg")
{
Params = AudioParams.Default.WithVolume(5f),
};
[DataField]
public SoundSpecifier? DisconnectSound;
// Cancel toggles sounds if we re-toggle again.
public EntityUid? ConnectStream;
public EntityUid? DisconnectStream;
/// <summary>
/// Pressure at which tank should be considered 'low' such as for internals.
/// </summary>
[DataField]
public float TankLowPressure = DefaultLowPressure;
/// <summary>
/// Tank is connected to internals.
/// </summary>
[ViewVariables]
public bool IsConnected => User != null;
[DataField, AutoNetworkedField]
public EntityUid? User;
/// <summary>
/// True if this entity was recently moved out of a container. This might have been a hand -> inventory
/// transfer, or it might have been the user dropping the tank. This indicates the tank needs to be checked.
/// </summary>
[ViewVariables]
public bool CheckUser;
[DataField]
public EntProtoId ToggleAction = "ActionToggleInternals";
[DataField, AutoNetworkedField]
public EntityUid? ToggleActionEntity;
}