Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Co-authored-by: ScarKy0 <scarky0@onet.eu>
47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
using Content.Shared.DoAfter;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
|
|
namespace Content.Shared.Stunnable;
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas:true), AutoGenerateComponentPause, Access(typeof(SharedStunSystem))]
|
|
public sealed partial class KnockedDownComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Game time that we can stand up.
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField, AutoPausedField]
|
|
public TimeSpan NextUpdate;
|
|
|
|
/// <summary>
|
|
/// Should we try to stand up?
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool AutoStand = true;
|
|
|
|
/// <summary>
|
|
/// The Standing Up DoAfter.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public ushort? DoAfterId;
|
|
|
|
/// <summary>
|
|
/// Friction modifier for knocked down players.
|
|
/// Makes them accelerate and deccelerate slower.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float FrictionModifier = 1f; // Should add a friction modifier to slipping to compensate for this
|
|
|
|
/// <summary>
|
|
/// Modifier to the maximum movement speed of a knocked down mover.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float SpeedModifier = 1f;
|
|
|
|
/// <summary>
|
|
/// How long does it take us to get up?
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public TimeSpan GetUpDoAfter = TimeSpan.FromSeconds(1);
|
|
}
|