* G O I D A * how * now proper * a * Update HypospraySystem.cs * good catch * Apply suggestions from code review --------- Co-authored-by: ScarKy0 <scarky0@onet.eu> Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using Content.Shared.FixedPoint;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Audio;
|
|
|
|
namespace Content.Shared.Chemistry.Components;
|
|
|
|
/// <summary>
|
|
/// Component that allows an entity instantly transfer liquids by interacting with objects that have solutions.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent]
|
|
[AutoGenerateComponentState]
|
|
public sealed partial class HyposprayComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Solution that will be used by hypospray for injections.
|
|
/// </summary>
|
|
[DataField]
|
|
public string SolutionName = "hypospray";
|
|
|
|
/// <summary>
|
|
/// Amount of the units that will be transfered.
|
|
/// </summary>
|
|
[AutoNetworkedField]
|
|
[DataField]
|
|
public FixedPoint2 TransferAmount = FixedPoint2.New(5);
|
|
|
|
/// <summary>
|
|
/// Sound that will be played when injecting.
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier InjectSound = new SoundPathSpecifier("/Audio/Items/hypospray.ogg");
|
|
|
|
/// <summary>
|
|
/// Decides whether you can inject everything or just mobs.
|
|
/// </summary>
|
|
[AutoNetworkedField]
|
|
[DataField(required: true)]
|
|
public bool OnlyAffectsMobs = false;
|
|
|
|
/// <summary>
|
|
/// If this can draw from containers in mob-only mode.
|
|
/// </summary>
|
|
[AutoNetworkedField]
|
|
[DataField]
|
|
public bool CanContainerDraw = true;
|
|
|
|
/// <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;
|
|
}
|