Files
tbd-station-14/Content.Shared/Stunnable/KnockedDownComponent.cs
Princess Cheeseballs dec2d42a1d Crawling Part 1: The Knockdownening (#36881)
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>
2025-07-20 01:54:42 +02:00

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);
}