1
0

HyposprayComponent.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using Content.Shared.FixedPoint;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Serialization;
  4. using Robust.Shared.Audio;
  5. namespace Content.Shared.Chemistry.Components;
  6. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  7. public sealed partial class HyposprayComponent : Component
  8. {
  9. [DataField]
  10. public string SolutionName = "hypospray";
  11. [DataField]
  12. [ViewVariables(VVAccess.ReadWrite)]
  13. public FixedPoint2 TransferAmount = FixedPoint2.New(5);
  14. [DataField]
  15. public SoundSpecifier InjectSound = new SoundPathSpecifier("/Audio/Items/hypospray.ogg");
  16. /// <summary>
  17. /// Decides whether you can inject everything or just mobs.
  18. /// When you can only affect mobs, you're capable of drawing from beakers.
  19. /// </summary>
  20. [AutoNetworkedField]
  21. [DataField(required: true)]
  22. public bool OnlyAffectsMobs = false;
  23. /// <summary>
  24. /// Whether or not the hypospray is able to draw from containers or if it's a single use
  25. /// device that can only inject.
  26. /// </summary>
  27. [DataField]
  28. public bool InjectOnly = false;
  29. }