Files
OldThink/Content.Shared/Standing/StandingStateComponent.cs
Remuchi 9565de0262 [Feat&Fix] Система лежания (#288)
* лежать

* лучше так сделать

* - remove: Gravity is fine.

* - add: Hit moving lying targets.

* - tweak: Lie down insted of stun on FTL.

* - fix: Fix double component.

* - remove: Disable recoil.

---------

Co-authored-by: Aviu00 <aviu00@protonmail.com>
2024-04-22 18:14:23 +03:00

48 lines
1.5 KiB
C#

using Content.Shared.Standing.Systems;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Standing
{
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedStandingStateSystem))]
public sealed partial class StandingStateComponent : Component
{
[ViewVariables(VVAccess.ReadWrite), DataField]
public SoundSpecifier DownSound { get; private set; } = new SoundCollectionSpecifier("BodyFall");
[DataField, AutoNetworkedField]
public StandingState CurrentState { get; set; } = StandingState.Standing; // WD EDIT
/// <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)]
public bool CanLieDown = false;
/// <summary>
/// List of fixtures that had their collision mask changed when the entity was downed.
/// Required for re-adding the collision mask.
/// </summary>
[DataField, AutoNetworkedField]
public List<string> ChangedFixtures = new();
}
}
[Serializable, NetSerializable]
public sealed class ChangeStandingStateEvent : EntityEventArgs
{
}
// WD EDIT
public enum StandingState
{
Lying,
GettingUp,
Standing
}