2023-06-03 22:34:43 +03:00
using Content.Shared.Movement.Systems ;
2022-10-01 21:36:44 -04:00
using Content.Shared.Whitelist ;
2021-11-28 20:25:36 -06:00
using Robust.Shared.GameStates ;
namespace Content.Shared.Movement.Components ;
2025-04-28 17:24:12 -07:00
/// <summary>
/// Component that modifies the movement speed of other entities that come into contact with the entity this component is added to.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SpeedModifierContactsSystem))]
2024-03-17 05:27:22 +03:00
public sealed partial class SpeedModifierContactsComponent : Component
2021-11-28 20:25:36 -06:00
{
2025-04-28 17:24:12 -07:00
/// <summary>
/// The modifier applied to the walk speed of entities that come into contact with the entity this component is added to.
/// </summary>
[DataField, AutoNetworkedField]
2023-06-03 22:34:43 +03:00
public float WalkSpeedModifier = 1.0f ;
2021-11-28 20:25:36 -06:00
2025-04-28 17:24:12 -07:00
/// <summary>
/// The modifier applied to the sprint speed of entities that come into contact with the entity this component is added to.
/// </summary>
[DataField, AutoNetworkedField]
2023-06-03 22:34:43 +03:00
public float SprintSpeedModifier = 1.0f ;
2022-10-01 21:36:44 -04:00
2025-04-28 17:24:12 -07:00
/// <summary>
/// Indicates whether this component affects the movement speed of airborne entities that come into contact with the entity this component is added to.
/// </summary>
[DataField, AutoNetworkedField]
public bool AffectAirborne ;
/// <summary>
/// A whitelist of entities that should be ignored by this component's speed modifiers.
/// </summary>
[DataField]
2022-10-01 21:36:44 -04:00
public EntityWhitelist ? IgnoreWhitelist ;
2022-08-26 01:34:05 +12:00
}