1
0

StaminaActiveComponent.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Robust.Shared.GameStates;
  2. namespace Content.Shared._Stalker.Stamina;
  3. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  4. public sealed partial class StaminaActiveComponent : Component
  5. {
  6. /// <summary>
  7. /// Float on which our entity will be "stunned"
  8. /// </summary>
  9. [DataField("slowThreshold"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
  10. public float SlowThreshold = 180f;
  11. /// <summary>
  12. /// Value to compare with StaminaDamage and set default sprint speed back.
  13. /// If Stamina damage will be less than this value - default sprint will be set.
  14. /// </summary>
  15. [DataField("reviveStaminaLevel"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
  16. public float ReviveStaminaLevel = 80f;
  17. /// <summary>
  18. /// Stamina damage to apply when entity is running
  19. /// </summary>
  20. [DataField("runStaminaDamage"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
  21. public float RunStaminaDamage = 0.2f;
  22. /// <summary>
  23. /// Modifier to set entity sprint speed to a walking speed. Counts himself.
  24. /// Nothing will happen if you'll set it manually
  25. /// </summary>
  26. public float SprintModifier = 0.5f;
  27. public bool Change;
  28. /// <summary>
  29. /// If our entity is slowed already.
  30. /// Nothing will happen if you'll set it manually.
  31. /// </summary>
  32. public bool Slowed = false;
  33. }