1
0

SpeedModifiedOnWieldComponent.cs 797 B

1234567891011121314151617181920212223
  1. using Content.Shared.Wieldable;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.Movement.Components;
  4. /// <summary>
  5. /// Modifies the speed when an entity with this component is wielded.
  6. /// </summary>
  7. [RegisterComponent, NetworkedComponent, Access(typeof(SharedWieldableSystem)), AutoGenerateComponentState]
  8. public sealed partial class SpeedModifiedOnWieldComponent : Component
  9. {
  10. /// <summary>
  11. /// How much the wielder's sprint speed is modified when the component owner is wielded.
  12. /// </summary>
  13. [DataField, AutoNetworkedField]
  14. public float SprintModifier = 1f;
  15. /// <summary>
  16. /// How much the wielder's walk speed is modified when the component owner is wielded.
  17. /// </summary>
  18. [DataField, AutoNetworkedField]
  19. public float WalkModifier = 1f;
  20. }