Replace SpriteStateChange construction action with AppearanceChange (#15914)

This commit is contained in:
Leon Friedrich
2023-04-30 09:04:31 +12:00
committed by GitHub
parent fe3ebd0157
commit b45bc4ae4a
58 changed files with 293 additions and 287 deletions

View File

@@ -11,6 +11,9 @@ public sealed class ParticleAcceleratorPartVisualizerSystem : VisualizerSystem<P
if (args.Sprite == null) if (args.Sprite == null)
return; return;
if (!args.Sprite.LayerMapTryGet(ParticleAcceleratorVisualLayers.Unlit, out var index))
return;
if (!AppearanceSystem.TryGetData<ParticleAcceleratorVisualState>(uid, ParticleAcceleratorVisuals.VisualState, out var state, args.Component)) if (!AppearanceSystem.TryGetData<ParticleAcceleratorVisualState>(uid, ParticleAcceleratorVisuals.VisualState, out var state, args.Component))
{ {
state = ParticleAcceleratorVisualState.Unpowered; state = ParticleAcceleratorVisualState.Unpowered;
@@ -18,12 +21,12 @@ public sealed class ParticleAcceleratorPartVisualizerSystem : VisualizerSystem<P
if (state != ParticleAcceleratorVisualState.Unpowered) if (state != ParticleAcceleratorVisualState.Unpowered)
{ {
args.Sprite.LayerSetVisible(ParticleAcceleratorVisualLayers.Unlit, true); args.Sprite.LayerSetVisible(index, true);
args.Sprite.LayerSetState(ParticleAcceleratorVisualLayers.Unlit, comp.StateBase + comp.StatesSuffixes[state]); args.Sprite.LayerSetState(index, comp.StateBase + comp.StatesSuffixes[state]);
} }
else else
{ {
args.Sprite.LayerSetVisible(ParticleAcceleratorVisualLayers.Unlit, false); args.Sprite.LayerSetVisible(index, false);
} }
} }
} }

View File

@@ -259,17 +259,17 @@ namespace Content.Client.ParticleAccelerator.UI
Children = Children =
{ {
new Control {MinSize = imgSize}, new Control {MinSize = imgSize},
(_endCapTexture = Segment("end_cap", "capc")), (_endCapTexture = Segment("end_cap")),
new Control {MinSize = imgSize}, new Control {MinSize = imgSize},
(_controlBoxTexture = Segment("control_box", "boxc")), (_controlBoxTexture = Segment("control_box")),
(_fuelChamberTexture = Segment("fuel_chamber", "chamberc")), (_fuelChamberTexture = Segment("fuel_chamber")),
new Control {MinSize = imgSize}, new Control {MinSize = imgSize},
new Control {MinSize = imgSize}, new Control {MinSize = imgSize},
(_powerBoxTexture = Segment("power_box", "boxc")), (_powerBoxTexture = Segment("power_box")),
new Control {MinSize = imgSize}, new Control {MinSize = imgSize},
(_emitterLeftTexture = Segment("emitter_left", "leftc")), (_emitterLeftTexture = Segment("emitter_left")),
(_emitterCenterTexture = Segment("emitter_center", "centerc")), (_emitterCenterTexture = Segment("emitter_center")),
(_emitterRightTexture = Segment("emitter_right", "rightc")), (_emitterRightTexture = Segment("emitter_right")),
} }
} }
} }
@@ -326,9 +326,9 @@ namespace Content.Client.ParticleAccelerator.UI
} }
}; };
PASegmentControl Segment(string name, string state) PASegmentControl Segment(string name)
{ {
return new(this, resourceCache, name, state); return new(this, resourceCache, name);
} }
UpdateUI(false, false, false, false); UpdateUI(false, false, false, false);
@@ -470,13 +470,13 @@ namespace Content.Client.ParticleAccelerator.UI
private readonly TextureRect _unlit; private readonly TextureRect _unlit;
private readonly RSI _rsi; private readonly RSI _rsi;
public PASegmentControl(ParticleAcceleratorControlMenu menu, IResourceCache cache, string name, string state) public PASegmentControl(ParticleAcceleratorControlMenu menu, IResourceCache cache, string name)
{ {
_menu = menu; _menu = menu;
_baseState = name; _baseState = name;
_rsi = cache.GetResource<RSIResource>($"/Textures/Structures/Power/Generation/PA/{name}.rsi").RSI; _rsi = cache.GetResource<RSIResource>($"/Textures/Structures/Power/Generation/PA/{name}.rsi").RSI;
AddChild(_base = new TextureRect {Texture = _rsi[$"{state}"].Frame0}); AddChild(_base = new TextureRect {Texture = _rsi[$"completed"].Frame0});
AddChild(_unlit = new TextureRect()); AddChild(_unlit = new TextureRect());
MinSize = _rsi.Size; MinSize = _rsi.Size;
} }

View File

@@ -0,0 +1,42 @@
using Content.Server.Construction.Components;
using Content.Shared.Construction;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
namespace Content.Server.Construction.Completions;
[UsedImplicitly]
[DataDefinition]
public sealed class AppearanceChange : IGraphAction
{
/// <summary>
/// The appearance key to use.
/// </summary>
[DataField("key")]
public Enum Key = ConstructionVisuals.Key;
/// <summary>
/// The enum data to set. If not specified, will set the data to the name of the current edges' target node
/// (or the current node). This is because appearance changes are usually associated with reaching a new node.
/// </summary>
[DataField("data")]
public Enum? Data;
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{
if (!entityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
return;
if (Data != null)
{
entityManager.System<AppearanceSystem>().SetData(uid, Key, Data, appearance);
return;
}
var (node, edge) = entityManager.System<ConstructionSystem>().GetCurrentNodeAndEdge(uid);
var nodeName = edge?.Target ?? node?.Name;
if (nodeName != null)
entityManager.System<AppearanceSystem>().SetData(uid, Key, nodeName, appearance);
}
}

View File

@@ -1,26 +0,0 @@
using Content.Shared.Construction;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
namespace Content.Server.Construction.Completions
{
[UsedImplicitly]
[DataDefinition]
public sealed class SpriteStateChange : IGraphAction
{
[DataField("layer")] public int Layer { get; private set; } = 0;
[DataField("state")] public string? State { get; private set; } = string.Empty;
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{
if (string.IsNullOrEmpty(State) || !entityManager.TryGetComponent(uid, out SpriteComponent? sprite))
return;
// That layer doesn't exist, we do nothing.
if (sprite.LayerCount <= Layer)
return;
sprite.LayerSetState(Layer, State);
}
}
}

View File

@@ -90,6 +90,23 @@ namespace Content.Server.Construction
return GetCurrentNode(uid, construction) is not {} node ? null : GetEdgeFromNode(node, edgeIndex); return GetCurrentNode(uid, construction) is not {} node ? null : GetEdgeFromNode(node, edgeIndex);
} }
/// <summary>
/// Variant of <see cref="GetCurrentEdge"/> that returns both the node and edge.
/// </summary>
public (ConstructionGraphNode?, ConstructionGraphEdge?) GetCurrentNodeAndEdge(EntityUid uid, ConstructionComponent? construction = null)
{
if (!Resolve(uid, ref construction, false))
return (null, null);
if (GetCurrentNode(uid, construction) is not { } node)
return (null, null);
if (construction.EdgeIndex is not {} edgeIndex)
return (node, null);
return (node, GetEdgeFromNode(node, edgeIndex));
}
/// <summary> /// <summary>
/// Gets the construction graph step the entity is currently at, or null. /// Gets the construction graph step the entity is currently at, or null.
/// </summary> /// </summary>

View File

@@ -1,4 +1,6 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Construction namespace Content.Shared.Construction
{ {
@@ -21,7 +23,7 @@ namespace Content.Shared.Construction
[ViewVariables] [ViewVariables]
public IReadOnlyList<IGraphAction> Actions => _actions; public IReadOnlyList<IGraphAction> Actions => _actions;
[DataField("entity")] [DataField("entity", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? Entity { get; private set; } public string? Entity { get; private set; }
public ConstructionGraphEdge? GetEdge(string target) public ConstructionGraphEdge? GetEdge(string target)

View File

@@ -0,0 +1,11 @@
using Robust.Shared.Serialization;
namespace Content.Shared.Construction;
[Serializable, NetSerializable]
public enum ConstructionVisuals : byte
{
Key,
Layer,
Wired,
}

View File

@@ -74,7 +74,7 @@
id: EngineParticleAccelerator id: EngineParticleAccelerator
icon: icon:
sprite: Structures/Power/Generation/PA/control_box.rsi sprite: Structures/Power/Generation/PA/control_box.rsi
state: boxc state: completed
product: CrateEngineeringParticleAccelerator product: CrateEngineeringParticleAccelerator
cost: 2000 cost: 2000
category: Engineering category: Engineering

View File

@@ -143,7 +143,9 @@
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Grenades/modular.rsi sprite: Objects/Weapons/Grenades/modular.rsi
state: empty layers:
- state: empty
map: [ "enum.ConstructionVisuals.Layer" ]
- type: Item - type: Item
size: 8 size: 8
- type: PayloadCase - type: PayloadCase
@@ -168,6 +170,14 @@
states: states:
enum.Trigger.TriggerVisualState.Primed: primed enum.Trigger.TriggerVisualState.Primed: primed
enum.Trigger.TriggerVisualState.Unprimed: complete enum.Trigger.TriggerVisualState.Unprimed: complete
- type: GenericVisualizer
visuals:
enum.ConstructionVisuals.Key:
enum.ConstructionVisuals.Layer:
emptyCase: { state: empty }
wiredCase: { state: wired }
caseWithTrigger: { state: no-payload }
grenade: { state: complete }
- type: StaticPrice - type: StaticPrice
price: 25 price: 25

View File

@@ -6,7 +6,18 @@
components: components:
- type: Sprite - type: Sprite
sprite: Structures/Doors/Airlocks/Standard/firelock.rsi sprite: Structures/Doors/Airlocks/Standard/firelock.rsi
state: frame1 layers:
- state: frame1
map: [ "enum.ConstructionVisuals.Layer" ]
- type: Appearance
- type: GenericVisualizer
visuals:
enum.ConstructionVisuals.Key:
enum.ConstructionVisuals.Layer:
frame1: { state: frame1 }
frame2: { state: frame2 }
frame3: { state: frame3 }
frame4: { state: frame4 }
- type: Construction - type: Construction
graph: Firelock graph: Firelock
node: frame1 node: frame1

View File

@@ -1,5 +1,5 @@
- type: entity - type: entity
parent: ComputerFrame parent: BaseStructureComputer
id: BaseComputer id: BaseComputer
name: computer name: computer
placement: placement:

View File

@@ -1,8 +1,7 @@
- type: entity - type: entity
id: ComputerFrame id: BaseStructureComputer
parent: BaseStructure parent: BaseStructure
name: computer frame abstract: true
description: A computer under construction.
components: components:
- type: Physics - type: Physics
bodyType: Static bodyType: Static
@@ -23,9 +22,7 @@
graph: Computer graph: Computer
node: frameUnsecured node: frameUnsecured
- type: Sprite - type: Sprite
sprite: Structures/Machines/parts.rsi
drawdepth: Objects drawdepth: Objects
state: 0
- type: Damageable - type: Damageable
damageContainer: Inorganic damageContainer: Inorganic
damageModifierSet: Metallic damageModifierSet: Metallic
@@ -44,7 +41,29 @@
acts: ["Destruction"] acts: ["Destruction"]
- type: entity - type: entity
parent: ComputerFrame id: ComputerFrame
parent: BaseStructureComputer
name: computer frame
description: A computer under construction.
components:
- type: Sprite
sprite: Structures/Machines/parts.rsi
layers:
- state: 0
map: [ "enum.ConstructionVisuals.Layer" ]
- type: Appearance
- type: GenericVisualizer
visuals:
enum.ConstructionVisuals.Key:
enum.ConstructionVisuals.Layer:
frameUnsecured: { state: 0 }
boardUnsecured: { state: 1 }
missingWires: { state: 2 }
monitorMissing: { state: 3 }
monitorUnsecured: { state: 4 }
- type: entity
parent: BaseStructureComputer
id: ComputerBroken id: ComputerBroken
name: broken computer name: broken computer
description: This computer has seen better days. description: This computer has seen better days.

View File

@@ -42,4 +42,17 @@
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: Sprite - type: Sprite
sprite: Structures/Piping/high_pressure_machine_frame.rsi sprite: Structures/Piping/high_pressure_machine_frame.rsi
state: frame layers:
- state: frame
map: [ "enum.ConstructionVisuals.Layer" ]
- type: Appearance
- type: GenericVisualizer
visuals:
enum.ConstructionVisuals.Key:
enum.ConstructionVisuals.Layer:
frame_cable: { state: frame_cables }
frame_electronics: { state: frame_electronics }
frame_unit: { state: frame_unit }
frame_mailing: { state: frame_unit } # not a typo, there is no frame_mailing state.
frame_inlet: { state: frame_inlet }
frame_outlet: { state: frame_outlet }

View File

@@ -24,3 +24,44 @@
noRot: false noRot: false
- type: Pullable - type: Pullable
- type: Clickable - type: Clickable
- type: GuideHelp
guides: [ Singularity, Power ]
- type: Appearance
- type: entity
id: ParticleAcceleratorFinishedPart
parent: ParticleAcceleratorBase
abstract: true
components:
- type: Sprite
layers:
- state: completed
map: [ "enum.ParticleAcceleratorVisualLayers.Base" ]
- state: unlitp
map: [ "enum.ParticleAcceleratorVisualLayers.Unlit" ]
shader: unshaded
visible: false
- type: ParticleAcceleratorPart
- type: ParticleAcceleratorPartVisuals
stateBase: unlit
- type: Construction
node: completed
- type: entity
id: ParticleAcceleratorUnfinishedBase
parent: ParticleAcceleratorBase
abstract: true
components:
- type: Sprite
layers:
- state: unwired
map: [ "enum.ConstructionVisuals.Layer" ]
- type: GenericVisualizer
visuals:
enum.ConstructionVisuals.Key:
enum.ConstructionVisuals.Layer:
start: { state: unwired}
wired: { state: wired}
- type: Construction
node: start
defaultTarget: completed

View File

@@ -7,7 +7,7 @@
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/control_box.rsi sprite: Structures/Power/Generation/PA/control_box.rsi
layers: layers:
- state: boxc - state: completed
map: [ "enum.ParticleAcceleratorVisualLayers.Base" ] map: [ "enum.ParticleAcceleratorVisualLayers.Base" ]
- state: unlitp - state: unlitp
map: [ "enum.ParticleAcceleratorVisualLayers.Unlit" ] map: [ "enum.ParticleAcceleratorVisualLayers.Unlit" ]
@@ -35,14 +35,11 @@
- type: Wires - type: Wires
BoardName: "Mk2 Particle Accelerator" BoardName: "Mk2 Particle Accelerator"
LayoutId: ParticleAccelerator LayoutId: ParticleAccelerator
- type: GuideHelp
guides: [ Singularity, Power ]
# Unfinished # Unfinished
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorUnfinishedBase
id: ParticleAcceleratorControlBoxUnfinished id: ParticleAcceleratorControlBoxUnfinished
name: PA control computer name: PA control computer
suffix: Unfinished suffix: Unfinished
@@ -52,10 +49,5 @@
bodyType: Dynamic bodyType: Dynamic
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/control_box.rsi sprite: Structures/Power/Generation/PA/control_box.rsi
state: box
- type: Construction - type: Construction
graph: ParticleAcceleratorControlBox graph: ParticleAcceleratorControlBox
node: start
defaultTarget: completed
- type: GuideHelp
guides: [ Singularity, Power ]

View File

@@ -1,88 +1,46 @@
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorFinishedPart
id: ParticleAcceleratorEmitterLeft id: ParticleAcceleratorEmitterLeft
name: PA containment emitter L name: PA containment emitter L
description: This launchs the Alpha particles, might not want to stand near this end. description: This launchs the Alpha particles, might not want to stand near this end.
components: components:
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/emitter_left.rsi sprite: Structures/Power/Generation/PA/emitter_left.rsi
layers:
- state: leftc
map: [ "enum.ParticleAcceleratorVisualLayers.Base" ]
- state: unlitp
map: [ "enum.ParticleAcceleratorVisualLayers.Unlit" ]
shader: unshaded
visible: false
- type: Appearance
- type: ParticleAcceleratorPartVisuals
stateBase: unlit
- type: ParticleAcceleratorPart
- type: ParticleAcceleratorEmitter - type: ParticleAcceleratorEmitter
emitterType: Left emitterType: Left
- type: Construction - type: Construction
graph: ParticleAcceleratorEmitterLeft graph: ParticleAcceleratorEmitterLeft
node: completed
- type: GuideHelp
guides: [ Singularity, Power ]
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorFinishedPart
id: ParticleAcceleratorEmitterCenter id: ParticleAcceleratorEmitterCenter
name: PA containment emitter C name: PA containment emitter C
description: This launchs the Alpha particles, might not want to stand near this end. description: This launchs the Alpha particles, might not want to stand near this end.
components: components:
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/emitter_center.rsi sprite: Structures/Power/Generation/PA/emitter_center.rsi
layers:
- state: centerc
map: [ "enum.ParticleAcceleratorVisualLayers.Base" ]
- state: unlitp
map: [ "enum.ParticleAcceleratorVisualLayers.Unlit" ]
shader: unshaded
visible: false
- type: Appearance
- type: ParticleAcceleratorPartVisuals
stateBase: unlit
- type: ParticleAcceleratorPart
- type: ParticleAcceleratorEmitter - type: ParticleAcceleratorEmitter
emitterType: Center emitterType: Center
- type: Construction
graph: ParticleAcceleratorEmitterCenter graph: ParticleAcceleratorEmitterCenter
node: completed
- type: GuideHelp
guides: [ Singularity, Power ]
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorFinishedPart
id: ParticleAcceleratorEmitterRight id: ParticleAcceleratorEmitterRight
name: PA containment emitter R name: PA containment emitter R
description: This launchs the Alpha particles, might not want to stand near this end. description: This launchs the Alpha particles, might not want to stand near this end.
components: components:
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/emitter_right.rsi sprite: Structures/Power/Generation/PA/emitter_right.rsi
layers:
- state: rightc
map: [ "enum.ParticleAcceleratorVisualLayers.Base" ]
- state: unlitp
map: [ "enum.ParticleAcceleratorVisualLayers.Unlit" ]
shader: unshaded
visible: false
- type: Appearance
- type: ParticleAcceleratorPartVisuals
stateBase: unlit
- type: ParticleAcceleratorPart
- type: ParticleAcceleratorEmitter - type: ParticleAcceleratorEmitter
emitterType: Right emitterType: Right
- type: Construction - type: Construction
graph: ParticleAcceleratorEmitterRight graph: ParticleAcceleratorEmitterRight
node: completed
- type: GuideHelp
guides: [ Singularity, Power ]
# Unfinished # Unfinished
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorUnfinishedBase
id: ParticleAcceleratorEmitterLeftUnfinished id: ParticleAcceleratorEmitterLeftUnfinished
name: PA containment emitter L name: PA containment emitter L
suffix: Unfinished, Left suffix: Unfinished, Left
@@ -92,16 +50,11 @@
bodyType: Dynamic bodyType: Dynamic
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/emitter_left.rsi sprite: Structures/Power/Generation/PA/emitter_left.rsi
state: left
- type: Construction - type: Construction
graph: ParticleAcceleratorEmitterLeft graph: ParticleAcceleratorEmitterLeft
node: start
defaultTarget: completed
- type: GuideHelp
guides: [ Singularity, Power ]
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorUnfinishedBase
id: ParticleAcceleratorEmitterCenterUnfinished id: ParticleAcceleratorEmitterCenterUnfinished
name: PA containment emitter C name: PA containment emitter C
suffix: Unfinished suffix: Unfinished
@@ -111,16 +64,11 @@
bodyType: Dynamic bodyType: Dynamic
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/emitter_center.rsi sprite: Structures/Power/Generation/PA/emitter_center.rsi
state: center
- type: Construction - type: Construction
graph: ParticleAcceleratorEmitterCenter graph: ParticleAcceleratorEmitterCenter
node: start
defaultTarget: completed
- type: GuideHelp
guides: [ Singularity, Power ]
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorUnfinishedBase
id: ParticleAcceleratorEmitterRightUnfinished id: ParticleAcceleratorEmitterRightUnfinished
name: PA containment emitter R name: PA containment emitter R
suffix: Unfinished suffix: Unfinished
@@ -130,10 +78,5 @@
bodyType: Dynamic bodyType: Dynamic
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/emitter_right.rsi sprite: Structures/Power/Generation/PA/emitter_right.rsi
state: right
- type: Construction - type: Construction
graph: ParticleAcceleratorEmitterRight graph: ParticleAcceleratorEmitterRight
node: start
defaultTarget: completed
- type: GuideHelp
guides: [ Singularity, Power ]

View File

@@ -1,24 +1,22 @@
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorFinishedPart
id: ParticleAcceleratorEndCap id: ParticleAcceleratorEndCap
name: PA end-cap name: PA end-cap
description: Formally known as the Alpha Particle Generation Array. This is where Alpha particles are generated from [REDACTED]. description: Formally known as the Alpha Particle Generation Array. This is where Alpha particles are generated from [REDACTED].
components: components:
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/end_cap.rsi sprite: Structures/Power/Generation/PA/end_cap.rsi
state: capc layers:
- type: ParticleAcceleratorPart - state: completed
map: [ "enum.ParticleAcceleratorVisualLayers.Base" ]
- type: ParticleAcceleratorEndCap - type: ParticleAcceleratorEndCap
- type: Construction - type: Construction
graph: ParticleAcceleratorEndCap graph: ParticleAcceleratorEndCap
node: completed
- type: GuideHelp
guides: [ Singularity, Power ]
# Unfinished # Unfinished
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorUnfinishedBase
id: ParticleAcceleratorEndCapUnfinished id: ParticleAcceleratorEndCapUnfinished
name: PA end-cap name: PA end-cap
suffix: Unfinished suffix: Unfinished
@@ -28,10 +26,5 @@
bodyType: Dynamic bodyType: Dynamic
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/end_cap.rsi sprite: Structures/Power/Generation/PA/end_cap.rsi
state: cap
- type: Construction - type: Construction
graph: ParticleAcceleratorEndCap graph: ParticleAcceleratorEndCap
node: start
defaultTarget: completed
- type: GuideHelp
guides: [ Singularity, Power ]

View File

@@ -1,33 +1,19 @@
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorFinishedPart
id: ParticleAcceleratorFuelChamber id: ParticleAcceleratorFuelChamber
name: PA fuel chamber name: PA fuel chamber
description: Formally known as the EM Acceleration Chamber. This is where the Alpha particles are accelerated to radical speeds. description: Formally known as the EM Acceleration Chamber. This is where the Alpha particles are accelerated to radical speeds.
components: components:
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/fuel_chamber.rsi sprite: Structures/Power/Generation/PA/fuel_chamber.rsi
layers:
- state: chamberc
map: [ "enum.ParticleAcceleratorVisualLayers.Base" ]
- state: unlitp
map: [ "enum.ParticleAcceleratorVisualLayers.Unlit" ]
shader: unshaded
visible: false
- type: Appearance
- type: ParticleAcceleratorPartVisuals
stateBase: unlit
- type: ParticleAcceleratorPart
- type: ParticleAcceleratorFuelChamber - type: ParticleAcceleratorFuelChamber
- type: Construction - type: Construction
graph: ParticleAcceleratorFuelChamber graph: ParticleAcceleratorFuelChamber
node: completed
- type: GuideHelp
guides: [ Singularity, Power ]
# Unfinished # Unfinished
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorUnfinishedBase
id: ParticleAcceleratorFuelChamberUnfinished id: ParticleAcceleratorFuelChamberUnfinished
name: PA fuel chamber name: PA fuel chamber
suffix: Unfinished suffix: Unfinished
@@ -37,10 +23,5 @@
bodyType: Dynamic bodyType: Dynamic
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/fuel_chamber.rsi sprite: Structures/Power/Generation/PA/fuel_chamber.rsi
state: chamber
- type: Construction - type: Construction
graph: ParticleAcceleratorFuelChamber graph: ParticleAcceleratorFuelChamber
node: start
defaultTarget: completed
- type: GuideHelp
guides: [ Singularity, Power ]

View File

@@ -1,22 +1,11 @@
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorFinishedPart
id: ParticleAcceleratorPowerBox id: ParticleAcceleratorPowerBox
name: PA power box name: PA power box
description: Formally known as the Particle Focusing EM Lens. This uses electromagnetic waves to focus the Alpha-Particles. description: Formally known as the Particle Focusing EM Lens. This uses electromagnetic waves to focus the Alpha-Particles.
components: components:
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/power_box.rsi sprite: Structures/Power/Generation/PA/power_box.rsi
layers:
- state: boxc
map: [ "enum.ParticleAcceleratorVisualLayers.Base" ]
- state: unlitp
map: [ "enum.ParticleAcceleratorVisualLayers.Unlit" ]
shader: unshaded
visible: false
- type: Appearance
- type: ParticleAcceleratorPartVisuals
stateBase: unlit
- type: ParticleAcceleratorPart
- type: ParticleAcceleratorPowerBox - type: ParticleAcceleratorPowerBox
- type: PowerConsumer - type: PowerConsumer
voltage: High voltage: High
@@ -28,12 +17,9 @@
nodeGroupID: HVPower nodeGroupID: HVPower
- type: Construction - type: Construction
graph: ParticleAcceleratorPowerBox graph: ParticleAcceleratorPowerBox
node: completed
- type: GuideHelp
guides: [ Singularity, Power ]
- type: entity - type: entity
parent: ParticleAcceleratorBase parent: ParticleAcceleratorUnfinishedBase
id: ParticleAcceleratorPowerBoxUnfinished id: ParticleAcceleratorPowerBoxUnfinished
name: PA power box name: PA power box
suffix: Unfinished suffix: Unfinished
@@ -43,10 +29,6 @@
bodyType: Dynamic bodyType: Dynamic
- type: Sprite - type: Sprite
sprite: Structures/Power/Generation/PA/power_box.rsi sprite: Structures/Power/Generation/PA/power_box.rsi
state: box
- type: Construction - type: Construction
graph: ParticleAcceleratorPowerBox graph: ParticleAcceleratorPowerBox
node: start
defaultTarget: completed
- type: GuideHelp
guides: [ Singularity, Power ]

View File

@@ -99,7 +99,16 @@
- type: InteractionOutline - type: InteractionOutline
- type: Sprite - type: Sprite
sprite: Structures/Wallmounts/air_monitors.rsi sprite: Structures/Wallmounts/air_monitors.rsi
state: alarm_b1 layers:
- state: alarm_b1
map: [ "enum.ConstructionVisuals.Layer" ]
- type: Appearance
- type: GenericVisualizer
visuals:
enum.ConstructionVisuals.Key:
enum.ConstructionVisuals.Layer:
assembly: { state: alarm_b1 }
electronics: { state: alarm_b1 }
- type: Construction - type: Construction
graph: AirAlarm graph: AirAlarm
node: assembly node: assembly

View File

@@ -110,7 +110,16 @@
- type: InteractionOutline - type: InteractionOutline
- type: Sprite - type: Sprite
sprite: Structures/Wallmounts/air_monitors.rsi sprite: Structures/Wallmounts/air_monitors.rsi
state: fire_b1 layers:
- state: fire_b1
map: [ "enum.ConstructionVisuals.Layer" ]
- type: Appearance
- type: GenericVisualizer
visuals:
enum.ConstructionVisuals.Key:
enum.ConstructionVisuals.Layer:
assembly: { state: fire_b1 }
electronics: { state: fire_b2 }
- type: Construction - type: Construction
graph: FireAlarm graph: FireAlarm
node: assembly node: assembly

View File

@@ -14,8 +14,7 @@
- node: frameUnsecured - node: frameUnsecured
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "0"
entity: ComputerFrame entity: ComputerFrame
edges: edges:
- to: boardUnsecured - to: boardUnsecured
@@ -44,8 +43,7 @@
- node: boardUnsecured - node: boardUnsecured
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "1"
edges: edges:
- to: missingWires - to: missingWires
conditions: conditions:
@@ -58,15 +56,12 @@
- !type:EntityAnchored { } - !type:EntityAnchored { }
completed: completed:
- !type:EmptyAllContainers {} - !type:EmptyAllContainers {}
- !type:SpriteStateChange
state: 0
steps: steps:
- tool: Prying - tool: Prying
- node: missingWires - node: missingWires
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "2"
edges: edges:
- to: monitorMissing - to: monitorMissing
conditions: conditions:
@@ -85,8 +80,7 @@
entity: ComputerFrame entity: ComputerFrame
actions: actions:
- !type:SetAnchor { } - !type:SetAnchor { }
- !type:SpriteStateChange - !type:AppearanceChange
state: "3"
edges: edges:
- to: monitorUnsecured - to: monitorUnsecured
conditions: conditions:
@@ -107,8 +101,7 @@
- node: monitorUnsecured - node: monitorUnsecured
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "4"
entity: ComputerFrame entity: ComputerFrame
edges: edges:
- to: computer - to: computer

View File

@@ -16,8 +16,6 @@
- node: assembly - node: assembly
entity: AirlockAssembly entity: AirlockAssembly
actions: actions:
- !type:SpriteStateChange
state: assembly
- !type:SnapToGrid {} - !type:SnapToGrid {}
- !type:SetAnchor {} - !type:SetAnchor {}
edges: edges:

View File

@@ -16,8 +16,7 @@
- node: frame1 - node: frame1
entity: FirelockFrame entity: FirelockFrame
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: frame1
edges: edges:
- to: frame2 - to: frame2
conditions: conditions:
@@ -42,8 +41,7 @@
- node: frame2 - node: frame2
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: frame2
edges: edges:
- to: frame3 - to: frame3
conditions: conditions:
@@ -71,8 +69,7 @@
- node: frame3 - node: frame3
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: frame3
edges: edges:
- to: frame4 - to: frame4
conditions: conditions:
@@ -94,8 +91,7 @@
- node: frame4 - node: frame4
entity: FirelockFrame entity: FirelockFrame
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: frame4
edges: edges:
- to: Firelock - to: Firelock
conditions: conditions:

View File

@@ -16,8 +16,6 @@
- node: assembly - node: assembly
entity: AirlockShuttleAssembly entity: AirlockShuttleAssembly
actions: actions:
# - !type:SpriteStateChange
# state: assembly # TODO Need assembly sprite
- !type:SnapToGrid {} - !type:SnapToGrid {}
- !type:SetAnchor {} - !type:SetAnchor {}
edges: edges:

View File

@@ -13,8 +13,7 @@
- node: assembly - node: assembly
entity: AirAlarmAssembly entity: AirAlarmAssembly
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: alarm_b1
edges: edges:
- to: wired - to: wired
steps: steps:
@@ -54,8 +53,7 @@
- node: electronics - node: electronics
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: alarm_b2
edges: edges:
- to: air_alarm - to: air_alarm
steps: steps:
@@ -92,8 +90,7 @@
- node: assembly - node: assembly
entity: FireAlarmAssembly entity: FireAlarmAssembly
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: fire_b1
edges: edges:
- to: wired - to: wired
steps: steps:
@@ -133,8 +130,7 @@
- node: electronics - node: electronics
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: fire_b2
edges: edges:
- to: fire_alarm - to: fire_alarm
steps: steps:

View File

@@ -11,9 +11,6 @@
doAfter: 1 doAfter: 1
- node: assembly - node: assembly
entity: AirSensorAssembly entity: AirSensorAssembly
actions:
- !type:SpriteStateChange
state: gsensor0
edges: edges:
- to: start - to: start
conditions: conditions:

View File

@@ -29,8 +29,7 @@
- node: frame_cable - node: frame_cable
entity: DisposalMachineFrame entity: DisposalMachineFrame
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "frame_cables"
edges: edges:
- to: frame - to: frame
completed: completed:
@@ -48,8 +47,7 @@
- node: frame_electronics - node: frame_electronics
entity: DisposalMachineFrame entity: DisposalMachineFrame
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "frame_electronics"
edges: edges:
- to: frame_cable - to: frame_cable
completed: completed:
@@ -75,8 +73,7 @@
- node: frame_unit - node: frame_unit
entity: DisposalMachineFrame entity: DisposalMachineFrame
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "frame_unit"
edges: edges:
- to: frame_inlet - to: frame_inlet
steps: steps:
@@ -106,8 +103,7 @@
- node: frame_mailing - node: frame_mailing
entity: DisposalMachineFrame entity: DisposalMachineFrame
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "frame_unit"
edges: edges:
- to: frame_electronics - to: frame_electronics
steps: steps:
@@ -137,8 +133,7 @@
- node: frame_inlet - node: frame_inlet
entity: DisposalMachineFrame entity: DisposalMachineFrame
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "frame_inlet"
edges: edges:
- to: frame_outlet - to: frame_outlet
steps: steps:
@@ -168,8 +163,7 @@
- node: frame_outlet - node: frame_outlet
entity: DisposalMachineFrame entity: DisposalMachineFrame
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "frame_outlet"
edges: edges:
- to: frame_electronics - to: frame_electronics
steps: steps:

View File

@@ -5,8 +5,7 @@
- node: start - node: start
entity: ParticleAcceleratorControlBoxUnfinished entity: ParticleAcceleratorControlBoxUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "box"
edges: edges:
- to: wired - to: wired
conditions: conditions:
@@ -18,8 +17,7 @@
- node: wired - node: wired
entity: ParticleAcceleratorControlBoxUnfinished entity: ParticleAcceleratorControlBoxUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "boxw"
edges: edges:
- to: completed - to: completed
conditions: conditions:
@@ -57,8 +55,7 @@
- node: start - node: start
entity: ParticleAcceleratorPowerBoxUnfinished entity: ParticleAcceleratorPowerBoxUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "box"
edges: edges:
- to: wired - to: wired
conditions: conditions:
@@ -70,8 +67,7 @@
- node: wired - node: wired
entity: ParticleAcceleratorPowerBoxUnfinished entity: ParticleAcceleratorPowerBoxUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "boxw"
edges: edges:
- to: completed - to: completed
conditions: conditions:
@@ -109,8 +105,7 @@
- node: start - node: start
entity: ParticleAcceleratorFuelChamberUnfinished entity: ParticleAcceleratorFuelChamberUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "chamber"
edges: edges:
- to: wired - to: wired
conditions: conditions:
@@ -122,8 +117,7 @@
- node: wired - node: wired
entity: ParticleAcceleratorFuelChamberUnfinished entity: ParticleAcceleratorFuelChamberUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "chamberw"
edges: edges:
- to: completed - to: completed
conditions: conditions:
@@ -160,8 +154,7 @@
- node: start - node: start
entity: ParticleAcceleratorEndCapUnfinished entity: ParticleAcceleratorEndCapUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "cap"
edges: edges:
- to: wired - to: wired
conditions: conditions:
@@ -173,8 +166,7 @@
- node: wired - node: wired
entity: ParticleAcceleratorEndCapUnfinished entity: ParticleAcceleratorEndCapUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "capw"
edges: edges:
- to: completed - to: completed
conditions: conditions:
@@ -211,8 +203,7 @@
- node: start - node: start
entity: ParticleAcceleratorEmitterLeftUnfinished entity: ParticleAcceleratorEmitterLeftUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "left"
edges: edges:
- to: wired - to: wired
conditions: conditions:
@@ -224,8 +215,7 @@
- node: wired - node: wired
entity: ParticleAcceleratorEmitterLeftUnfinished entity: ParticleAcceleratorEmitterLeftUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "leftw"
edges: edges:
- to: completed - to: completed
conditions: conditions:
@@ -262,8 +252,7 @@
- node: start - node: start
entity: ParticleAcceleratorEmitterCenterUnfinished entity: ParticleAcceleratorEmitterCenterUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "center"
edges: edges:
- to: wired - to: wired
conditions: conditions:
@@ -275,8 +264,7 @@
- node: wired - node: wired
entity: ParticleAcceleratorEmitterCenterUnfinished entity: ParticleAcceleratorEmitterCenterUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "centerw"
edges: edges:
- to: completed - to: completed
conditions: conditions:
@@ -313,8 +301,7 @@
- node: start - node: start
entity: ParticleAcceleratorEmitterRightUnfinished entity: ParticleAcceleratorEmitterRightUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "right"
edges: edges:
- to: wired - to: wired
conditions: conditions:
@@ -326,8 +313,7 @@
- node: wired - node: wired
entity: ParticleAcceleratorEmitterRightUnfinished entity: ParticleAcceleratorEmitterRightUnfinished
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: "rightw"
edges: edges:
- to: completed - to: completed
conditions: conditions:

View File

@@ -14,8 +14,7 @@
- node: emptyCase - node: emptyCase
entity: ModularGrenade entity: ModularGrenade
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: empty
edges: edges:
- to: wiredCase - to: wiredCase
steps: steps:
@@ -34,8 +33,7 @@
- node: wiredCase - node: wiredCase
entity: ModularGrenade entity: ModularGrenade
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: wired
- !type:PlaySound - !type:PlaySound
sound: /Audio/Machines/button.ogg sound: /Audio/Machines/button.ogg
edges: edges:
@@ -55,8 +53,7 @@
- node: caseWithTrigger - node: caseWithTrigger
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: no-payload
- !type:PlaySound - !type:PlaySound
sound: /Audio/Machines/button.ogg sound: /Audio/Machines/button.ogg
edges: edges:
@@ -76,8 +73,7 @@
- node: grenade - node: grenade
actions: actions:
- !type:SpriteStateChange - !type:AppearanceChange
state: complete
- !type:PlaySound - !type:PlaySound
sound: /Audio/Machines/button.ogg sound: /Audio/Machines/button.ogg
- !type:AdminLog - !type:AdminLog

View File

@@ -8,10 +8,10 @@
}, },
"states": [ "states": [
{ {
"name": "box" "name": "unwired"
}, },
{ {
"name": "boxc", "name": "completed",
"directions": 4 "directions": 4
}, },
{ {
@@ -41,7 +41,7 @@
] ]
}, },
{ {
"name": "boxw", "name": "wired",
"directions": 4 "directions": 4
} }
] ]

View File

@@ -8,11 +8,11 @@
}, },
"states": [ "states": [
{ {
"name": "center", "name": "unwired",
"directions": 4 "directions": 4
}, },
{ {
"name": "centerc", "name": "completed",
"directions": 4 "directions": 4
}, },
{ {
@@ -36,7 +36,7 @@
"directions": 4 "directions": 4
}, },
{ {
"name": "centerw", "name": "wired",
"directions": 4 "directions": 4
} }
] ]

View File

@@ -8,11 +8,11 @@
}, },
"states": [ "states": [
{ {
"name": "left", "name": "unwired",
"directions": 4 "directions": 4
}, },
{ {
"name": "leftc", "name": "completed",
"directions": 4 "directions": 4
}, },
{ {
@@ -36,7 +36,7 @@
"directions": 4 "directions": 4
}, },
{ {
"name": "leftw", "name": "wired",
"directions": 4 "directions": 4
} }
] ]

View File

@@ -8,11 +8,11 @@
}, },
"states": [ "states": [
{ {
"name": "right", "name": "unwired",
"directions": 4 "directions": 4
}, },
{ {
"name": "rightc", "name": "completed",
"directions": 4 "directions": 4
}, },
{ {
@@ -36,7 +36,7 @@
"directions": 4 "directions": 4
}, },
{ {
"name": "rightw", "name": "wired",
"directions": 4 "directions": 4
} }
] ]

View File

@@ -8,15 +8,15 @@
}, },
"states": [ "states": [
{ {
"name": "cap", "name": "unwired",
"directions": 4 "directions": 4
}, },
{ {
"name": "capc", "name": "completed",
"directions": 4 "directions": 4
}, },
{ {
"name": "capw", "name": "wired",
"directions": 4 "directions": 4
} }
] ]

View File

@@ -8,11 +8,11 @@
}, },
"states": [ "states": [
{ {
"name": "chamber", "name": "unwired",
"directions": 4 "directions": 4
}, },
{ {
"name": "chamberc", "name": "completed",
"directions": 4 "directions": 4
}, },
{ {
@@ -36,7 +36,7 @@
"directions": 4 "directions": 4
}, },
{ {
"name": "chamberw", "name": "wired",
"directions": 4 "directions": 4
} }
] ]

View File

@@ -8,11 +8,11 @@
}, },
"states": [ "states": [
{ {
"name": "box", "name": "unwired",
"directions": 4 "directions": 4
}, },
{ {
"name": "boxc", "name": "completed",
"directions": 4 "directions": 4
}, },
{ {
@@ -36,7 +36,7 @@
"directions": 4 "directions": 4
}, },
{ {
"name": "boxw", "name": "wired",
"directions": 4 "directions": 4
} }
] ]