From: Funce Date: Wed, 4 Jun 2025 11:10:06 +0000 (+1200) Subject: Blood-Red Magboots now correctly show if magboots are active (#38013) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=148fb5ca2331066dbe9f78c8e8764a92ad925aba;p=space-station-14.git Blood-Red Magboots now correctly show if magboots are active (#38013) * Change JetPack Item Visuals to use GenericVisualizer instead of AppearanceChangeEvents * Fix YAML indentation for jetpacks.yml --- diff --git a/Content.Client/Movement/Systems/JetpackSystem.cs b/Content.Client/Movement/Systems/JetpackSystem.cs index 6810bb24cc..bf80ed4252 100644 --- a/Content.Client/Movement/Systems/JetpackSystem.cs +++ b/Content.Client/Movement/Systems/JetpackSystem.cs @@ -34,10 +34,6 @@ public sealed class JetpackSystem : SharedJetpackSystem { Appearance.TryGetData(uid, JetpackVisuals.Enabled, out var enabled, args.Component); - var state = "icon" + (enabled ? "-on" : ""); - if (args.Sprite != null) - _sprite.LayerSetRsiState((uid, args.Sprite), 0, state); - if (TryComp(uid, out var clothing)) _clothing.SetEquippedPrefix(uid, enabled ? "on" : null, clothing); } diff --git a/Content.Shared/Movement/Systems/SharedJetpackSystem.cs b/Content.Shared/Movement/Systems/SharedJetpackSystem.cs index 72f321d8f5..0ebcee9f8b 100644 --- a/Content.Shared/Movement/Systems/SharedJetpackSystem.cs +++ b/Content.Shared/Movement/Systems/SharedJetpackSystem.cs @@ -202,4 +202,5 @@ public abstract class SharedJetpackSystem : EntitySystem public enum JetpackVisuals : byte { Enabled, + Layer } diff --git a/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml b/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml index 682ee4ff0b..f70d2944c4 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml @@ -25,35 +25,43 @@ name: jetpack description: It's a jetpack. It can hold 5 L of gas. components: - - type: Sprite - sprite: Objects/Tanks/Jetpacks/blue.rsi - state: icon - - type: Item - sprite: Objects/Tanks/Jetpacks/blue.rsi - size: Huge - - type: UserInterface - interfaces: - enum.SharedGasTankUiKey.Key: - type: GasTankBoundUserInterface - - type: UseDelay - delays: - gasTank: - length: 1.0 - - type: Clothing - sprite: Objects/Tanks/Jetpacks/blue.rsi - quickEquip: false - slots: - - Back - - type: GasTank - outputPressure: 21.3 - air: - volume: 5 - temperature: 293.15 - - type: Jetpack - moleUsage: 0.00085 - - type: Appearance - - type: StaticPrice - price: 100 + - type: Sprite + sprite: Objects/Tanks/Jetpacks/blue.rsi + layers: + - state: icon + map: ["enum.JetpackVisuals.Layer"] + - type: Item + sprite: Objects/Tanks/Jetpacks/blue.rsi + size: Huge + - type: UserInterface + interfaces: + enum.SharedGasTankUiKey.Key: + type: GasTankBoundUserInterface + - type: UseDelay + delays: + gasTank: + length: 1.0 + - type: Clothing + sprite: Objects/Tanks/Jetpacks/blue.rsi + quickEquip: false + slots: + - Back + - type: GasTank + outputPressure: 21.3 + air: + volume: 5 + temperature: 293.15 + - type: Jetpack + moleUsage: 0.00085 + - type: Appearance + - type: GenericVisualizer + visuals: + enum.JetpackVisuals.Enabled: + enum.JetpackVisuals.Layer: + True: {state: icon-on} + False: {state: icon} + - type: StaticPrice + price: 100 - type: entity parent: BaseAction