From 1fceb747cb0f1f406eeb6b50a7bd47094817d9a4 Mon Sep 17 00:00:00 2001 From: LukaSlade Date: Mon, 3 Nov 2025 14:31:57 -0800 Subject: [PATCH] Voice Sensor Item (#41098) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * Voice Signaler can be Linked * Fixes and Balancing * a space has officially been added * thinmfg * things * finalized everything I think? * fixed?? * actually commit please (imagine this fixes everything im gonna cry) * new fix * Update Resources/Prototypes/Entities/Objects/Devices/Electronics/misc_linking_utilities.yml added as per review Co-authored-by: āda * connection range from 25 to 15 * Renamed state from 'voice' to 'icon' * Change state from 'voice' to 'icon' in YAML * removed comma from voicesensor sprite yml * Modify defaultLinks for Trigger source port Updated defaultLinks for Trigger source port. * Changed PNG name from voice to icon * Removed G menu recipe and added autolathe recipe * Fixed test fail * removed empty line * removed another line * removed extra lines in meta.json * test commit to rerun tests --------- Co-authored-by: āda --- .../Prototypes/DeviceLinking/source_ports.yml | 2 +- .../Electronics/misc_linking_utilities.yml | 28 ++++++++++++++++++ .../Recipes/Lathes/Packs/engineering.yml | 1 + .../Prototypes/Recipes/Lathes/devices.yml | 13 ++++++-- .../Prototypes/SoundCollections/machines.yml | 5 ++++ .../Objects/Devices/voicesensor.rsi/icon.png | Bin 0 -> 520 bytes .../Objects/Devices/voicesensor.rsi/meta.json | 15 ++++++++++ 7 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 Resources/Prototypes/Entities/Objects/Devices/Electronics/misc_linking_utilities.yml create mode 100644 Resources/Textures/Objects/Devices/voicesensor.rsi/icon.png create mode 100644 Resources/Textures/Objects/Devices/voicesensor.rsi/meta.json diff --git a/Resources/Prototypes/DeviceLinking/source_ports.yml b/Resources/Prototypes/DeviceLinking/source_ports.yml index 5eb059b191..1c13d692df 100644 --- a/Resources/Prototypes/DeviceLinking/source_ports.yml +++ b/Resources/Prototypes/DeviceLinking/source_ports.yml @@ -162,7 +162,7 @@ id: Trigger name: signal-port-name-trigger-sender description: signal-port-description-trigger-sender - defaultLinks: [ AutoClose, On, Open, Forward, Trigger, Timer ] + defaultLinks: [ Toggle, Trigger, Timer ] - type: sourcePort id: ItemDetected diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/misc_linking_utilities.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/misc_linking_utilities.yml new file mode 100644 index 0000000000..a4b5e01ffe --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/misc_linking_utilities.yml @@ -0,0 +1,28 @@ +- type: entity + parent: BaseItem + id: voicesensor + name: voice sensor + description: This microphone, invented by Micheal Phone during his time working at Michealsoft, sends signals when a prerecorded code phrase is uttered! + components: + - type: Sprite + sprite: Objects/Devices/voicesensor.rsi + state: icon + - type: StaticPrice + price: 40 + - type: DeviceLinkSource + ports: + - Trigger + - type: SignalOnTrigger + port: Trigger + - type: TriggerOnVoice + - type: UseDelayOnTrigger + - type: UseDelayTriggerCondition + - type: UseDelay + - type: EmitSoundOnTrigger + sound: + collection: TriggerActivate + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 15 diff --git a/Resources/Prototypes/Recipes/Lathes/Packs/engineering.yml b/Resources/Prototypes/Recipes/Lathes/Packs/engineering.yml index 1f504e3ae4..6f5b09521e 100644 --- a/Resources/Prototypes/Recipes/Lathes/Packs/engineering.yml +++ b/Resources/Prototypes/Recipes/Lathes/Packs/engineering.yml @@ -3,6 +3,7 @@ - type: latheRecipePack id: ToolsStatic recipes: + - VoiceSensor - Wirecutter - Screwdriver - Welder diff --git a/Resources/Prototypes/Recipes/Lathes/devices.yml b/Resources/Prototypes/Recipes/Lathes/devices.yml index b703aa1240..64c1dfbaae 100644 --- a/Resources/Prototypes/Recipes/Lathes/devices.yml +++ b/Resources/Prototypes/Recipes/Lathes/devices.yml @@ -62,6 +62,15 @@ Plastic: 200 Glass: 100 +- type: latheRecipe + parent: BasePartRecipe + id: VoiceSensor + result: voicesensor + materials: + Steel: 100 + Plastic: 200 + Glass: 100 + - type: latheRecipe parent: BasePartRecipe id: SignallerAdvanced @@ -220,7 +229,7 @@ - type: latheRecipe id: CableDetStack1 result: CableDetStack1 - categories: + categories: - Weapons completetime: 2 materials: @@ -231,7 +240,7 @@ - type: latheRecipe id: EmptyDetonator result: EmptyDetonator - categories: + categories: - Weapons completetime: 3 materials: diff --git a/Resources/Prototypes/SoundCollections/machines.yml b/Resources/Prototypes/SoundCollections/machines.yml index 45768bfa88..4207e37005 100644 --- a/Resources/Prototypes/SoundCollections/machines.yml +++ b/Resources/Prototypes/SoundCollections/machines.yml @@ -37,3 +37,8 @@ id: MachineInsert files: - /Audio/Weapons/Guns/MagIn/revolver_magin.ogg + +- type: soundCollection + id: TriggerActivate + files: + - /Audio/Weapons/click.ogg diff --git a/Resources/Textures/Objects/Devices/voicesensor.rsi/icon.png b/Resources/Textures/Objects/Devices/voicesensor.rsi/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..5a0f5e80c20d018b0440f22c58115963381ed8ba GIT binary patch literal 520 zcmV+j0{8uiP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0i8)iK~z{r?UFG| z!%z^%{}qZZq1amb3K`l4Y9}2mj}8S_*FuMmE`A9=hnx5fia0qHM95;z5EqG*Zf|I) zO=z=p5aM7{?8An4w&Ic>gpkX=08bLAPE!-1qdOK$z)*L_Of}gScDJ)rBVsKUQa$23;E`9&O_IA zq3b%P(2wrhujSdYlxmYE z@OHD0t6dGA@2`Ch@_G4KEF^*ZqbC5s`1WfO>)sTU#)QQRJ|0eRdHjlNV{heOwOU>I zejksOSD=)Hg@7E3!}C0)+Db_ghG8g442MHfT_q?JpyVbbBzyvx1hZAcE6B0{0000< KMNUMnLSTY8kJS1A literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Devices/voicesensor.rsi/meta.json b/Resources/Textures/Objects/Devices/voicesensor.rsi/meta.json new file mode 100644 index 0000000000..8471ef613d --- /dev/null +++ b/Resources/Textures/Objects/Devices/voicesensor.rsi/meta.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c71e03214013191760284361aaff7af90505aaab", + + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + } + ] +} -- 2.51.2