Files
tbd-station-14/Content.Shared/Throwing/ThrownItemComponent.cs
metalgearsloth c584f6444a Pulling rework v2 (#24936)
* Pulling rework

Fixing up the FOUR systems managing pulling, all the shitcode, and also making it nicer ingame.

* More pulling cleanup

* stats

* More cleanup

* First draft

* More pulling

* weh

* Fix puller

* Pulling working

* Fix merge

* Dunked

* Self-merge time

* Fix hotkey

* Fix container changes

* oop

* Fix multi-pulling

* Move alerts cleanup.

* pulling fixes
2024-03-19 14:30:56 +11:00

55 lines
1.8 KiB
C#

using System.Numerics;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Timing;
namespace Content.Shared.Throwing
{
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true), AutoGenerateComponentPause]
public sealed partial class ThrownItemComponent : Component
{
/// <summary>
/// Should the in-air throwing animation play.
/// </summary>
[DataField, AutoNetworkedField]
public bool Animate = true;
/// <summary>
/// The entity that threw this entity.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public EntityUid? Thrower;
/// <summary>
/// The <see cref="IGameTiming.CurTime"/> timestamp at which this entity was thrown.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public TimeSpan? ThrownTime;
/// <summary>
/// Compared to <see cref="IGameTiming.CurTime"/> to land this entity, if any.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
[AutoPausedField]
public TimeSpan? LandTime;
/// <summary>
/// Whether or not this entity was already landed.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public bool Landed;
/// <summary>
/// Whether or not to play a sound when the entity lands.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public bool PlayLandSound;
/// <summary>
/// Used to restore state after the throwing scale animation is finished.
/// </summary>
[DataField]
public Vector2? OriginalScale = null;
}
}