From bb6c9a05874caf82f99b85e71eadd42a0df4dbdc Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 13 Jul 2024 11:37:31 +0300 Subject: [PATCH] Actually, move to the component --- .../Nyanotrasen/Item/ShockCollar/ShockCollarComponent.cs | 8 +++++++- .../Nyanotrasen/Item/ShockCollar/ShockCollarSystem.cs | 2 +- 2 files changed, 8 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 a39f0bbe99f..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, 1, TimeSpan.FromSeconds(2), true, ignoreInsulation: true); + _electrocutionSystem.TryDoElectrocution(containerEnt, null, component.ShockDamage, component.ShockTime, true, ignoreInsulation: true); } }