Files
tbd-station-14/Content.Shared/Atmos/EntitySystems/SharedAtmosPipeAppearanceSystem.cs
chromiumboy 45012cbe1d Layering for atmospheric pipes (#36124)
Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
2025-06-01 22:01:43 -07:00

19 lines
807 B
C#

using Content.Shared.Atmos.Components;
namespace Content.Shared.Atmos.EntitySystems;
public abstract partial class SharedAtmosPipeAppearanceSystem : EntitySystem
{
/// <summary>
/// Returns the max number of pipe layers supported by a entity.
/// </summary>
/// <param name="uid">The entity being checked.</param>
/// <param name="atmosPipeLayers">The entity's <see cref="AtmosPipeLayersComponent"/>, if available.</param>
/// <returns>Returns <see cref="AtmosPipeLayersComponent.NumberOfPipeLayers"/>
/// if the entity has the component, or 1 if it does not.</returns>
protected int GetNumberOfPipeLayers(EntityUid uid, out AtmosPipeLayersComponent? atmosPipeLayers)
{
return TryComp(uid, out atmosPipeLayers) ? atmosPipeLayers.NumberOfPipeLayers : 1;
}
}