using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Timing;
namespace Content.Shared.Throwing
{
[RegisterComponent, NetworkedComponent]
public sealed partial class ThrownItemComponent : Component
{
///
/// The entity that threw this entity.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public EntityUid? Thrower;
///
/// The timestamp at which this entity was thrown.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan? ThrownTime;
///
/// Compared to to land this entity, if any.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan? LandTime;
///
/// Whether or not this entity was already landed.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool Landed;
///
/// Whether or not to play a sound when the entity lands.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool PlayLandSound;
}
[Serializable, NetSerializable]
public sealed class ThrownItemComponentState : ComponentState
{
public NetEntity? Thrower;
public TimeSpan? ThrownTime;
public TimeSpan? LandTime;
public bool Landed;
public bool PlayLandSound;
}
}