using Content.Shared.Alert;
using Content.Shared.FixedPoint;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Rootable;
///
/// A rooting action, for Diona.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class RootableComponent : Component
{
///
/// The action prototype that toggles the rootable state.
///
[DataField]
public EntProtoId Action = "ActionToggleRootable";
///
/// Entity to hold the action prototype.
///
[DataField, AutoNetworkedField]
public EntityUid? ActionEntity;
///
/// The prototype for the "rooted" alert, indicating the user that they are rooted.
///
[DataField]
public ProtoId RootedAlert = "Rooted";
///
/// Is the entity currently rooted?
///
[DataField, AutoNetworkedField]
public bool Rooted;
///
/// The puddle that is currently affecting this entity.
///
[DataField, AutoNetworkedField]
public EntityUid? PuddleEntity;
///
/// The time at which the next absorption metabolism will occur.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField]
[AutoPausedField]
public TimeSpan NextUpdate;
///
/// The max rate (in reagent units per transfer) at which chemicals are transferred from the puddle to the rooted entity.
///
[DataField]
public FixedPoint2 TransferRate = 0.75;
///
/// The frequency of which chemicals are transferred from the puddle to the rooted entity.
///
[DataField]
public TimeSpan TransferFrequency = TimeSpan.FromSeconds(1);
///
/// The movement speed modifier for when rooting is active.
///
[DataField]
public float SpeedModifier = 0.8f;
///
/// Sound that plays when rooting is toggled.
///
[DataField]
public SoundSpecifier RootSound = new SoundPathSpecifier("/Audio/Voice/Diona/diona_salute.ogg");
}