From 964ed8fdeea8a3cb2e7bb69dd7756db4483412c4 Mon Sep 17 00:00:00 2001 From: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> Date: Mon, 15 Jul 2024 02:14:03 +0300 Subject: [PATCH] Shock Collar Tweak (#546) # Description Shock collars were a useful thing in nyano for a long time, but security could never put them to use because they could be removed instantly, so they were forgotten about. Now that we have enquip delays, shock collars can be useful for controlling unruly prisoners (or unruly secoffs who like to harm baton passengers). Only two problems is there's no way to manufacture them, and they can be quite deadly when used repeatedly. This PR solves both of these issues, and also fixes a little bug: - Shock collars can be manufactured at the secfab. - Shock collars deal 1 shock damage instead of 5. - The shock ignores insulation.

Media

![image](https://github.com/user-attachments/assets/16d8efdf-c3de-46de-9a48-401d99c92b29)

--- # Changelog :cl: - tweak: Shock collars can now be manufactured in the security techfab. They also deal less damage and ignore insulated gloves. --- .../Nyanotrasen/Item/ShockCollar/ShockCollarComponent.cs | 8 +++++++- .../Nyanotrasen/Item/ShockCollar/ShockCollarSystem.cs | 2 +- .../Prototypes/Entities/Structures/Machines/lathe.yml | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarComponent.cs b/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarComponent.cs index 781f2d00030..1dcbc48676a 100644 --- a/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarComponent.cs +++ b/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarComponent.cs @@ -2,5 +2,11 @@ namespace Content.Server.ShockCollar; [RegisterComponent] public sealed partial class ShockCollarComponent : Component -{} +{ + [DataField] + public int ShockDamage = 1; + + [DataField] + public TimeSpan ShockTime = TimeSpan.FromSeconds(2); +} diff --git a/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarSystem.cs b/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarSystem.cs index 4b24f45401a..eeb0f59d42a 100644 --- a/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarSystem.cs +++ b/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarSystem.cs @@ -33,7 +33,7 @@ private void OnTrigger(EntityUid uid, ShockCollarComponent component, TriggerEve && !_useDelay.TryResetDelay((uid, useDelay), true)) return; - _electrocutionSystem.TryDoElectrocution(containerEnt, null, 5, TimeSpan.FromSeconds(2), true); + _electrocutionSystem.TryDoElectrocution(containerEnt, null, component.ShockDamage, component.ShockTime, true, ignoreInsulation: true); } } diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 1ff5a7dbb62..c632116612a 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -743,6 +743,7 @@ - ShellShotgunPractice - WeaponLaserCarbinePractice - WeaponDisablerPractice + - ShockCollar # DeltaV - .38 special ammo - Add various .38 special ammo to security techfab - MagazineBoxSpecial - MagazineBoxSpecialPractice