BaseForceGunComponent.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using Robust.Shared.Audio;
  2. namespace Content.Shared.Weapons.Misc;
  3. public abstract partial class BaseForceGunComponent : Component
  4. {
  5. [ViewVariables(VVAccess.ReadWrite), DataField("lineColor"), AutoNetworkedField]
  6. public Color LineColor = Color.Orange;
  7. /// <summary>
  8. /// The entity the tethered target has a joint to.
  9. /// </summary>
  10. [DataField("tetherEntity"), AutoNetworkedField]
  11. public virtual EntityUid? TetherEntity { get; set; }
  12. /// <summary>
  13. /// The entity currently tethered.
  14. /// </summary>
  15. [ViewVariables(VVAccess.ReadWrite), DataField("tethered"), AutoNetworkedField]
  16. public virtual EntityUid? Tethered { get; set; }
  17. /// <summary>
  18. /// Can the tethergun unanchor entities.
  19. /// </summary>
  20. [ViewVariables(VVAccess.ReadWrite), DataField("canUnanchor"), AutoNetworkedField]
  21. public bool CanUnanchor = false;
  22. [ViewVariables(VVAccess.ReadWrite), DataField("canTetherAlive"), AutoNetworkedField]
  23. public bool CanTetherAlive = false;
  24. /// <summary>
  25. /// Max force between the tether entity and the tethered target.
  26. /// </summary>
  27. [ViewVariables(VVAccess.ReadWrite), DataField("maxForce"), AutoNetworkedField]
  28. public float MaxForce = 200f;
  29. [ViewVariables(VVAccess.ReadWrite), DataField("frequency"), AutoNetworkedField]
  30. public float Frequency = 10f;
  31. [ViewVariables(VVAccess.ReadWrite), DataField("dampingRatio"), AutoNetworkedField]
  32. public float DampingRatio = 2f;
  33. /// <summary>
  34. /// Maximum amount of mass a tethered entity can have.
  35. /// </summary>
  36. [ViewVariables(VVAccess.ReadWrite), DataField("massLimit"), AutoNetworkedField]
  37. public float MassLimit = 100f;
  38. [ViewVariables(VVAccess.ReadWrite), DataField("sound"), AutoNetworkedField]
  39. public SoundSpecifier? Sound = new SoundPathSpecifier("/Audio/Weapons/weoweo.ogg")
  40. {
  41. Params = AudioParams.Default.WithLoop(true).WithVolume(-8f),
  42. };
  43. public EntityUid? Stream;
  44. }