Files
tbd-station-14/Content.Shared/Chemistry/Components/HyposprayComponent.cs
Plykiya 90a880a9be Fix: Prevent single-use hyposprays from getting the toggle draw verb (#26595)
Prevent single-use hyposprays from getting the toggle draw verb

Co-authored-by: Plykiya <plykiya@protonmail.com>
2024-03-31 16:20:48 +11:00

41 lines
1.2 KiB
C#

using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Audio;
namespace Content.Shared.Chemistry.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class HyposprayComponent : Component
{
[DataField]
public string SolutionName = "hypospray";
// TODO: This should be on clumsycomponent.
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public float ClumsyFailChance = 0.5f;
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public FixedPoint2 TransferAmount = FixedPoint2.New(5);
[DataField]
public SoundSpecifier InjectSound = new SoundPathSpecifier("/Audio/Items/hypospray.ogg");
/// <summary>
/// Decides whether you can inject everything or just mobs.
/// When you can only affect mobs, you're capable of drawing from beakers.
/// </summary>
[AutoNetworkedField]
[DataField(required: true)]
public bool OnlyAffectsMobs = false;
/// <summary>
/// Whether or not the hypospray is able to draw from containers or if it's a single use
/// device that can only inject.
/// </summary>
[DataField]
public bool InjectOnly = false;
}