using Content.Shared.StepTrigger.Components;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Slippery
{
///
/// Causes somebody to slip when they walk over this entity.
///
///
/// Requires , see that component for some additional properties.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class SlipperyComponent : Component
{
///
/// Path to the sound to be played when a mob slips.
///
[DataField, AutoNetworkedField]
[Access(Other = AccessPermissions.ReadWriteExecute)]
public SoundSpecifier SlipSound = new SoundPathSpecifier("/Audio/Effects/slip.ogg");
///
/// Loads the data needed to determine how slippery something is.
///
[DataField, AutoNetworkedField]
public SlipperyEffectEntry SlipData = new();
}
///
/// Stores the data for slipperiness that way reagents and this component can use it.
///
[DataDefinition, Serializable, NetSerializable]
public sealed partial class SlipperyEffectEntry
{
///
/// How many seconds the mob will be paralyzed for.
///
[DataField]
public TimeSpan ParalyzeTime = TimeSpan.FromSeconds(1.5);
///
/// The entity's speed will be multiplied by this to slip it forwards.
///
[DataField]
public float LaunchForwardsMultiplier = 1.5f;
///
/// Minimum speed entity must be moving to slip.
///
[DataField]
public float RequiredSlipSpeed = 3.5f;
///
/// If this is true, any slipping entity loses its friction until
/// it's not colliding with any SuperSlippery entities anymore.
/// They also will fail any attempts to stand up unless they have no-slips.
///
[DataField]
public bool SuperSlippery;
///
/// This is used to store the friction modifier that is used on a sliding entity.
///
[DataField]
public float SlipFriction;
}
}