]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Headphones can be turned on (#23882)
authorthemias <89101928+themias@users.noreply.github.com>
Thu, 11 Jan 2024 23:25:27 +0000 (18:25 -0500)
committerGitHub <noreply@github.com>
Thu, 11 Jan 2024 23:25:27 +0000 (16:25 -0700)
Toggle headphones

Resources/Prototypes/Entities/Clothing/Neck/misc.yml
Resources/Textures/Clothing/Neck/Misc/headphones.rsi/meta.json
Resources/Textures/Clothing/Neck/Misc/headphones.rsi/off-equipped-NECK.png [moved from Resources/Textures/Clothing/Neck/Misc/headphones.rsi/equipped-NECK.png with 100% similarity]

index 6516bd4729cf65690ecfd3c9d405327d776f4c55..05067ff68a007321a9646e4104d344ef62782a68 100644 (file)
@@ -6,8 +6,30 @@
   components:
   - type: Sprite
     sprite: Clothing/Neck/Misc/headphones.rsi
+    layers:
+    - state: icon
+      map: [ "enum.ToggleVisuals.Layer" ]
   - type: Clothing
+    equippedPrefix: off
     sprite: Clothing/Neck/Misc/headphones.rsi
+  - type: ToggleableLightVisuals
+    spriteLayer: enum.ToggleVisuals.Layer
+    clothingVisuals:
+      neck:
+      - state: on-equipped-NECK
+  - type: Appearance
+  - type: GenericVisualizer
+    visuals:
+      enum.ToggleVisuals.Toggled:
+        enum.ToggleVisuals.Layer:
+          True: {state: icon-on}
+          False: {state: icon}
+  - type: ItemToggle
+    predictable: false
+    soundActivate:
+      path: /Audio/Items/flashlight_on.ogg
+    soundDeactivate:
+      path: /Audio/Items/flashlight_off.ogg
 
 - type: entity
   parent: ClothingNeckBase
index cb02ab5e25793aeca65d24021ca37d3aa5e49ada..c4b27b734fec218386b33b64675b42f8f6f62688 100644 (file)
@@ -50,7 +50,7 @@
       ]
     },
     {
-      "name": "equipped-NECK",
+      "name": "off-equipped-NECK",
       "directions": 4
     },
     {