]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Blood-Red Magboots now correctly show if magboots are active (#38013)
authorFunce <funce.973@gmail.com>
Wed, 4 Jun 2025 11:10:06 +0000 (23:10 +1200)
committerGitHub <noreply@github.com>
Wed, 4 Jun 2025 11:10:06 +0000 (13:10 +0200)
* Change JetPack Item Visuals to use GenericVisualizer instead of AppearanceChangeEvents

* Fix YAML indentation for jetpacks.yml

Content.Client/Movement/Systems/JetpackSystem.cs
Content.Shared/Movement/Systems/SharedJetpackSystem.cs
Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml

index 6810bb24cc9c18f8c45686bbc7f0d9bb56c461d4..bf80ed4252faf34d31482ecdb8f13fb847204d40 100644 (file)
@@ -34,10 +34,6 @@ public sealed class JetpackSystem : SharedJetpackSystem
     {
         Appearance.TryGetData<bool>(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<ClothingComponent>(uid, out var clothing))
             _clothing.SetEquippedPrefix(uid, enabled ? "on" : null, clothing);
     }
index 72f321d8f55f7ca30451ab11e1ae0062a6b02db2..0ebcee9f8b6ec690c739dd60800b749937f98095 100644 (file)
@@ -202,4 +202,5 @@ public abstract class SharedJetpackSystem : EntitySystem
 public enum JetpackVisuals : byte
 {
     Enabled,
+    Layer
 }
index 682ee4ff0b5ddf7d1f9fa4a6d697f1ca1aad0f6e..f70d2944c4cbfa5d4b98c42f451b5b3f2a8faa6e 100644 (file)
   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