Всякое (#271)
* - tweak: Something. * - tweak: Tweaks. * - tweak: Death to autoklickers. * - tweak: Warop tweak. * - tweak: Neuro tweaks. * - add: Translate animal accents. * - fix: Embeddable projectiles miss corpses. * - tweak: More sniper ammo. * - tweak: Free clothes in uplink. * - tweak: Less speed up from stuff. * - tweak: Ammo counter and toggleable clothing stuff. * - add: More emag stuff. * - tweak: No neuro blunt stamina damage. * - fix: Fix name. * - fix: Fix desc.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Content.Shared.Damage.Systems;
|
||||
using Content.Shared.Electrocution;
|
||||
using Content.Shared.StatusEffect;
|
||||
|
||||
namespace Content.Shared._White.Implants.NeuroControl;
|
||||
|
||||
public sealed class NeuroStabilizationSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedElectrocutionSystem _electrocution = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<NeuroStabilizationComponent, BeforeStaminaDamageEvent>(BeforeStaminaDamage);
|
||||
}
|
||||
|
||||
private void BeforeStaminaDamage(Entity<NeuroStabilizationComponent> ent, ref BeforeStaminaDamageEvent args)
|
||||
{
|
||||
args.Cancelled = true;
|
||||
Electrocute(ent, (int) MathF.Round(args.Value * 2f / 4f));
|
||||
}
|
||||
|
||||
public void Electrocute(EntityUid uid, int damage, StatusEffectsComponent? status = null)
|
||||
{
|
||||
_electrocution.TryDoElectrocution(uid, null, damage, TimeSpan.FromSeconds(1), false, 0.5f, status, true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user