2024-03-21 09:54:11 +07:00
|
|
|
using Content.Shared.DoAfter;
|
2021-10-10 12:47:26 +02:00
|
|
|
using Content.Shared.Hands.Components;
|
2024-03-21 09:54:11 +07:00
|
|
|
using Content.Shared.Input;
|
2024-05-30 12:12:24 +00:00
|
|
|
using Content.Shared.Mobs.Systems;
|
2024-03-21 09:54:11 +07:00
|
|
|
using Content.Shared.Movement.Systems;
|
2023-04-07 11:21:12 -07:00
|
|
|
using Content.Shared.Physics;
|
2021-06-27 19:02:46 +10:00
|
|
|
using Content.Shared.Rotation;
|
2024-04-22 22:14:23 +07:00
|
|
|
using Content.Shared.Slippery;
|
|
|
|
|
using Content.Shared.Stunnable;
|
2024-07-10 16:26:50 +03:00
|
|
|
using Content.Shared._White.Wizard.Timestop;
|
|
|
|
|
using Content.Shared.Buckle;
|
|
|
|
|
using Content.Shared.Buckle.Components;
|
2024-07-14 16:26:12 +03:00
|
|
|
using Content.Shared.Mobs;
|
2023-11-27 22:12:34 +11:00
|
|
|
using Robust.Shared.Audio.Systems;
|
2024-03-21 09:54:11 +07:00
|
|
|
using Robust.Shared.Input.Binding;
|
2023-04-07 11:21:12 -07:00
|
|
|
using Robust.Shared.Physics;
|
2022-10-17 02:49:22 +11:00
|
|
|
using Robust.Shared.Physics.Systems;
|
2024-03-21 09:54:11 +07:00
|
|
|
using Robust.Shared.Player;
|
|
|
|
|
using Robust.Shared.Serialization;
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-07-10 16:26:50 +03:00
|
|
|
|
2024-04-22 22:14:23 +07:00
|
|
|
namespace Content.Shared.Standing.Systems;
|
2024-03-21 09:54:11 +07:00
|
|
|
|
2024-04-22 22:14:23 +07:00
|
|
|
public abstract partial class SharedStandingStateSystem : EntitySystem
|
2021-06-27 19:02:46 +10:00
|
|
|
{
|
2024-03-21 09:54:11 +07:00
|
|
|
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
|
|
|
|
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
|
|
|
|
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
|
|
|
|
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!; // WD EDIT
|
|
|
|
|
[Dependency] private readonly MovementSpeedModifierSystem _movement = default!; // WD EDIT
|
2024-05-30 12:12:24 +00:00
|
|
|
[Dependency] private readonly MobStateSystem _mobState = default!; // WD EDIT
|
2024-07-10 16:26:50 +03:00
|
|
|
[Dependency] private readonly SharedBuckleSystem _buckle = default!; // WD EDIT
|
|
|
|
|
[Dependency] private readonly SharedRotationVisualsSystem _rotation = default!; // WD EDIT
|
2024-03-21 09:54:11 +07:00
|
|
|
|
|
|
|
|
// If StandingCollisionLayer value is ever changed to more than one layer, the logic needs to be edited.
|
2024-04-22 22:14:23 +07:00
|
|
|
private const int StandingCollisionLayer = (int)CollisionGroup.MidImpassable;
|
2024-03-21 09:54:11 +07:00
|
|
|
|
|
|
|
|
// WD EDIT START
|
2024-04-22 22:14:23 +07:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
/// <inheritdoc />
|
|
|
|
|
public override void Initialize()
|
2021-06-27 19:02:46 +10:00
|
|
|
{
|
2024-03-21 09:54:11 +07:00
|
|
|
base.Initialize();
|
|
|
|
|
|
|
|
|
|
CommandBinds.Builder
|
|
|
|
|
.Bind(ContentKeyFunctions.LieDown, InputCmdHandler.FromDelegate(ChangeLyingState))
|
2024-04-22 22:14:23 +07:00
|
|
|
.Register<SharedStandingStateSystem>();
|
2024-03-21 09:54:11 +07:00
|
|
|
|
2024-04-22 22:14:23 +07:00
|
|
|
SubscribeNetworkEvent<ChangeStandingStateEvent>(OnChangeState);
|
2024-03-21 09:54:11 +07:00
|
|
|
|
2024-04-22 22:14:23 +07:00
|
|
|
SubscribeLocalEvent<StandingStateComponent, StandingUpDoAfterEvent>(OnStandingUpDoAfter);
|
|
|
|
|
SubscribeLocalEvent<StandingStateComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovementSpeed);
|
|
|
|
|
SubscribeLocalEvent<StandingStateComponent, SlipAttemptEvent>(OnSlipAttempt);
|
|
|
|
|
|
|
|
|
|
InitializeColliding();
|
2024-03-21 09:54:11 +07:00
|
|
|
}
|
|
|
|
|
|
2024-04-22 22:14:23 +07:00
|
|
|
#region Events
|
|
|
|
|
|
|
|
|
|
private void OnChangeState(ChangeStandingStateEvent ev, EntitySessionEventArgs args)
|
2024-03-21 09:54:11 +07:00
|
|
|
{
|
2024-07-10 16:26:50 +03:00
|
|
|
if (TryComp<FrozenComponent>(args.SenderSession.AttachedEntity, out _)) // WD EDIT
|
|
|
|
|
return;
|
|
|
|
|
|
2024-04-22 22:14:23 +07:00
|
|
|
if (!args.SenderSession.AttachedEntity.HasValue)
|
2021-06-27 19:02:46 +10:00
|
|
|
{
|
2024-03-21 09:54:11 +07:00
|
|
|
return;
|
|
|
|
|
}
|
2024-04-22 22:14:23 +07:00
|
|
|
|
|
|
|
|
var uid = args.SenderSession.AttachedEntity.Value;
|
|
|
|
|
|
2024-07-10 16:26:50 +03:00
|
|
|
if (!TryComp(uid, out StandingStateComponent? standing)) // WD EDIT
|
|
|
|
|
return;
|
|
|
|
|
|
2024-07-10 21:01:39 +03:00
|
|
|
RaiseNetworkEvent(new CheckAutoGetUpEvent()); // WD EDIT
|
2024-07-10 16:26:50 +03:00
|
|
|
|
2024-08-02 11:50:26 +00:00
|
|
|
if (HasComp<KnockedDownComponent>(uid))
|
2024-03-21 09:54:11 +07:00
|
|
|
{
|
2024-04-22 22:14:23 +07:00
|
|
|
return;
|
2024-03-21 09:54:11 +07:00
|
|
|
}
|
2024-04-22 22:14:23 +07:00
|
|
|
|
2024-05-30 12:12:24 +00:00
|
|
|
if (!_mobState.IsAlive(uid))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:26:50 +03:00
|
|
|
if (IsDown(uid, standing))
|
2024-03-21 09:54:11 +07:00
|
|
|
{
|
2024-07-10 16:26:50 +03:00
|
|
|
TryStandUp(uid, standing);
|
2024-03-21 09:54:11 +07:00
|
|
|
}
|
2024-04-22 22:14:23 +07:00
|
|
|
else
|
2024-03-21 09:54:11 +07:00
|
|
|
{
|
2024-07-10 16:26:50 +03:00
|
|
|
TryLieDown(uid, standing);
|
2024-03-21 09:54:11 +07:00
|
|
|
}
|
|
|
|
|
}
|
2021-10-10 12:47:26 +02:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
private void OnStandingUpDoAfter(EntityUid uid, StandingStateComponent component, StandingUpDoAfterEvent args)
|
|
|
|
|
{
|
2024-08-01 17:49:56 +00:00
|
|
|
if (args.Handled || args.Cancelled || HasComp<KnockedDownComponent>(uid) ||
|
|
|
|
|
_mobState.IsIncapacitated(uid) || !Stand(uid)) // WD EDIT
|
2024-07-10 16:26:50 +03:00
|
|
|
component.CurrentState = StandingState.Lying;
|
2024-03-21 09:54:11 +07:00
|
|
|
}
|
|
|
|
|
|
2024-04-22 22:14:23 +07:00
|
|
|
private void OnRefreshMovementSpeed(EntityUid uid, StandingStateComponent component,
|
|
|
|
|
RefreshMovementSpeedModifiersEvent args)
|
2024-03-21 09:54:11 +07:00
|
|
|
{
|
|
|
|
|
if (IsDown(uid))
|
2024-04-22 22:14:23 +07:00
|
|
|
args.ModifySpeed(0.4f, 0.4f);
|
2024-03-21 09:54:11 +07:00
|
|
|
else
|
2024-04-22 22:14:23 +07:00
|
|
|
args.ModifySpeed(1f, 1f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnSlipAttempt(EntityUid uid, StandingStateComponent component, SlipAttemptEvent args)
|
|
|
|
|
{
|
|
|
|
|
if (IsDown(uid))
|
2024-03-21 09:54:11 +07:00
|
|
|
{
|
2024-04-22 22:14:23 +07:00
|
|
|
args.Cancel();
|
2024-03-21 09:54:11 +07:00
|
|
|
}
|
|
|
|
|
}
|
2021-10-10 12:47:26 +02:00
|
|
|
|
2024-04-22 22:14:23 +07:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Methods
|
|
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
/// <summary>
|
|
|
|
|
/// Send an update event when player pressed keybind.
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void ChangeLyingState(ICommonSession? session)
|
|
|
|
|
{
|
2024-04-22 22:14:23 +07:00
|
|
|
if (session?.AttachedEntity == null ||
|
2024-03-21 09:54:11 +07:00
|
|
|
!TryComp(session.AttachedEntity, out StandingStateComponent? standing) ||
|
|
|
|
|
!standing.CanLieDown)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
RaiseNetworkEvent(new ChangeStandingStateEvent());
|
|
|
|
|
}
|
2024-04-22 22:14:23 +07:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
public bool TryStandUp(EntityUid uid, StandingStateComponent? standingState = null)
|
|
|
|
|
{
|
|
|
|
|
if (!Resolve(uid, ref standingState, false))
|
|
|
|
|
return false;
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
if (standingState.CurrentState is not StandingState.Lying)
|
|
|
|
|
return false;
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
var doargs = new DoAfterArgs(EntityManager, uid, standingState.StandingUpTime,
|
|
|
|
|
new StandingUpDoAfterEvent(), uid)
|
|
|
|
|
{
|
2024-03-26 15:52:23 +07:00
|
|
|
BreakOnMove = false,
|
2024-03-21 09:54:11 +07:00
|
|
|
BreakOnDamage = false,
|
2024-05-30 12:12:24 +00:00
|
|
|
BreakOnHandChange = false,
|
|
|
|
|
RequireCanInteract = false
|
2024-03-21 09:54:11 +07:00
|
|
|
};
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-04-22 22:14:23 +07:00
|
|
|
if (!_doAfter.TryStartDoAfter(doargs))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
standingState.CurrentState = StandingState.GettingUp;
|
2024-03-21 09:54:11 +07:00
|
|
|
return true;
|
|
|
|
|
}
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-08-03 15:23:46 +00:00
|
|
|
public enum DropHeldItemsBehavior : byte
|
2024-03-21 09:54:11 +07:00
|
|
|
{
|
2024-06-29 20:03:28 +00:00
|
|
|
NoDrop,
|
|
|
|
|
DropIfStanding,
|
|
|
|
|
AlwaysDrop
|
|
|
|
|
}
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-06-29 20:03:28 +00:00
|
|
|
public bool TryLieDown(EntityUid uid,
|
|
|
|
|
StandingStateComponent? standingState = null,
|
|
|
|
|
DropHeldItemsBehavior behavior = DropHeldItemsBehavior.NoDrop)
|
|
|
|
|
{
|
|
|
|
|
if (!Resolve(uid, ref standingState, false) || !standingState.CanLieDown ||
|
|
|
|
|
standingState.CurrentState is not StandingState.Standing)
|
2024-03-21 09:54:11 +07:00
|
|
|
{
|
2024-06-29 20:03:28 +00:00
|
|
|
if (behavior == DropHeldItemsBehavior.AlwaysDrop)
|
|
|
|
|
RaiseLocalEvent(uid, new DropHandItemsEvent());
|
|
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
return false;
|
|
|
|
|
}
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-07-25 13:32:56 +00:00
|
|
|
Down(uid, true, behavior != DropHeldItemsBehavior.NoDrop, true, standingState);
|
2024-03-21 09:54:11 +07:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
// WD EDIT END
|
2024-04-22 22:14:23 +07:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
public bool IsDown(EntityUid uid, StandingStateComponent? standingState = null)
|
|
|
|
|
{
|
|
|
|
|
if (!Resolve(uid, ref standingState, false))
|
|
|
|
|
return false;
|
2022-04-14 14:31:07 +12:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
return standingState.CurrentState is StandingState.Lying or StandingState.GettingUp;
|
|
|
|
|
}
|
2022-02-21 23:01:58 -06:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
public bool Down(
|
|
|
|
|
EntityUid uid,
|
|
|
|
|
bool playSound = true,
|
|
|
|
|
bool dropHeldItems = true,
|
2024-07-25 13:32:56 +00:00
|
|
|
bool unbuckle = true, // WD EDIT
|
2024-03-21 09:54:11 +07:00
|
|
|
StandingStateComponent? standingState = null,
|
|
|
|
|
AppearanceComponent? appearance = null,
|
|
|
|
|
HandsComponent? hands = null)
|
|
|
|
|
{
|
|
|
|
|
if (!Resolve(uid, ref standingState, false))
|
|
|
|
|
return false;
|
2022-09-05 05:21:21 +12:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
// Optional component.
|
|
|
|
|
Resolve(uid, ref appearance, ref hands, false);
|
2021-10-10 12:47:26 +02:00
|
|
|
|
2024-07-10 16:26:50 +03:00
|
|
|
if (TryComp(uid, out BuckleComponent? buckle) && buckle.Buckled && !_buckle.TryUnbuckle(uid, uid, buckleComp: buckle)) // WD EDIT
|
|
|
|
|
return false;
|
|
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
// This is just to avoid most callers doing this manually saving boilerplate
|
|
|
|
|
// 99% of the time you'll want to drop items but in some scenarios (e.g. buckling) you don't want to.
|
|
|
|
|
// We do this BEFORE downing because something like buckle may be blocking downing but we want to drop hand items anyway
|
|
|
|
|
// and ultimately this is just to avoid boilerplate in Down callers + keep their behavior consistent.
|
|
|
|
|
if (dropHeldItems && hands != null)
|
2021-06-27 19:02:46 +10:00
|
|
|
{
|
2024-03-21 09:54:11 +07:00
|
|
|
RaiseLocalEvent(uid, new DropHandItemsEvent());
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-03 15:23:46 +00:00
|
|
|
if (standingState.CurrentState is StandingState.Lying or StandingState.GettingUp)
|
|
|
|
|
return true;
|
|
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
var msg = new DownAttemptEvent();
|
|
|
|
|
RaiseLocalEvent(uid, msg);
|
|
|
|
|
|
|
|
|
|
if (msg.Cancelled)
|
|
|
|
|
return false;
|
2021-10-10 12:47:26 +02:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
standingState.CurrentState = StandingState.Lying;
|
|
|
|
|
Dirty(uid, standingState);
|
2024-07-10 16:26:50 +03:00
|
|
|
|
2024-07-14 16:26:12 +03:00
|
|
|
if (TryComp<TransformComponent>(uid, out var transform)) // WD EDIT
|
2024-07-10 21:01:39 +03:00
|
|
|
{
|
2024-07-14 16:26:12 +03:00
|
|
|
var rotation = transform.LocalRotation;
|
|
|
|
|
_appearance.TryGetData<bool>(uid, BuckleVisuals.Buckled, out var buckled, appearance);
|
|
|
|
|
|
|
|
|
|
if (!buckled && (!_appearance.TryGetData<MobState>(uid, MobStateVisuals.State, out var state, appearance) ||
|
|
|
|
|
state is MobState.Alive))
|
|
|
|
|
{
|
|
|
|
|
if (rotation.GetDir() is Direction.East
|
|
|
|
|
or Direction.North
|
|
|
|
|
or Direction.NorthEast
|
|
|
|
|
or Direction.SouthEast)
|
|
|
|
|
_rotation.SetHorizontalAngle(uid, Angle.FromDegrees(270));
|
|
|
|
|
else
|
|
|
|
|
_rotation.ResetHorizontalAngle(uid);
|
|
|
|
|
}
|
2024-07-10 21:01:39 +03:00
|
|
|
}
|
2024-07-10 16:26:50 +03:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
RaiseLocalEvent(uid, new DownedEvent());
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
// Seemed like the best place to put it
|
|
|
|
|
_appearance.SetData(uid, RotationVisuals.RotationState, RotationState.Horizontal, appearance);
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
// Change collision masks to allow going under certain entities like flaps and tables
|
|
|
|
|
if (TryComp(uid, out FixturesComponent? fixtureComponent))
|
|
|
|
|
{
|
|
|
|
|
foreach (var (key, fixture) in fixtureComponent.Fixtures)
|
2022-12-25 12:35:51 +01:00
|
|
|
{
|
2024-03-21 09:54:11 +07:00
|
|
|
if ((fixture.CollisionMask & StandingCollisionLayer) == 0)
|
|
|
|
|
continue;
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
standingState.ChangedFixtures.Add(key);
|
|
|
|
|
_physics.SetCollisionMask(uid, key, fixture, fixture.CollisionMask & ~StandingCollisionLayer,
|
|
|
|
|
manager: fixtureComponent);
|
2022-12-25 12:35:51 +01:00
|
|
|
}
|
2024-03-21 09:54:11 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// check if component was just added or streamed to client
|
|
|
|
|
// if true, no need to play sound - mob was down before player could seen that
|
|
|
|
|
if (standingState.LifeStage <= ComponentLifeStage.Starting)
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
if (playSound)
|
|
|
|
|
{
|
2024-04-22 22:14:23 +07:00
|
|
|
_audio.PlayPredicted(standingState.DownSound, uid, null);
|
2024-03-21 09:54:11 +07:00
|
|
|
}
|
|
|
|
|
|
2024-04-22 22:14:23 +07:00
|
|
|
_movement.RefreshMovementSpeedModifiers(uid);
|
2024-03-21 09:54:11 +07:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Stand(
|
|
|
|
|
EntityUid uid,
|
|
|
|
|
StandingStateComponent? standingState = null,
|
|
|
|
|
AppearanceComponent? appearance = null,
|
2024-07-25 13:32:56 +00:00
|
|
|
bool force = false,
|
|
|
|
|
bool unbuckle = true) // WD EDIT
|
2024-03-21 09:54:11 +07:00
|
|
|
{
|
|
|
|
|
if (!Resolve(uid, ref standingState, false))
|
|
|
|
|
return false;
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
// Optional component.
|
|
|
|
|
Resolve(uid, ref appearance, false);
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-07-25 13:32:56 +00:00
|
|
|
if (unbuckle && TryComp(uid, out BuckleComponent? buckle) && buckle.Buckled && !_buckle.TryUnbuckle(uid, uid, buckleComp: buckle)) // WD EDIT
|
2024-07-10 21:01:39 +03:00
|
|
|
return false;
|
|
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
if (standingState.CurrentState is StandingState.Standing)
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
if (!force)
|
|
|
|
|
{
|
|
|
|
|
var msg = new StandAttemptEvent();
|
|
|
|
|
RaiseLocalEvent(uid, msg);
|
|
|
|
|
|
|
|
|
|
if (msg.Cancelled)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
standingState.CurrentState = StandingState.Standing;
|
|
|
|
|
Dirty(uid, standingState);
|
|
|
|
|
RaiseLocalEvent(uid, new StoodEvent());
|
2022-02-21 23:01:58 -06:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
_appearance.SetData(uid, RotationVisuals.RotationState, RotationState.Vertical, appearance);
|
|
|
|
|
|
|
|
|
|
if (TryComp(uid, out FixturesComponent? fixtureComponent))
|
|
|
|
|
{
|
|
|
|
|
foreach (var key in standingState.ChangedFixtures)
|
2022-02-21 23:01:58 -06:00
|
|
|
{
|
2024-03-21 09:54:11 +07:00
|
|
|
if (fixtureComponent.Fixtures.TryGetValue(key, out var fixture))
|
2022-02-21 23:01:58 -06:00
|
|
|
{
|
2024-03-21 09:54:11 +07:00
|
|
|
_physics.SetCollisionMask(uid, key, fixture, fixture.CollisionMask | StandingCollisionLayer,
|
|
|
|
|
fixtureComponent);
|
2022-02-21 23:01:58 -06:00
|
|
|
}
|
|
|
|
|
}
|
2021-06-27 19:02:46 +10:00
|
|
|
}
|
|
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
standingState.ChangedFixtures.Clear();
|
2024-04-22 22:14:23 +07:00
|
|
|
_movement.RefreshMovementSpeedModifiers(uid);
|
2021-11-24 00:38:39 +01:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
return true;
|
2021-06-27 19:02:46 +10:00
|
|
|
}
|
2024-04-22 22:14:23 +07:00
|
|
|
|
|
|
|
|
#endregion
|
2024-03-21 09:54:11 +07:00
|
|
|
}
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-26 15:52:23 +07:00
|
|
|
public sealed class DropHandItemsEvent : EventArgs;
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
/// <summary>
|
|
|
|
|
/// Subscribe if you can potentially block a down attempt.
|
|
|
|
|
/// </summary>
|
2024-03-26 15:52:23 +07:00
|
|
|
public sealed class DownAttemptEvent : CancellableEntityEventArgs;
|
2021-06-27 19:02:46 +10:00
|
|
|
|
2024-03-21 09:54:11 +07:00
|
|
|
/// <summary>
|
|
|
|
|
/// Subscribe if you can potentially block a stand attempt.
|
|
|
|
|
/// </summary>
|
2024-03-26 15:52:23 +07:00
|
|
|
public sealed class StandAttemptEvent : CancellableEntityEventArgs;
|
2024-03-21 09:54:11 +07:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Raised when an entity becomes standing
|
|
|
|
|
/// </summary>
|
2024-03-26 15:52:23 +07:00
|
|
|
public sealed class StoodEvent : EntityEventArgs;
|
2024-03-21 09:54:11 +07:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Raised when an entity is not standing
|
|
|
|
|
/// </summary>
|
2024-03-26 15:52:23 +07:00
|
|
|
public sealed class DownedEvent : EntityEventArgs;
|
2024-03-21 09:54:11 +07:00
|
|
|
|
|
|
|
|
// WD EDIT
|
|
|
|
|
[Serializable, NetSerializable]
|
2024-04-22 22:14:23 +07:00
|
|
|
public sealed partial class StandingUpDoAfterEvent : SimpleDoAfterEvent;
|