2024-04-22 22:14:23 +07:00
|
|
|
using Content.Shared.Standing.Systems;
|
2024-07-10 16:26:50 +03:00
|
|
|
using Content.Shared._White.Standing;
|
2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2024-03-21 09:54:11 +07:00
|
|
|
using Robust.Shared.Serialization;
|
2021-06-27 19:02:46 +10:00
|
|
|
|
|
|
|
|
namespace Content.Shared.Standing
|
|
|
|
|
{
|
2024-07-10 16:26:50 +03:00
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedStandingStateSystem), typeof(StandingStateSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class StandingStateComponent : Component
|
2021-06-27 19:02:46 +10:00
|
|
|
{
|
2024-03-21 09:54:11 +07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField]
|
2023-08-22 18:14:33 -07:00
|
|
|
public SoundSpecifier DownSound { get; private set; } = new SoundCollectionSpecifier("BodyFall");
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2023-09-28 16:20:29 -07:00
|
|
|
[DataField, AutoNetworkedField]
|
2024-03-21 09:54:11 +07:00
|
|
|
public StandingState CurrentState { get; set; } = StandingState.Standing; // WD EDIT
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
/// <summary>
|
|
|
|
|
/// Time required to get up.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
public TimeSpan StandingUpTime { get; set; } = TimeSpan.FromSeconds(1); // WD EDIT
|
|
|
|
|
|
|
|
|
|
// WD EDIT
|
|
|
|
|
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
|
2024-07-22 17:06:02 +00:00
|
|
|
public bool CanLieDown;
|
2024-07-10 16:26:50 +03:00
|
|
|
|
|
|
|
|
// WD EDIT
|
|
|
|
|
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
|
2024-07-22 17:06:02 +00:00
|
|
|
public bool AutoGetUp = true;
|
2024-07-10 16:26:50 +03:00
|
|
|
|
2022-04-14 14:31:07 +12:00
|
|
|
/// <summary>
|
2022-05-10 17:57:20 -07:00
|
|
|
/// List of fixtures that had their collision mask changed when the entity was downed.
|
|
|
|
|
/// Required for re-adding the collision mask.
|
2022-04-14 14:31:07 +12:00
|
|
|
/// </summary>
|
2023-09-29 22:14:16 -07:00
|
|
|
[DataField, AutoNetworkedField]
|
2022-05-10 17:57:20 -07:00
|
|
|
public List<string> ChangedFixtures = new();
|
2024-07-10 16:26:50 +03:00
|
|
|
|
2021-06-27 19:02:46 +10:00
|
|
|
}
|
|
|
|
|
}
|
2024-03-21 09:54:11 +07:00
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
2024-07-10 16:26:50 +03:00
|
|
|
public sealed class ChangeStandingStateEvent : CancellableEntityEventArgs
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// WD EDIT
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public sealed class CheckAutoGetUpEvent : CancellableEntityEventArgs
|
2024-03-21 09:54:11 +07:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// WD EDIT
|
|
|
|
|
public enum StandingState
|
|
|
|
|
{
|
|
|
|
|
Lying,
|
|
|
|
|
GettingUp,
|
|
|
|
|
Standing
|
2024-07-10 16:26:50 +03:00
|
|
|
}
|