2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2020-08-19 18:13:22 -04:00
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
2022-05-10 01:08:52 -07:00
|
|
|
namespace Content.Shared.Climbing;
|
|
|
|
|
|
|
|
|
|
[NetworkedComponent]
|
|
|
|
|
public abstract class SharedClimbingComponent : Component
|
2020-08-19 18:13:22 -04:00
|
|
|
{
|
2022-05-10 01:08:52 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether the owner is climbing on a climbable entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public virtual bool IsClimbing { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether the owner is being moved onto the climbed entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public virtual bool OwnerIsTransitioning { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// We'll launch the mob onto the table and give them at least this amount of time to be on it.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const float BufferTime = 0.3f;
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public sealed class ClimbModeComponentState : ComponentState
|
2020-08-19 18:13:22 -04:00
|
|
|
{
|
2022-05-10 01:08:52 -07:00
|
|
|
public ClimbModeComponentState(bool climbing, bool isTransitioning)
|
2021-03-08 04:09:59 +11:00
|
|
|
{
|
2022-05-10 01:08:52 -07:00
|
|
|
Climbing = climbing;
|
|
|
|
|
IsTransitioning = isTransitioning;
|
2021-02-28 18:49:48 +01:00
|
|
|
}
|
2021-03-01 03:11:29 +11:00
|
|
|
|
2022-05-10 01:08:52 -07:00
|
|
|
public bool Climbing { get; }
|
|
|
|
|
public bool IsTransitioning { get; }
|
2020-08-19 18:13:22 -04:00
|
|
|
}
|
|
|
|
|
}
|