2022-07-10 02:28:37 -07:00
|
|
|
using Content.Shared.StepTrigger.Components;
|
2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2020-07-23 01:40:31 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Slippery
|
2020-07-23 01:40:31 +02:00
|
|
|
{
|
2022-05-18 06:07:35 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Causes somebody to slip when they walk over this entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// Requires <see cref="StepTriggerComponent"/>, see that component for some additional properties.
|
|
|
|
|
/// </remarks>
|
2023-09-28 16:20:29 -07:00
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class SlipperyComponent : Component
|
2020-07-23 01:40:31 +02:00
|
|
|
{
|
2021-03-15 19:01:15 +01:00
|
|
|
/// <summary>
|
2022-09-11 16:49:10 +10:00
|
|
|
/// Path to the sound to be played when a mob slips.
|
2021-03-15 19:01:15 +01:00
|
|
|
/// </summary>
|
2023-09-28 16:20:29 -07:00
|
|
|
[DataField, AutoNetworkedField]
|
2022-09-11 16:49:10 +10:00
|
|
|
[Access(Other = AccessPermissions.ReadWriteExecute)]
|
|
|
|
|
public SoundSpecifier SlipSound = new SoundPathSpecifier("/Audio/Effects/slip.ogg");
|
2020-07-23 01:40:31 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
2022-09-11 16:49:10 +10:00
|
|
|
/// How many seconds the mob will be paralyzed for.
|
2020-07-23 01:40:31 +02:00
|
|
|
/// </summary>
|
2023-09-28 16:20:29 -07:00
|
|
|
[DataField, AutoNetworkedField]
|
2022-09-11 16:49:10 +10:00
|
|
|
[Access(Other = AccessPermissions.ReadWrite)]
|
2024-07-17 11:26:02 +12:00
|
|
|
public float ParalyzeTime = 1.5f;
|
2020-07-23 01:40:31 +02:00
|
|
|
|
2020-09-21 17:51:07 +02:00
|
|
|
/// <summary>
|
2022-09-11 16:49:10 +10:00
|
|
|
/// The entity's speed will be multiplied by this to slip it forwards.
|
2020-09-21 17:51:07 +02:00
|
|
|
/// </summary>
|
2023-09-28 16:20:29 -07:00
|
|
|
[DataField, AutoNetworkedField]
|
2022-09-11 16:49:10 +10:00
|
|
|
[Access(Other = AccessPermissions.ReadWrite)]
|
2024-07-17 11:26:02 +12:00
|
|
|
public float LaunchForwardsMultiplier = 1.5f;
|
2024-02-01 11:39:10 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If this is true, any slipping entity loses its friction until
|
|
|
|
|
/// it's not colliding with any SuperSlippery entities anymore.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
[Access(Other = AccessPermissions.ReadWrite)]
|
|
|
|
|
public bool SuperSlippery;
|
2020-07-23 01:40:31 +02:00
|
|
|
}
|
|
|
|
|
}
|