2023-12-25 02:33:32 -05:00
|
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Pulling.Components
|
2020-10-16 20:35:09 +02:00
|
|
|
|
{
|
2023-12-25 02:33:32 -05:00
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
2022-06-07 15:26:28 +02:00
|
|
|
|
[Access(typeof(SharedPullingStateManagementSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class SharedPullerComponent : Component
|
2020-10-16 20:35:09 +02:00
|
|
|
|
{
|
2021-10-04 16:10:54 +01:00
|
|
|
|
// Before changing how this is updated, please see SharedPullerSystem.RefreshMovementSpeed
|
2023-06-28 16:03:16 -04:00
|
|
|
|
public float WalkSpeedModifier => Pulling == default ? 1.0f : 0.95f;
|
2020-10-16 20:35:09 +02:00
|
|
|
|
|
2023-06-28 16:03:16 -04:00
|
|
|
|
public float SprintSpeedModifier => Pulling == default ? 1.0f : 0.95f;
|
2020-10-16 20:35:09 +02:00
|
|
|
|
|
2023-12-25 02:33:32 -05:00
|
|
|
|
[DataField, AutoNetworkedField]
|
2021-12-05 21:02:04 +01:00
|
|
|
|
public EntityUid? Pulling { get; set; }
|
2020-10-16 20:35:09 +02:00
|
|
|
|
|
2022-06-21 07:00:11 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Does this entity need hands to be able to pull something?
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("needsHands")]
|
|
|
|
|
|
public bool NeedsHands = true;
|
2020-10-16 20:35:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|