]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Voice Sensor Item (#41098)
authorLukaSlade <revensedsuns@gmail.com>
Mon, 3 Nov 2025 22:31:57 +0000 (14:31 -0800)
committerGitHub <noreply@github.com>
Mon, 3 Nov 2025 22:31:57 +0000 (22:31 +0000)
* 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 <ss.adasts@gmail.com>
* 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 <ss.adasts@gmail.com>
Resources/Prototypes/DeviceLinking/source_ports.yml
Resources/Prototypes/Entities/Objects/Devices/Electronics/misc_linking_utilities.yml [new file with mode: 0644]
Resources/Prototypes/Recipes/Lathes/Packs/engineering.yml
Resources/Prototypes/Recipes/Lathes/devices.yml
Resources/Prototypes/SoundCollections/machines.yml
Resources/Textures/Objects/Devices/voicesensor.rsi/icon.png [new file with mode: 0644]
Resources/Textures/Objects/Devices/voicesensor.rsi/meta.json [new file with mode: 0644]

index 5eb059b191c7866a0ad64f47bc8c4f39c889b944..1c13d692df3a361d57d7d23c9a6d01a70582c246 100644 (file)
   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 (file)
index 0000000..a4b5e01
--- /dev/null
@@ -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
index 1f504e3ae4a1076065b96226ecb96c53e4cd207b..6f5b09521e9f9d1e0890540eddd839e262756a27 100644 (file)
@@ -3,6 +3,7 @@
 - type: latheRecipePack
   id: ToolsStatic
   recipes:
+  - VoiceSensor
   - Wirecutter
   - Screwdriver
   - Welder
index b703aa124041744c497ba648efb3542c1af815c3..64c1dfbaaeddeac742decebbfe64e0e88b445938 100644 (file)
     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
 - type: latheRecipe
   id: CableDetStack1
   result: CableDetStack1
-  categories: 
+  categories:
   - Weapons
   completetime: 2
   materials:
 - type: latheRecipe
   id: EmptyDetonator
   result: EmptyDetonator
-  categories: 
+  categories:
   - Weapons
   completetime: 3
   materials:
index 45768bfa88c9a3d3436ee961180c143c316213e2..4207e37005f86cee6080272a1f36a9e6c30cc58a 100644 (file)
@@ -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 (file)
index 0000000..5a0f5e8
Binary files /dev/null and b/Resources/Textures/Objects/Devices/voicesensor.rsi/icon.png differ
diff --git a/Resources/Textures/Objects/Devices/voicesensor.rsi/meta.json b/Resources/Textures/Objects/Devices/voicesensor.rsi/meta.json
new file mode 100644 (file)
index 0000000..8471ef6
--- /dev/null
@@ -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"
+        }
+    ]
+}