Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions Content.Client/Atmos/AlignAtmosPipeLayers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ public sealed class AlignAtmosPipeLayers : SnapgridCenter
private const float MouseDeadzoneRadius = 0.25f;

private Color _guideColor = new Color(0, 0, 0.5785f);
private const float GuideRadius = 0.1f;
private const float GuideOffset = 0.21875f;
// Carpmosia-start - 5 pipe layers
private const float GuideRadius = 0.05f;
private const float GuideOffset = 0.125f;
// Carpmosia-end - 5 pipe layers

public AlignAtmosPipeLayers(PlacementManager pMan) : base(pMan)
{
Expand Down Expand Up @@ -72,6 +74,10 @@ public override void Render(in OverlayDrawArgs args)
args.WorldHandle.DrawCircle(worldPosition, GuideRadius, _guideColor);
args.WorldHandle.DrawCircle(worldPosition + gridRotation.RotateVec(new Vector2(multi * GuideOffset, GuideOffset)), GuideRadius, _guideColor);
args.WorldHandle.DrawCircle(worldPosition - gridRotation.RotateVec(new Vector2(multi * GuideOffset, GuideOffset)), GuideRadius, _guideColor);
// Carpmosia-start - 5 pipe layers
args.WorldHandle.DrawCircle(worldPosition + gridRotation.RotateVec(new Vector2(multi * GuideOffset * 2, GuideOffset * 2)), GuideRadius, _guideColor);
args.WorldHandle.DrawCircle(worldPosition - gridRotation.RotateVec(new Vector2(multi * GuideOffset * 2, GuideOffset * 2)), GuideRadius, _guideColor);
// Carpmosia-end - 5 pipe layers
}

base.Render(args);
Expand Down Expand Up @@ -107,11 +113,20 @@ public override void AlignPlacementMode(ScreenCoordinates mouseScreen)
var mouseCoordsDiff = _unalignedMouseCoords.Position - MouseCoords.Position;
var layer = AtmosPipeLayer.Primary;

if (mouseCoordsDiff.Length() > MouseDeadzoneRadius)
if (mouseCoordsDiff.Length() > MouseDeadzoneRadius / 2) // Carpmosia-edit - 5 pipe layers
{
// Determine the direction of the mouse is relative to the center of the tile, adjusting for the player eye and grid rotation
var direction = (new Angle(mouseCoordsDiff) + _eyeManager.CurrentEye.Rotation + gridRotation + Math.PI / 2).GetCardinalDir();
layer = (direction == Direction.North || direction == Direction.East) ? AtmosPipeLayer.Secondary : AtmosPipeLayer.Tertiary;
// Carpmosia-start - 5 pipe layers
if (mouseCoordsDiff.Length() > MouseDeadzoneRadius)
{
layer = (direction == Direction.North || direction == Direction.East) ? AtmosPipeLayer.Quaternary : AtmosPipeLayer.Quinary;
}
else
{
layer = (direction == Direction.North || direction == Direction.East) ? AtmosPipeLayer.Secondary : AtmosPipeLayer.Tertiary;
}
// Carpmosia-end - 5 pipe layers
}

// Update the construction menu placer
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/SprayPainter/UI/SprayPainterWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public sealed partial class SprayPainterWindow : DefaultWindow
private SprayPainterDecals? _sprayPainterDecals;

private readonly SpriteSpecifier _colorEntryIconTexture = new SpriteSpecifier.Rsi(
new ResPath("Structures/Piping/Atmospherics/pipe.rsi"),
new ResPath("_Carpmosia/Structures/Piping/Atmospherics/pipe.rsi"), // Carpmosia-edit - 5 pipe layers
"pipeStraight");

public SprayPainterWindow()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace Content.Server.Atmos.Piping.Components;
public sealed partial class GasPipeManifoldComponent : Component
{
[DataField("inlets")]
public HashSet<string> InletNames { get; set; } = new() { "south0", "south1", "south2" };
public HashSet<string> InletNames { get; set; } = new() { "south0", "south1", "south2", "south3", "south4" }; // Carpmosia-edit - 5 pipe layers

[DataField("outlets")]
public HashSet<string> OutletNames { get; set; } = new() { "north0", "north1", "north2" };
public HashSet<string> OutletNames { get; set; } = new() { "north0", "north1", "north2", "north3", "north4" }; // Carpmosia-edit - 5 pipe layers
}
6 changes: 5 additions & 1 deletion Content.Shared/Atmos/Components/AtmosPipeLayersComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed partial class AtmosPipeLayersComponent : Component
/// in <see cref="AtmosPipeLayer"/>.
/// </summary>
[DataField]
public byte NumberOfPipeLayers = 3;
public byte NumberOfPipeLayers = 5; // Carpmosia-edit - 5 pipe layers

/// <summary>
/// Determines which layer the pipe is currently assigned.
Expand Down Expand Up @@ -158,4 +158,8 @@ public enum AtmosPipeLayer
Primary,
Secondary,
Tertiary,
// Carpmosia-start - 5 pipe layers
Quaternary,
Quinary,
// Carpmosia-end - 5 pipe layers
}
11 changes: 8 additions & 3 deletions Content.Shared/Atmos/Components/PipeAppearanceComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ namespace Content.Shared.Atmos.Components;
public sealed partial class PipeAppearanceComponent : Component
{
[DataField]
public SpriteSpecifier.Rsi[] Sprite = [new(new("Structures/Piping/Atmospherics/pipe.rsi"), "pipeConnector"),
new(new("Structures/Piping/Atmospherics/pipe_alt1.rsi"), "pipeConnector"),
new(new("Structures/Piping/Atmospherics/pipe_alt2.rsi"), "pipeConnector")];
public SpriteSpecifier.Rsi[] Sprite = [
// Carpmosia-start - 5 pipe layers
new(new("_Carpmosia/Structures/Piping/Atmospherics/pipe.rsi"), "pipeConnector"),
new(new("_Carpmosia/Structures/Piping/Atmospherics/pipe_alt1.rsi"), "pipeConnector"),
new(new("_Carpmosia/Structures/Piping/Atmospherics/pipe_alt2.rsi"), "pipeConnector"),
new(new("_Carpmosia/Structures/Piping/Atmospherics/pipe_alt3.rsi"), "pipeConnector"),
new(new("_Carpmosia/Structures/Piping/Atmospherics/pipe_alt4.rsi"), "pipeConnector")];
// Carpmosia-end - 5 pipe layers
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void OnGetVerb(Entity<AtmosPipeLayersComponent> ent, ref GetVerbsEvent<V

var v = new Verb
{
Priority = 1,
Priority = ent.Comp.NumberOfPipeLayers - i, // Carpmosia-edit - 5 pipe layers
Category = VerbCategory.Adjust,
Text = label,
Disabled = index == (int)ent.Comp.CurrentPipeLayer,
Expand Down Expand Up @@ -175,6 +175,16 @@ private void OnSettingPipeLayerCompleted(Entity<AtmosPipeLayersComponent> ent, r
public void SetNextPipeLayer(Entity<AtmosPipeLayersComponent> ent, EntityUid? user = null, EntityUid? used = null)
{
var newLayer = ((int)ent.Comp.CurrentPipeLayer + 1) % ent.Comp.NumberOfPipeLayers;
// Carpmosia-start - 5 pipe layers // Remapping to 1 2 4 5 3 for screwing convenience
if (ent.Comp.NumberOfPipeLayers == 5) {
if (ent.Comp.CurrentPipeLayer == AtmosPipeLayer.Secondary)
newLayer = 3;
if (ent.Comp.CurrentPipeLayer == AtmosPipeLayer.Quinary)
newLayer = 2;
if (ent.Comp.CurrentPipeLayer == AtmosPipeLayer.Tertiary)
newLayer = 0;
}
// Carpmosia-end - 5 pipe layers
SetPipeLayer(ent, (AtmosPipeLayer)newLayer, user, used);
}

Expand Down
10 changes: 7 additions & 3 deletions Content.Shared/DrawDepth/DrawDepth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ public enum DrawDepth
/// <summary>
/// This is for sub-floors, the floors you see after prying off a tile.
/// </summary>
LowFloors = DrawDepthTag.Default - 20,
LowFloors = DrawDepthTag.Default - 22, // Carpmosia-edit - 5 pipe layers

// various entity types that require different
// draw depths, as to avoid hiding
#region SubfloorEntities
ThickPipe = DrawDepthTag.Default - 19,
ThickWire = DrawDepthTag.Default - 18,
// Carpmosia-start - 5 pipe layers
ThickPipe = DrawDepthTag.Default - 21,
ThickWire = DrawDepthTag.Default - 20,
ThinPipeAlt4 = DrawDepthTag.Default - 19,
ThinPipeAlt3 = DrawDepthTag.Default - 18,
// Carpmosia-end - 5 pipe layers
ThinPipeAlt2 = DrawDepthTag.Default - 17,
ThinPipeAlt1 = DrawDepthTag.Default - 16,
ThinPipe = DrawDepthTag.Default - 15,
Expand Down
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/_Carpmosia/atmos/atmos-pipe-layers.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
atmos-pipe-layers-component-layer-quaternary = quaternary
atmos-pipe-layers-component-layer-quinary = quinary
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/_Starlight/inline-filter.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
inline-gas-filter = inline gas filter
inline-gas-filter-desc = Filters gases from a pipenet without splitting it in two.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
noRot: true
offset: 0, 0.5
layers:
- sprite: Structures/Piping/Atmospherics/pipe.rsi
- sprite: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi # Carpmosia-edit - 5 pipe layers
state: pipeHalf
offset: 0, -0.5
map: [ "enum.PipeVisualLayers.Pipe" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
visibleLayers:
- enum.SubfloorLayers.FirstLayer
- type: Sprite
sprite: Structures/Piping/Atmospherics/pump.rsi
sprite: _Carpmosia/Structures/Piping/Atmospherics/pump.rsi # Carpmosia-edit - 5 pipe layers
layers:
- sprite: Structures/Piping/Atmospherics/pipe.rsi
- sprite: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi # Carpmosia-edit - 5 pipe layers
state: pipeStraight
map: [ "enum.PipeVisualLayers.Pipe" ]
- state: pumpPressure
Expand All @@ -60,6 +60,10 @@
Primary: GasPressurePump
Secondary: GasPressurePumpAlt1
Tertiary: GasPressurePumpAlt2
# Carpmosia-start - 5 pipe layers
Quaternary: GasPressurePumpAlt3
Quinary: GasPressurePumpAlt4
# Carpmosia-end - 5 pipe layers
- type: Appearance
- type: GenericVisualizer
visuals:
Expand Down Expand Up @@ -112,9 +116,9 @@
visibleLayers:
- enum.SubfloorLayers.FirstLayer
- type: Sprite
sprite: Structures/Piping/Atmospherics/pump.rsi
sprite: _Carpmosia/Structures/Piping/Atmospherics/pump.rsi # Carpmosia-edit - 5 pipe layers
layers:
- sprite: Structures/Piping/Atmospherics/pipe.rsi
- sprite: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi # Carpmosia-edit - 5 pipe layers
state: pipeStraight
map: [ "enum.PipeVisualLayers.Pipe" ]
- state: pumpVolume
Expand All @@ -124,6 +128,10 @@
Primary: GasVolumePump
Secondary: GasVolumePumpAlt1
Tertiary: GasVolumePumpAlt2
# Carpmosia-start - 5 pipe layers
Quaternary: GasVolumePumpAlt3
Quinary: GasVolumePumpAlt4
# Carpmosia-end - 5 pipe layers
- type: Appearance
- type: GenericVisualizer
visuals:
Expand Down Expand Up @@ -180,9 +188,9 @@
visibleLayers:
- enum.SubfloorLayers.FirstLayer
- type: Sprite
sprite: Structures/Piping/Atmospherics/pump.rsi
sprite: _Carpmosia/Structures/Piping/Atmospherics/pump.rsi # Carpmosia-edit - 5 pipe layers
layers:
- sprite: Structures/Piping/Atmospherics/pipe.rsi
- sprite: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi # Carpmosia-edit - 5 pipe layers
state: pipeStraight
map: [ "enum.PipeVisualLayers.Pipe" ]
- state: pumpPressureRegulator
Expand All @@ -192,6 +200,10 @@
Primary: GasPressureRegulator
Secondary: GasPressureRegulatorAlt1
Tertiary: GasPressureRegulatorAlt2
# Carpmosia-start - 5 pipe layers
Quaternary: GasPressureRegulatorAlt3
Quinary: GasPressureRegulatorAlt4
# Carpmosia-end - 5 pipe layers
- type: Appearance
- type: GenericVisualizer
visuals:
Expand Down Expand Up @@ -238,9 +250,9 @@
visibleLayers:
- enum.SubfloorLayers.FirstLayer
- type: Sprite
sprite: Structures/Piping/Atmospherics/pump.rsi
sprite: _Carpmosia/Structures/Piping/Atmospherics/pump.rsi # Carpmosia-edit - 5 pipe layers
layers:
- sprite: Structures/Piping/Atmospherics/pipe.rsi
- sprite: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi # Carpmosia-edit - 5 pipe layers
state: pipeStraight
map: [ "enum.PipeVisualLayers.Pipe" ]
- state: pumpPassiveGate
Expand All @@ -250,6 +262,10 @@
Primary: GasPassiveGate
Secondary: GasPassiveGateAlt1
Tertiary: GasPassiveGateAlt2
# Carpmosia-start - 5 pipe layers
Quaternary: GasPassiveGateAlt3
Quinary: GasPassiveGateAlt4
# Carpmosia-end - 5 pipe layers
- type: Appearance
- type: PipeColorVisuals
- type: GasPassiveGate
Expand Down Expand Up @@ -281,9 +297,9 @@
visibleLayers:
- enum.SubfloorLayers.FirstLayer
- type: Sprite
sprite: Structures/Piping/Atmospherics/pump.rsi
sprite: _Carpmosia/Structures/Piping/Atmospherics/pump.rsi # Carpmosia-edit - 5 pipe layers
layers:
- sprite: Structures/Piping/Atmospherics/pipe.rsi
- sprite: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi # Carpmosia-edit - 5 pipe layers
state: pipeStraight
map: [ "enum.PipeVisualLayers.Pipe" ]
- state: pumpManualValve
Expand All @@ -293,6 +309,10 @@
Primary: GasValve
Secondary: GasValveAlt1
Tertiary: GasValveAlt2
# Carpmosia-start - 5 pipe layers
Quaternary: GasValveAlt3
Quinary: GasValveAlt4
# Carpmosia-end - 5 pipe layers
- type: Appearance
- type: GenericVisualizer
visuals:
Expand Down Expand Up @@ -342,9 +362,9 @@
visibleLayers:
- enum.SubfloorLayers.FirstLayer
- type: Sprite
sprite: Structures/Piping/Atmospherics/pump.rsi
sprite: _Carpmosia/Structures/Piping/Atmospherics/pump.rsi # Carpmosia-edit - 5 pipe layers
layers:
- sprite: Structures/Piping/Atmospherics/pipe.rsi
- sprite: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi # Carpmosia-edit - 5 pipe layers
state: pipeStraight
map: [ "enum.PipeVisualLayers.Pipe" ]
- state: pumpSignalValve
Expand All @@ -354,6 +374,10 @@
Primary: SignalControlledValve
Secondary: SignalControlledValveAlt1
Tertiary: SignalControlledValveAlt2
# Carpmosia-start - 5 pipe layers
Quaternary: SignalControlledValveAlt3
Quinary: SignalControlledValveAlt4
# Carpmosia-end - 5 pipe layers
- type: Appearance
- type: GenericVisualizer
visuals:
Expand Down Expand Up @@ -415,7 +439,7 @@
- type: Sprite
sprite: Structures/Piping/Atmospherics/gascanisterport.rsi
layers:
- sprite: Structures/Piping/Atmospherics/pipe.rsi
- sprite: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi # Carpmosia-edit - 5 pipe layers
state: pipeUnaryConnectors
map: [ "enum.PipeVisualLayers.Pipe" ]
- state: gasCanisterPort
Expand Down Expand Up @@ -527,9 +551,13 @@
- type: AtmosPipeLayers
spriteLayersRsiPaths:
enum.PipeVisualLayers.Pipe:
Primary: Structures/Piping/Atmospherics/pipe.rsi
Secondary: Structures/Piping/Atmospherics/pipe_alt1.rsi
Tertiary: Structures/Piping/Atmospherics/pipe_alt2.rsi
# Carpmosia-start - 5 pipe layers
Primary: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi
Secondary: _Carpmosia/Structures/Piping/Atmospherics/pipe_alt1.rsi
Tertiary: _Carpmosia/Structures/Piping/Atmospherics/pipe_alt2.rsi
Quaternary: _Carpmosia/Structures/Piping/Atmospherics/pipe_alt3.rsi
Quinary: _Carpmosia/Structures/Piping/Atmospherics/pipe_alt4.rsi
# Carpmosia-end - 5 pipe layers
- type: Appearance
- type: GenericVisualizer
visuals:
Expand Down Expand Up @@ -586,13 +614,18 @@
placement:
mode: SnapgridCenter
components:
# Carpmosia-start - Atmos stacking
- type: Tag
tags:
- Unstackable
# Carpmosia-end - Atmos stacking
- type: Rotatable
- type: Transform
noRot: false
- type: Sprite
sprite: Structures/Piping/Atmospherics/heatexchanger.rsi
sprite: _Carpmosia/Structures/Piping/Atmospherics/heatexchanger.rsi # Carpmosia-edit - 5 pipe layers
layers:
- sprite: Structures/Piping/Atmospherics/pipe.rsi
- sprite: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi # Carpmosia-edit - 5 pipe layers
state: pipeStraight
map: [ "enum.PipeVisualLayers.Pipe" ]
- state: heStraight
Expand Down Expand Up @@ -636,7 +669,7 @@
- enum.SubfloorLayers.FirstLayer
- type: Sprite
layers:
- sprite: Structures/Piping/Atmospherics/pipe.rsi
- sprite: _Carpmosia/Structures/Piping/Atmospherics/pipe.rsi # Carpmosia-edit - 5 pipe layers
state: pipeBend
map: [ "enum.PipeVisualLayers.Pipe" ]
- state: heBend
Expand Down
Loading
Loading