StaminaModifierComponent.cs 832 B

12345678910111213141516171819
  1. using Content.Shared.Damage.Systems;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.Damage.Components;
  4. /// <summary>
  5. /// Multiplies the entity's <see cref="StaminaComponent.StaminaDamage"/> by the <see cref="Modifier"/>.
  6. /// </summary>
  7. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(StaminaSystem))]
  8. public sealed partial class StaminaModifierComponent : Component
  9. {
  10. /// <summary>
  11. /// What to multiply max stamina by.
  12. /// When added this scales max stamina, but not stamina damags to give you an extra boost of survability.
  13. /// If you have too much damage when the modifier is removed, you suffer "withdrawl" and instantly stamcrit.
  14. /// </summary>
  15. [ViewVariables(VVAccess.ReadWrite), DataField("modifier"), AutoNetworkedField]
  16. public float Modifier = 2f;
  17. }