From 8bba4b852b9a0b05bd29c83591fd8a150d68d2e5 Mon Sep 17 00:00:00 2001 From: themias <89101928+themias@users.noreply.github.com> Date: Thu, 11 Jan 2024 18:25:27 -0500 Subject: [PATCH] Headphones can be turned on (#23882) Toggle headphones --- .../Entities/Clothing/Neck/misc.yml | 22 ++++++++++++++++++ .../Neck/Misc/headphones.rsi/meta.json | 2 +- ...quipped-NECK.png => off-equipped-NECK.png} | Bin 3 files changed, 23 insertions(+), 1 deletion(-) rename Resources/Textures/Clothing/Neck/Misc/headphones.rsi/{equipped-NECK.png => off-equipped-NECK.png} (100%) diff --git a/Resources/Prototypes/Entities/Clothing/Neck/misc.yml b/Resources/Prototypes/Entities/Clothing/Neck/misc.yml index 6516bd4729..05067ff68a 100644 --- a/Resources/Prototypes/Entities/Clothing/Neck/misc.yml +++ b/Resources/Prototypes/Entities/Clothing/Neck/misc.yml @@ -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 diff --git a/Resources/Textures/Clothing/Neck/Misc/headphones.rsi/meta.json b/Resources/Textures/Clothing/Neck/Misc/headphones.rsi/meta.json index cb02ab5e25..c4b27b734f 100644 --- a/Resources/Textures/Clothing/Neck/Misc/headphones.rsi/meta.json +++ b/Resources/Textures/Clothing/Neck/Misc/headphones.rsi/meta.json @@ -50,7 +50,7 @@ ] }, { - "name": "equipped-NECK", + "name": "off-equipped-NECK", "directions": 4 }, { diff --git a/Resources/Textures/Clothing/Neck/Misc/headphones.rsi/equipped-NECK.png b/Resources/Textures/Clothing/Neck/Misc/headphones.rsi/off-equipped-NECK.png similarity index 100% rename from Resources/Textures/Clothing/Neck/Misc/headphones.rsi/equipped-NECK.png rename to Resources/Textures/Clothing/Neck/Misc/headphones.rsi/off-equipped-NECK.png -- 2.51.2