Removes half-implemented ConduitLayer from piping (#2957)

Co-authored-by: py01 <pyronetics01@gmail.com>
This commit is contained in:
py01
2021-01-08 17:05:29 -06:00
committed by GitHub
parent e84e387972
commit b46b890618
12 changed files with 17 additions and 38 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Content.Shared.GameObjects.Components.Atmos;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
@@ -62,7 +62,6 @@ namespace Content.Client.GameObjects.Components.Atmos
{
var stateId = "pipe";
stateId += pipeVisualState.PipeDirection.PipeDirectionToPipeShape().ToString();
stateId += (int) pipeVisualState.ConduitLayer;
return stateId;
}

View File

@@ -97,7 +97,7 @@ namespace Content.Server.GameObjects.Components.Atmos.Piping.Pumps
private void UpdateAppearance()
{
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()

View File

@@ -22,12 +22,6 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
public PipeDirection PipeDirection { get => _pipeDirection; set => SetPipeDirection(value); }
private PipeDirection _pipeDirection;
/// <summary>
/// Controls what visuals are applied in <see cref="PipeVisualizer"/>.
/// </summary>
public ConduitLayer ConduitLayer => _conduitLayer;
private ConduitLayer _conduitLayer;
[ViewVariables]
private IPipeNet _pipeNet = PipeNet.NullNet;
@@ -69,7 +63,6 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
base.ExposeData(serializer);
serializer.DataField(ref _pipeDirection, "pipeDirection", PipeDirection.None);
serializer.DataField(this, x => x.LocalAir, "gasMixture", new GasMixture(DefaultVolume));
serializer.DataField(ref _conduitLayer, "conduitLayer", ConduitLayer.Two);
}
public override void Initialize(IEntity owner)
@@ -138,7 +131,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
private void UpdateAppearance()
{
_appearance?.SetData(PipeVisuals.VisualState, new PipeVisualState(PipeDirection, ConduitLayer));
_appearance?.SetData(PipeVisuals.VisualState, new PipeVisualState(PipeDirection));
}
private void SetPipeDirection(PipeDirection pipeDirection)

View File

@@ -14,12 +14,10 @@ namespace Content.Shared.GameObjects.Components.Atmos
public class PipeVisualState
{
public readonly PipeDirection PipeDirection;
public readonly ConduitLayer ConduitLayer;
public PipeVisualState(PipeDirection pipeDirection, ConduitLayer conduitLayer)
public PipeVisualState(PipeDirection pipeDirection)
{
PipeDirection = pipeDirection;
ConduitLayer = conduitLayer;
}
}
@@ -65,13 +63,6 @@ namespace Content.Shared.GameObjects.Components.Atmos
Fourway
}
public enum ConduitLayer
{
One = 1,
Two = 2,
Three = 3,
}
public static class PipeDirectionHelpers
{
public const int PipeDirections = 4;

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Atmos
@@ -14,16 +14,12 @@ namespace Content.Shared.GameObjects.Components.Atmos
{
public readonly PipeDirection InletDirection;
public readonly PipeDirection OutletDirection;
public readonly ConduitLayer InletConduitLayer;
public readonly ConduitLayer OutletConduitLayer;
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;
OutletDirection = outletDirection;
InletConduitLayer = inletConduitLayer;
OutletConduitLayer = outletConduitLayer;
PumpEnabled = pumpEnabled;
}
}

View File

@@ -1,4 +1,4 @@
- type: entity
- type: entity
abstract: true
id: PipeBase
name: Pipe
@@ -39,7 +39,7 @@
nodeGroupID: Pipe
pipeDirection: East
- type: Icon
state: pipeHalf2
state: pipeHalf
- type: entity
parent: PipeBase
@@ -52,7 +52,7 @@
nodeGroupID: Pipe
pipeDirection: Lateral
- type: Icon
state: pipeStraight2
state: pipeStraight
- type: entity
parent: PipeBase
@@ -65,7 +65,7 @@
nodeGroupID: Pipe
pipeDirection: SEBend
- type: Icon
state: pipeBend2
state: pipeBend
- type: entity
parent: PipeBase
@@ -78,7 +78,7 @@
nodeGroupID: Pipe
pipeDirection: TEast
- type: Icon
state: pipeTJunction2
state: pipeTJunction
- type: entity
parent: PipeBase
@@ -91,4 +91,4 @@
nodeGroupID: Pipe
pipeDirection: Fourway
- type: Icon
state: pipeFourway2
state: pipeFourway

View File

@@ -8,7 +8,7 @@
"copyright":"Taken from https://github.com/tgstation/tgstation at commit 57cd1d59ca019dd0e7811ac451f295f818e573da",
"states":[
{
"name":"pipeTJunction2",
"name":"pipeTJunction",
"directions":4,
"delays":[
[
@@ -26,7 +26,7 @@
]
},
{
"name":"pipeHalf2",
"name":"pipeHalf",
"directions":4,
"delays":[
[
@@ -44,7 +44,7 @@
]
},
{
"name":"pipeBend2",
"name":"pipeBend",
"directions":4,
"delays":[
[
@@ -62,7 +62,7 @@
]
},
{
"name":"pipeFourway2",
"name":"pipeFourway",
"directions":1,
"delays":[
[
@@ -71,7 +71,7 @@
]
},
{
"name":"pipeStraight2",
"name":"pipeStraight",
"directions":4,
"delays":[
[

View File

Before

Width:  |  Height:  |  Size: 854 B

After

Width:  |  Height:  |  Size: 854 B

View File

Before

Width:  |  Height:  |  Size: 538 B

After

Width:  |  Height:  |  Size: 538 B

View File

Before

Width:  |  Height:  |  Size: 469 B

After

Width:  |  Height:  |  Size: 469 B

View File

Before

Width:  |  Height:  |  Size: 643 B

After

Width:  |  Height:  |  Size: 643 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB