From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Sat, 29 Apr 2023 08:58:15 +0000 (+1200) Subject: Remove SpriteChange construction action (#15887) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=ce153a7986fbfb38f70d7d99e25341877e9c7323;p=space-station-14.git Remove SpriteChange construction action (#15887) --- diff --git a/Content.Server/Construction/Completions/SpriteChange.cs b/Content.Server/Construction/Completions/SpriteChange.cs deleted file mode 100644 index 0592b112fc..0000000000 --- a/Content.Server/Construction/Completions/SpriteChange.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Content.Shared.Construction; -using JetBrains.Annotations; -using Robust.Server.GameObjects; -using Robust.Shared.Utility; - -namespace Content.Server.Construction.Completions -{ - [UsedImplicitly] - [DataDefinition] - public sealed class SpriteChange : IGraphAction - { - [DataField("layer")] public int Layer { get; private set; } = 0; - [DataField("specifier")] public SpriteSpecifier? SpriteSpecifier { get; private set; } = SpriteSpecifier.Invalid; - - public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager) - { - if (SpriteSpecifier == null || SpriteSpecifier == SpriteSpecifier.Invalid) - return; - - if (!entityManager.TryGetComponent(uid, out SpriteComponent? sprite)) - return; - - // That layer doesn't exist, we do nothing. - if (sprite.LayerCount <= Layer) - return; - - sprite.LayerSetSprite(Layer, SpriteSpecifier); - } - } -} diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/girder.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/girder.yml index 20cf9cf15c..e133535a06 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/girder.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/girder.yml @@ -15,11 +15,6 @@ - node: girder entity: Girder - actions: - - !type:SpriteChange - specifier: - sprite: /Textures/Structures/Walls/solid.rsi - state: wall_girder edges: - to: start completed: diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_machines.yml b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_machines.yml index 7a5e0d9c20..c722021e7b 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_machines.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_machines.yml @@ -11,11 +11,6 @@ doAfter: 1 - node: frame entity: DisposalMachineFrame - actions: - - !type:SpriteChange - specifier: - sprite: /Textures/Structures/Piping/high_pressure_machine_frame.rsi - state: frame edges: - to: start completed: