Pipe prototypes (#2124)
* Pipe prototypes * PipeDirection setter * IRotatableNode * NodeContainer passes rotation events to its nodes * Removes duplicate pipe prototypes that are rotations of each other * PipeDirectionHelpers * PipeNode rotation * icon removal * Pipe icons * Icon fix * Fixes pipe sprites and icons Co-authored-by: py01 <pyronetics01@gmail.com>
@@ -2,67 +2,44 @@
|
|||||||
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;
|
||||||
using Robust.Client.Graphics;
|
|
||||||
using Robust.Client.Interfaces.GameObjects.Components;
|
using Robust.Client.Interfaces.GameObjects.Components;
|
||||||
using Robust.Client.Interfaces.ResourceManagement;
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
using Robust.Client.ResourceManagement;
|
|
||||||
using Robust.Shared.GameObjects.Components.Renderable;
|
|
||||||
using Robust.Shared.IoC;
|
|
||||||
using Robust.Shared.Log;
|
|
||||||
using Robust.Shared.Utility;
|
|
||||||
using YamlDotNet.RepresentationModel;
|
|
||||||
|
|
||||||
namespace Content.Client.GameObjects.Components.Atmos
|
namespace Content.Client.GameObjects.Components.Atmos
|
||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
public class PipeVisualizer : AppearanceVisualizer
|
public class PipeVisualizer : AppearanceVisualizer
|
||||||
{
|
{
|
||||||
private RSI _pipeRSI;
|
public override void InitializeEntity(IEntity entity)
|
||||||
|
|
||||||
public override void LoadData(YamlMappingNode node)
|
|
||||||
{
|
{
|
||||||
base.LoadData(node);
|
base.InitializeEntity(entity);
|
||||||
|
if (!entity.TryGetComponent(out ISpriteComponent sprite)) return;
|
||||||
var rsiString = node.GetNode("pipeRSI").ToString();
|
sprite.LayerMapReserveBlank(Layer.PipeBase);
|
||||||
var rsiPath = SharedSpriteComponent.TextureRoot / rsiString;
|
var pipeBaseLayer = sprite.LayerMapGet(Layer.PipeBase);
|
||||||
try
|
sprite.LayerSetVisible(pipeBaseLayer, true);
|
||||||
{
|
|
||||||
var resourceCache = IoCManager.Resolve<IResourceCache>();
|
|
||||||
var resource = resourceCache.GetResource<RSIResource>(rsiPath);
|
|
||||||
_pipeRSI = resource.RSI;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Logger.ErrorS("go.pipevisualizer", "Unable to load RSI '{0}'. Trace:\n{1}", rsiPath, e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnChangeData(AppearanceComponent component)
|
public override void OnChangeData(AppearanceComponent component)
|
||||||
{
|
{
|
||||||
base.OnChangeData(component);
|
base.OnChangeData(component);
|
||||||
|
if (!component.Owner.TryGetComponent(out ISpriteComponent sprite)) return;
|
||||||
|
if (!component.TryGetData(PipeVisuals.VisualState, out PipeVisualState pipeVisualState)) return;
|
||||||
|
var pipeBase = sprite.LayerMapGet(Layer.PipeBase);
|
||||||
|
var pipeBaseStateId = GetPipeBaseStateId(pipeVisualState);
|
||||||
|
sprite.LayerSetState(pipeBase, pipeBaseStateId);
|
||||||
|
}
|
||||||
|
|
||||||
if (!component.Owner.TryGetComponent(out ISpriteComponent sprite))
|
private string GetPipeBaseStateId(PipeVisualState pipeVisualState)
|
||||||
{
|
{
|
||||||
return;
|
var stateId = "pipe";
|
||||||
}
|
stateId += pipeVisualState.PipeDirection.PipeDirectionToPipeShape().ToString();
|
||||||
if (!component.TryGetData(PipeVisuals.VisualState, out PipeVisualStateSet pipeVisualStateSet))
|
stateId += (int) pipeVisualState.ConduitLayer;
|
||||||
{
|
return stateId;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
for (var i = 0; i < pipeVisualStateSet.PipeVisualStates.Length; i++)
|
|
||||||
{
|
|
||||||
var pipeVisualState = pipeVisualStateSet.PipeVisualStates[i];
|
|
||||||
var rsiState = "pipe";
|
|
||||||
rsiState += pipeVisualState.PipeDirection.ToString();
|
|
||||||
rsiState += ((int) pipeVisualState.ConduitLayer).ToString();
|
|
||||||
|
|
||||||
var pipeLayerKey = "pipeLayer" + i.ToString();
|
private enum Layer
|
||||||
sprite.LayerMapReserveBlank(pipeLayerKey);
|
{
|
||||||
var currentPipeLayer = sprite.LayerMapGet(pipeLayerKey);
|
PipeBase,
|
||||||
sprite.LayerSetRSI(currentPipeLayer, _pipeRSI);
|
|
||||||
sprite.LayerSetState(currentPipeLayer, rsiState);
|
|
||||||
sprite.LayerSetVisible(currentPipeLayer, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using Content.Server.GameObjects.Components.NodeContainer.Nodes;
|
using Content.Server.GameObjects.Components.NodeContainer.Nodes;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.GameObjects.Components.Transform;
|
||||||
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -31,6 +34,8 @@ namespace Content.Server.GameObjects.Components.NodeContainer
|
|||||||
{
|
{
|
||||||
node.Initialize(Owner);
|
node.Initialize(Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Owner.EntityManager.EventBus.SubscribeEvent<RotateEvent>(EventSource.Local, this, RotateEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Startup()
|
protected override void Startup()
|
||||||
@@ -50,5 +55,16 @@ namespace Content.Server.GameObjects.Components.NodeContainer
|
|||||||
}
|
}
|
||||||
base.OnRemove();
|
base.OnRemove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RotateEvent(RotateEvent ev)
|
||||||
|
{
|
||||||
|
if (ev.Sender != Owner || ev.NewRotation == ev.OldRotation)
|
||||||
|
return;
|
||||||
|
|
||||||
|
foreach (var rotatableNode in Nodes.OfType<IRotatableNode>())
|
||||||
|
{
|
||||||
|
rotatableNode.RotateEvent(ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using Robust.Shared.GameObjects.Components.Transform;
|
||||||
|
|
||||||
|
namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A <see cref="Node"/> that implements this will have its <see cref="RotateEvent(RotateEvent)"/> called when its
|
||||||
|
/// <see cref="NodeContainerComponent"/> is rotated.
|
||||||
|
/// </summary>
|
||||||
|
public interface IRotatableNode
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Rotates this <see cref="Node"/>.
|
||||||
|
/// </summary>
|
||||||
|
void RotateEvent(RotateEvent ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -106,6 +106,14 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
|||||||
_needsGroup = true;
|
_needsGroup = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void RefreshNodeGroup()
|
||||||
|
{
|
||||||
|
NodeGroup.RemoveNode(this);
|
||||||
|
ClearNodeGroup();
|
||||||
|
TryAssignGroupIfNeeded();
|
||||||
|
CombineGroupWithReachable();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// How this node will attempt to find other reachable <see cref="Node"/>s to group with.
|
/// How this node will attempt to find other reachable <see cref="Node"/>s to group with.
|
||||||
/// Returns a set of <see cref="Node"/>s to consider grouping with. Should not return this current <see cref="Node"/>.
|
/// Returns a set of <see cref="Node"/>s to consider grouping with. Should not return this current <see cref="Node"/>.
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
|||||||
/// Connects with other <see cref="PipeNode"/>s whose <see cref="PipeNode.PipeDirection"/>
|
/// Connects with other <see cref="PipeNode"/>s whose <see cref="PipeNode.PipeDirection"/>
|
||||||
/// correctly correspond.
|
/// correctly correspond.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PipeNode : Node, IGasMixtureHolder
|
public class PipeNode : Node, IGasMixtureHolder, IRotatableNode
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
public PipeDirection PipeDirection => _pipeDirection;
|
public PipeDirection PipeDirection { get => _pipeDirection; set => SetPipeDirection(value); }
|
||||||
private PipeDirection _pipeDirection;
|
private PipeDirection _pipeDirection;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -64,8 +64,6 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
|||||||
|
|
||||||
private AppearanceComponent _appearance;
|
private AppearanceComponent _appearance;
|
||||||
|
|
||||||
private PipeVisualState PipeVisualState => new PipeVisualState(PipeDirection, ConduitLayer);
|
|
||||||
|
|
||||||
public override void ExposeData(ObjectSerializer serializer)
|
public override void ExposeData(ObjectSerializer serializer)
|
||||||
{
|
{
|
||||||
base.ExposeData(serializer);
|
base.ExposeData(serializer);
|
||||||
@@ -94,22 +92,40 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
|||||||
_needsPipeNet = true;
|
_needsPipeNet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IRotatableNode.RotateEvent(RotateEvent ev)
|
||||||
|
{
|
||||||
|
var diff = ev.NewRotation - ev.OldRotation;
|
||||||
|
var newPipeDir = PipeDirection.None;
|
||||||
|
for (var i = 0; i < PipeDirectionHelpers.PipeDirections; i++)
|
||||||
|
{
|
||||||
|
var pipeDirection = (PipeDirection) (1 << i);
|
||||||
|
if (!PipeDirection.HasFlag(pipeDirection)) continue;
|
||||||
|
var angle = pipeDirection.ToAngle();
|
||||||
|
angle += diff;
|
||||||
|
newPipeDir |= angle.GetCardinalDir().ToPipeDirection();
|
||||||
|
}
|
||||||
|
PipeDirection = newPipeDir;
|
||||||
|
}
|
||||||
|
|
||||||
protected override IEnumerable<Node> GetReachableNodes()
|
protected override IEnumerable<Node> GetReachableNodes()
|
||||||
{
|
{
|
||||||
foreach (CardinalDirection direction in Enum.GetValues(typeof(CardinalDirection)))
|
for (var i = 0; i < PipeDirectionHelpers.PipeDirections; i++)
|
||||||
{
|
{
|
||||||
PipeDirectionFromCardinal(direction, out var ownNeededConnection, out var theirNeededConnection);
|
var pipeDirection = (PipeDirection) (1 << i);
|
||||||
if ((_pipeDirection & ownNeededConnection) == PipeDirection.None)
|
|
||||||
|
var ownNeededConnection = pipeDirection;
|
||||||
|
var theirNeededConnection = ownNeededConnection.GetOpposite();
|
||||||
|
if (!_pipeDirection.HasFlag(ownNeededConnection))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var pipeNodesInDirection = Owner.GetComponent<SnapGridComponent>()
|
var pipeNodesInDirection = Owner.GetComponent<SnapGridComponent>()
|
||||||
.GetInDir((Direction) direction)
|
.GetInDir(pipeDirection.ToDirection())
|
||||||
.Select(entity => entity.TryGetComponent<NodeContainerComponent>(out var container) ? container : null)
|
.Select(entity => entity.TryGetComponent<NodeContainerComponent>(out var container) ? container : null)
|
||||||
.Where(container => container != null)
|
.Where(container => container != null)
|
||||||
.SelectMany(container => container.Nodes)
|
.SelectMany(container => container.Nodes)
|
||||||
.OfType<PipeNode>()
|
.OfType<PipeNode>()
|
||||||
.Where(pipeNode => (pipeNode._pipeDirection & theirNeededConnection) != PipeDirection.None);
|
.Where(pipeNode => pipeNode._pipeDirection.HasFlag(theirNeededConnection));
|
||||||
foreach (var pipeNode in pipeNodesInDirection)
|
foreach (var pipeNode in pipeNodesInDirection)
|
||||||
{
|
{
|
||||||
yield return pipeNode;
|
yield return pipeNode;
|
||||||
@@ -117,47 +133,16 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PipeDirectionFromCardinal(CardinalDirection direction, out PipeDirection sameDir, out PipeDirection oppDir)
|
|
||||||
{
|
|
||||||
switch (direction)
|
|
||||||
{
|
|
||||||
case CardinalDirection.North:
|
|
||||||
sameDir = PipeDirection.North;
|
|
||||||
oppDir = PipeDirection.South;
|
|
||||||
break;
|
|
||||||
case CardinalDirection.South:
|
|
||||||
sameDir = PipeDirection.South;
|
|
||||||
oppDir = PipeDirection.North;
|
|
||||||
break;
|
|
||||||
case CardinalDirection.East:
|
|
||||||
sameDir = PipeDirection.East;
|
|
||||||
oppDir = PipeDirection.West;
|
|
||||||
break;
|
|
||||||
case CardinalDirection.West:
|
|
||||||
sameDir = PipeDirection.West;
|
|
||||||
oppDir = PipeDirection.East;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new ArgumentException("Invalid Direction.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateAppearance()
|
private void UpdateAppearance()
|
||||||
{
|
{
|
||||||
var pipeVisualStates = Owner.GetComponent<NodeContainerComponent>()
|
_appearance?.SetData(PipeVisuals.VisualState, new PipeVisualState(PipeDirection, ConduitLayer));
|
||||||
.Nodes
|
|
||||||
.OfType<PipeNode>()
|
|
||||||
.Select(pipeNode => pipeNode.PipeVisualState)
|
|
||||||
.ToArray();
|
|
||||||
_appearance?.SetData(PipeVisuals.VisualState, new PipeVisualStateSet(pipeVisualStates));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum CardinalDirection
|
private void SetPipeDirection(PipeDirection pipeDirection)
|
||||||
{
|
{
|
||||||
North = Direction.North,
|
_pipeDirection = pipeDirection;
|
||||||
South = Direction.South,
|
RefreshNodeGroup();
|
||||||
East = Direction.East,
|
UpdateAppearance();
|
||||||
West = Direction.West,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
|
|
||||||
namespace Content.Shared.GameObjects.Components.Atmos
|
namespace Content.Shared.GameObjects.Components.Atmos
|
||||||
@@ -9,17 +10,6 @@ namespace Content.Shared.GameObjects.Components.Atmos
|
|||||||
VisualState
|
VisualState
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
|
||||||
public class PipeVisualStateSet
|
|
||||||
{
|
|
||||||
public readonly PipeVisualState[] PipeVisualStates;
|
|
||||||
|
|
||||||
public PipeVisualStateSet(PipeVisualState[] pipeVisualStates)
|
|
||||||
{
|
|
||||||
PipeVisualStates = pipeVisualStates;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
public class PipeVisualState
|
public class PipeVisualState
|
||||||
{
|
{
|
||||||
@@ -65,10 +55,94 @@ namespace Content.Shared.GameObjects.Components.Atmos
|
|||||||
All = -1,
|
All = -1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum PipeShape
|
||||||
|
{
|
||||||
|
Straight,
|
||||||
|
Bend,
|
||||||
|
TJunction,
|
||||||
|
Fourway
|
||||||
|
}
|
||||||
|
|
||||||
public enum ConduitLayer
|
public enum ConduitLayer
|
||||||
{
|
{
|
||||||
One = 1,
|
One = 1,
|
||||||
Two = 2,
|
Two = 2,
|
||||||
Three = 3,
|
Three = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class PipeDirectionHelpers
|
||||||
|
{
|
||||||
|
public const int PipeDirections = 4;
|
||||||
|
|
||||||
|
public static Angle ToAngle(this PipeDirection pipeDirection)
|
||||||
|
{
|
||||||
|
return pipeDirection switch
|
||||||
|
{
|
||||||
|
PipeDirection.East => Angle.FromDegrees(0),
|
||||||
|
PipeDirection.North => Angle.FromDegrees(90),
|
||||||
|
PipeDirection.West => Angle.FromDegrees(180),
|
||||||
|
PipeDirection.South => Angle.FromDegrees(270),
|
||||||
|
_ => throw new ArgumentOutOfRangeException(nameof(pipeDirection), $"{pipeDirection} does not have an associated angle."),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PipeDirection ToPipeDirection(this Direction direction)
|
||||||
|
{
|
||||||
|
return direction switch
|
||||||
|
{
|
||||||
|
Direction.North => PipeDirection.North,
|
||||||
|
Direction.South => PipeDirection.South,
|
||||||
|
Direction.East => PipeDirection.East,
|
||||||
|
Direction.West => PipeDirection.West,
|
||||||
|
_ => throw new ArgumentOutOfRangeException(nameof(direction)),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Direction ToDirection(this PipeDirection pipeDirection)
|
||||||
|
{
|
||||||
|
return pipeDirection switch
|
||||||
|
{
|
||||||
|
PipeDirection.North => Direction.North,
|
||||||
|
PipeDirection.South => Direction.South,
|
||||||
|
PipeDirection.East => Direction.East,
|
||||||
|
PipeDirection.West => Direction.West,
|
||||||
|
_ => throw new ArgumentOutOfRangeException(nameof(pipeDirection)),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PipeDirection GetOpposite(this PipeDirection pipeDirection)
|
||||||
|
{
|
||||||
|
return pipeDirection switch
|
||||||
|
{
|
||||||
|
PipeDirection.North => PipeDirection.South,
|
||||||
|
PipeDirection.South => PipeDirection.North,
|
||||||
|
PipeDirection.East => PipeDirection.West,
|
||||||
|
PipeDirection.West => PipeDirection.East,
|
||||||
|
_ => throw new ArgumentOutOfRangeException(nameof(pipeDirection)),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PipeShape PipeDirectionToPipeShape(this PipeDirection pipeDirection)
|
||||||
|
{
|
||||||
|
return pipeDirection switch
|
||||||
|
{
|
||||||
|
PipeDirection.Lateral => PipeShape.Straight,
|
||||||
|
PipeDirection.Longitudinal => PipeShape.Straight,
|
||||||
|
|
||||||
|
PipeDirection.NEBend => PipeShape.Bend,
|
||||||
|
PipeDirection.NWBend => PipeShape.Bend,
|
||||||
|
PipeDirection.SEBend => PipeShape.Bend,
|
||||||
|
PipeDirection.SWBend => PipeShape.Bend,
|
||||||
|
|
||||||
|
PipeDirection.TNorth => PipeShape.TJunction,
|
||||||
|
PipeDirection.TSouth => PipeShape.TJunction,
|
||||||
|
PipeDirection.TEast => PipeShape.TJunction,
|
||||||
|
PipeDirection.TWest => PipeShape.TJunction,
|
||||||
|
|
||||||
|
PipeDirection.Fourway => PipeShape.Fourway,
|
||||||
|
|
||||||
|
_ => throw new ArgumentOutOfRangeException(nameof(pipeDirection)),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
abstract: true
|
abstract: true
|
||||||
id: PipeBase
|
id: PipeBase
|
||||||
|
name: Pipe
|
||||||
|
description: Holds gas.
|
||||||
placement:
|
placement:
|
||||||
mode: SnapgridCenter
|
mode: SnapgridCenter
|
||||||
components:
|
components:
|
||||||
@@ -9,38 +11,64 @@
|
|||||||
- type: Collidable
|
- type: Collidable
|
||||||
- type: SnapGrid
|
- type: SnapGrid
|
||||||
offset: Center
|
offset: Center
|
||||||
- type: Sprite
|
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholdvalue: 100
|
thresholdvalue: 100
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Constructible/Atmos/pipe.rsi
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
visuals:
|
visuals:
|
||||||
- type: PipeVisualizer
|
- type: PipeVisualizer
|
||||||
pipeRSI: Constructible/Atmos/pipe.rsi
|
- type: Icon
|
||||||
|
sprite: Constructible/Atmos/pipe.rsi
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: PipeBase
|
parent: PipeBase
|
||||||
id: FourwayPipe
|
id: PipeStraight
|
||||||
name: Fourway Pipe
|
suffix: Straight
|
||||||
components:
|
components:
|
||||||
|
- type: NodeContainer
|
||||||
|
nodes:
|
||||||
|
- !type:PipeNode
|
||||||
|
nodeGroupID: Pipe
|
||||||
|
pipeDirection: Lateral
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Constructible/Atmos/pipe.rsi
|
state: pipeStraight2
|
||||||
state: pipeFourway2
|
|
||||||
|
- type: entity
|
||||||
|
parent: PipeBase
|
||||||
|
id: PipeBend
|
||||||
|
suffix: Bend
|
||||||
|
components:
|
||||||
|
- type: NodeContainer
|
||||||
|
nodes:
|
||||||
|
- !type:PipeNode
|
||||||
|
nodeGroupID: Pipe
|
||||||
|
pipeDirection: SEBend
|
||||||
|
- type: Icon
|
||||||
|
state: pipeBend2
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: PipeBase
|
||||||
|
id: PipeTJunction
|
||||||
|
suffix: TJunction
|
||||||
|
components:
|
||||||
|
- type: NodeContainer
|
||||||
|
nodes:
|
||||||
|
- !type:PipeNode
|
||||||
|
nodeGroupID: Pipe
|
||||||
|
pipeDirection: TEast
|
||||||
|
- type: Icon
|
||||||
|
state: pipeTJunction2
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: PipeBase
|
||||||
|
id: PipeFourway
|
||||||
|
suffix: Fourway
|
||||||
|
components:
|
||||||
- type: NodeContainer
|
- type: NodeContainer
|
||||||
nodes:
|
nodes:
|
||||||
- !type:PipeNode
|
- !type:PipeNode
|
||||||
nodeGroupID: Pipe
|
nodeGroupID: Pipe
|
||||||
pipeDirection: Fourway
|
pipeDirection: Fourway
|
||||||
|
|
||||||
- type: entity
|
|
||||||
parent: PipeBase
|
|
||||||
id: LongitudinalPipe
|
|
||||||
name: Longitudinal Pipe
|
|
||||||
components:
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Constructible/Atmos/pipe.rsi
|
state: pipeFourway2
|
||||||
state: pipeLongitudinal2
|
|
||||||
- type: NodeContainer
|
|
||||||
nodes:
|
|
||||||
- !type:PipeNode
|
|
||||||
nodeGroupID: Pipe
|
|
||||||
pipeDirection: Longitudinal
|
|
||||||
|
|||||||
@@ -8,189 +8,67 @@
|
|||||||
"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":"pipeEast2",
|
"name":"pipeTJunction2",
|
||||||
"directions":1,
|
"directions":4,
|
||||||
"delays":[ [ 1.0 ] ]
|
"delays":[
|
||||||
|
[
|
||||||
|
1.0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1.0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1.0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1.0
|
||||||
|
]
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"pipeNorth2",
|
"name":"pipeBend2",
|
||||||
"directions":1,
|
"directions":4,
|
||||||
"delays":[ [ 1.0 ] ]
|
"delays":[
|
||||||
},
|
[
|
||||||
{
|
1.0
|
||||||
"name":"pipeSouth2",
|
],
|
||||||
"directions":1,
|
[
|
||||||
"delays":[ [ 1.0 ] ]
|
1.0
|
||||||
},
|
],
|
||||||
{
|
[
|
||||||
"name":"pipeWest2",
|
1.0
|
||||||
"directions":1,
|
],
|
||||||
"delays":[ [ 1.0 ] ]
|
[
|
||||||
},
|
1.0
|
||||||
{
|
]
|
||||||
"name":"pipeFourway1",
|
]
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"pipeFourway2",
|
"name":"pipeFourway2",
|
||||||
"directions":1,
|
"directions":1,
|
||||||
"delays":[ [ 1.0 ] ]
|
"delays":[
|
||||||
|
[
|
||||||
|
1.0
|
||||||
|
]
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"pipeFourway3",
|
"name":"pipeStraight2",
|
||||||
"directions":1,
|
"directions":4,
|
||||||
"delays":[ [ 1.0 ] ]
|
"delays":[
|
||||||
},
|
[
|
||||||
{
|
1.0
|
||||||
"name":"pipeLateral1",
|
],
|
||||||
"directions":1,
|
[
|
||||||
"delays":[ [ 1.0 ] ]
|
1.0
|
||||||
},
|
],
|
||||||
{
|
[
|
||||||
"name":"pipeLateral2",
|
1.0
|
||||||
"directions":1,
|
],
|
||||||
"delays":[ [ 1.0 ] ]
|
[
|
||||||
},
|
1.0
|
||||||
{
|
]
|
||||||
"name":"pipeLateral3",
|
]
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeLongitudinal1",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeLongitudinal2",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeLongitudinal3",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeNEBend1",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeNEBend2",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeNEBend3",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeNWBend1",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeNWBend2",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeNWBend3",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeSEBend1",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeSEBend2",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeSEBend3",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeSWBend1",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeSWBend2",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeSWBend3",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTEast1",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTEast2",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTEast3",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTNorth1",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTNorth2",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTNorth3",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTSouth1",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTSouth2",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTSouth3",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTWest1",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTWest2",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"pipeTWest3",
|
|
||||||
"directions":1,
|
|
||||||
"delays":[ [ 1.0 ] ]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
BIN
Resources/Textures/Constructible/Atmos/pipe.rsi/pipeBend2.png
Normal file
|
After Width: | Height: | Size: 854 B |
|
Before Width: | Height: | Size: 217 B |
|
Before Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 545 B |
|
Before Width: | Height: | Size: 273 B |
|
Before Width: | Height: | Size: 278 B |
|
Before Width: | Height: | Size: 278 B |
|
Before Width: | Height: | Size: 329 B |
|
Before Width: | Height: | Size: 326 B |
|
Before Width: | Height: | Size: 321 B |
|
Before Width: | Height: | Size: 265 B |
|
Before Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 222 B |
|
Before Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 324 B |
|
Before Width: | Height: | Size: 229 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 264 B |
|
Before Width: | Height: | Size: 276 B |
|
Before Width: | Height: | Size: 267 B |
|
Before Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 309 B |
|
Before Width: | Height: | Size: 278 B |
|
After Width: | Height: | Size: 643 B |
|
Before Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 433 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 447 B |
|
Before Width: | Height: | Size: 427 B |
|
Before Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 416 B |
|
Before Width: | Height: | Size: 426 B |
|
Before Width: | Height: | Size: 449 B |
|
Before Width: | Height: | Size: 471 B |
|
Before Width: | Height: | Size: 479 B |
|
Before Width: | Height: | Size: 236 B |