Skip to content

Commit

Permalink
Actually, move to the component
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Jul 13, 2024
1 parent d95a88e commit bb6c9a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit bb6c9a0

Please sign in to comment.