* Initial commit * Small QOL buff * Review changes * Ch-ch-ch-ch-chaaaanges * Review changes * oops * Oh ya fix the fill thing * cleanup warnings make a few more private methods --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
61 lines
1.8 KiB
C#
61 lines
1.8 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>
|
|
/// The delay to draw reagents using the hypospray.
|
|
/// If set, <see cref="RefillableSolutionComponent"/> RefillTime should probably have the same value.
|
|
/// </summary>
|
|
[DataField]
|
|
public float DrawTime = 0f;
|
|
|
|
/// <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;
|
|
}
|