Fix stun baton throwing and visual effect (#18777)

This commit is contained in:
Slava0135
2023-08-08 23:19:31 +03:00
committed by GitHub
parent 2714101ad7
commit 375f487d94
12 changed files with 117 additions and 75 deletions

View File

@@ -1,29 +0,0 @@
using Content.Server.Stunnable.Systems;
using Content.Shared.Timing;
using Robust.Shared.Audio;
namespace Content.Server.Stunnable.Components
{
[RegisterComponent, Access(typeof(StunbatonSystem))]
public sealed class StunbatonComponent : Component
{
public bool Activated = false;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("energyPerUse")]
public float EnergyPerUse { get; set; } = 350;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("onThrowStunChance")]
public float OnThrowStunChance { get; set; } = 0.20f;
[DataField("stunSound")]
public SoundSpecifier StunSound { get; set; } = new SoundPathSpecifier("/Audio/Weapons/egloves.ogg");
[DataField("sparksSound")]
public SoundSpecifier SparksSound { get; set; } = new SoundCollectionSpecifier("sparks");
[DataField("turnOnFailSound")]
public SoundSpecifier TurnOnFailSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/button.ogg");
}
}