Removes half-implemented ConduitLayer from piping (#2957)
Co-authored-by: py01 <pyronetics01@gmail.com>
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Shared.GameObjects.Components.Atmos;
|
using Content.Shared.GameObjects.Components.Atmos;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Client.GameObjects;
|
using Robust.Client.GameObjects;
|
||||||
@@ -62,7 +62,6 @@ namespace Content.Client.GameObjects.Components.Atmos
|
|||||||
{
|
{
|
||||||
var stateId = "pipe";
|
var stateId = "pipe";
|
||||||
stateId += pipeVisualState.PipeDirection.PipeDirectionToPipeShape().ToString();
|
stateId += pipeVisualState.PipeDirection.PipeDirectionToPipeShape().ToString();
|
||||||
stateId += (int) pipeVisualState.ConduitLayer;
|
|
||||||
return stateId;
|
return stateId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace Content.Server.GameObjects.Components.Atmos.Piping.Pumps
|
|||||||
private void UpdateAppearance()
|
private void UpdateAppearance()
|
||||||
{
|
{
|
||||||
if (_inletPipe == null || _outletPipe == null) return;
|
if (_inletPipe == null || _outletPipe == null) return;
|
||||||
_appearance?.SetData(PumpVisuals.VisualState, new PumpVisualState(_initialInletDirection, _initialOutletDirection, _inletPipe.ConduitLayer, _outletPipe.ConduitLayer, PumpEnabled));
|
_appearance?.SetData(PumpVisuals.VisualState, new PumpVisualState(_initialInletDirection, _initialOutletDirection, PumpEnabled));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetPipes()
|
private void SetPipes()
|
||||||
|
|||||||
@@ -22,12 +22,6 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
|||||||
public PipeDirection PipeDirection { get => _pipeDirection; set => SetPipeDirection(value); }
|
public PipeDirection PipeDirection { get => _pipeDirection; set => SetPipeDirection(value); }
|
||||||
private PipeDirection _pipeDirection;
|
private PipeDirection _pipeDirection;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Controls what visuals are applied in <see cref="PipeVisualizer"/>.
|
|
||||||
/// </summary>
|
|
||||||
public ConduitLayer ConduitLayer => _conduitLayer;
|
|
||||||
private ConduitLayer _conduitLayer;
|
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
private IPipeNet _pipeNet = PipeNet.NullNet;
|
private IPipeNet _pipeNet = PipeNet.NullNet;
|
||||||
|
|
||||||
@@ -69,7 +63,6 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
|||||||
base.ExposeData(serializer);
|
base.ExposeData(serializer);
|
||||||
serializer.DataField(ref _pipeDirection, "pipeDirection", PipeDirection.None);
|
serializer.DataField(ref _pipeDirection, "pipeDirection", PipeDirection.None);
|
||||||
serializer.DataField(this, x => x.LocalAir, "gasMixture", new GasMixture(DefaultVolume));
|
serializer.DataField(this, x => x.LocalAir, "gasMixture", new GasMixture(DefaultVolume));
|
||||||
serializer.DataField(ref _conduitLayer, "conduitLayer", ConduitLayer.Two);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Initialize(IEntity owner)
|
public override void Initialize(IEntity owner)
|
||||||
@@ -138,7 +131,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
|||||||
|
|
||||||
private void UpdateAppearance()
|
private void UpdateAppearance()
|
||||||
{
|
{
|
||||||
_appearance?.SetData(PipeVisuals.VisualState, new PipeVisualState(PipeDirection, ConduitLayer));
|
_appearance?.SetData(PipeVisuals.VisualState, new PipeVisualState(PipeDirection));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetPipeDirection(PipeDirection pipeDirection)
|
private void SetPipeDirection(PipeDirection pipeDirection)
|
||||||
|
|||||||
@@ -14,12 +14,10 @@ namespace Content.Shared.GameObjects.Components.Atmos
|
|||||||
public class PipeVisualState
|
public class PipeVisualState
|
||||||
{
|
{
|
||||||
public readonly PipeDirection PipeDirection;
|
public readonly PipeDirection PipeDirection;
|
||||||
public readonly ConduitLayer ConduitLayer;
|
|
||||||
|
|
||||||
public PipeVisualState(PipeDirection pipeDirection, ConduitLayer conduitLayer)
|
public PipeVisualState(PipeDirection pipeDirection)
|
||||||
{
|
{
|
||||||
PipeDirection = pipeDirection;
|
PipeDirection = pipeDirection;
|
||||||
ConduitLayer = conduitLayer;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,13 +63,6 @@ namespace Content.Shared.GameObjects.Components.Atmos
|
|||||||
Fourway
|
Fourway
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ConduitLayer
|
|
||||||
{
|
|
||||||
One = 1,
|
|
||||||
Two = 2,
|
|
||||||
Three = 3,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class PipeDirectionHelpers
|
public static class PipeDirectionHelpers
|
||||||
{
|
{
|
||||||
public const int PipeDirections = 4;
|
public const int PipeDirections = 4;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
|
|
||||||
namespace Content.Shared.GameObjects.Components.Atmos
|
namespace Content.Shared.GameObjects.Components.Atmos
|
||||||
@@ -14,16 +14,12 @@ namespace Content.Shared.GameObjects.Components.Atmos
|
|||||||
{
|
{
|
||||||
public readonly PipeDirection InletDirection;
|
public readonly PipeDirection InletDirection;
|
||||||
public readonly PipeDirection OutletDirection;
|
public readonly PipeDirection OutletDirection;
|
||||||
public readonly ConduitLayer InletConduitLayer;
|
|
||||||
public readonly ConduitLayer OutletConduitLayer;
|
|
||||||
public readonly bool PumpEnabled;
|
public readonly bool PumpEnabled;
|
||||||
|
|
||||||
public PumpVisualState(PipeDirection inletDirection, PipeDirection outletDirection, ConduitLayer inletConduitLayer, ConduitLayer outletConduitLayer, bool pumpEnabled)
|
public PumpVisualState(PipeDirection inletDirection, PipeDirection outletDirection, bool pumpEnabled)
|
||||||
{
|
{
|
||||||
InletDirection = inletDirection;
|
InletDirection = inletDirection;
|
||||||
OutletDirection = outletDirection;
|
OutletDirection = outletDirection;
|
||||||
InletConduitLayer = inletConduitLayer;
|
|
||||||
OutletConduitLayer = outletConduitLayer;
|
|
||||||
PumpEnabled = pumpEnabled;
|
PumpEnabled = pumpEnabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
abstract: true
|
abstract: true
|
||||||
id: PipeBase
|
id: PipeBase
|
||||||
name: Pipe
|
name: Pipe
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
nodeGroupID: Pipe
|
nodeGroupID: Pipe
|
||||||
pipeDirection: East
|
pipeDirection: East
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: pipeHalf2
|
state: pipeHalf
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: PipeBase
|
parent: PipeBase
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
nodeGroupID: Pipe
|
nodeGroupID: Pipe
|
||||||
pipeDirection: Lateral
|
pipeDirection: Lateral
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: pipeStraight2
|
state: pipeStraight
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: PipeBase
|
parent: PipeBase
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
nodeGroupID: Pipe
|
nodeGroupID: Pipe
|
||||||
pipeDirection: SEBend
|
pipeDirection: SEBend
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: pipeBend2
|
state: pipeBend
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: PipeBase
|
parent: PipeBase
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
nodeGroupID: Pipe
|
nodeGroupID: Pipe
|
||||||
pipeDirection: TEast
|
pipeDirection: TEast
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: pipeTJunction2
|
state: pipeTJunction
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: PipeBase
|
parent: PipeBase
|
||||||
@@ -91,4 +91,4 @@
|
|||||||
nodeGroupID: Pipe
|
nodeGroupID: Pipe
|
||||||
pipeDirection: Fourway
|
pipeDirection: Fourway
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: pipeFourway2
|
state: pipeFourway
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"copyright":"Taken from https://github.com/tgstation/tgstation at commit 57cd1d59ca019dd0e7811ac451f295f818e573da",
|
"copyright":"Taken from https://github.com/tgstation/tgstation at commit 57cd1d59ca019dd0e7811ac451f295f818e573da",
|
||||||
"states":[
|
"states":[
|
||||||
{
|
{
|
||||||
"name":"pipeTJunction2",
|
"name":"pipeTJunction",
|
||||||
"directions":4,
|
"directions":4,
|
||||||
"delays":[
|
"delays":[
|
||||||
[
|
[
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"pipeHalf2",
|
"name":"pipeHalf",
|
||||||
"directions":4,
|
"directions":4,
|
||||||
"delays":[
|
"delays":[
|
||||||
[
|
[
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"pipeBend2",
|
"name":"pipeBend",
|
||||||
"directions":4,
|
"directions":4,
|
||||||
"delays":[
|
"delays":[
|
||||||
[
|
[
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"pipeFourway2",
|
"name":"pipeFourway",
|
||||||
"directions":1,
|
"directions":1,
|
||||||
"delays":[
|
"delays":[
|
||||||
[
|
[
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"pipeStraight2",
|
"name":"pipeStraight",
|
||||||
"directions":4,
|
"directions":4,
|
||||||
"delays":[
|
"delays":[
|
||||||
[
|
[
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 854 B After Width: | Height: | Size: 854 B |
|
Before Width: | Height: | Size: 538 B After Width: | Height: | Size: 538 B |
|
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 469 B |
|
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 643 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |