Puddle Code Slipping Cleanup (#35845)
* Init Commit * windows yelling at me to update commit * working commit, need prediciton and more dehardcoding * Project 0 warnings * Working Commit (Near Final) * ryder got confused commit * I love Merge Conflicts :) * Working commit, no prediction * Forgot the yaml changes * Comments and typos * Apparently while the reduced launch mult of lube was initialized it was never used so I revered back to default * Fixed an incorrect divisor * bit of cleanup * Prediciton fixed, and puddles now affect all entities * FORGOT TO RENAME A VERY IMPORTANT VARIABLE OOPS * Really big I forgor moment * Even bigger I forgor moment * four more merge conflicts to fix four more oopsies * fixed actual divide by zero moment and also im very dumb * Even bigger I forgor moment * four more merge conflicts to fix four more oopsies * fixed actual divide by zero moment and also im very dumb * Fix all test fails * code cleanup * Webedit whitespace * Code cleaup * whitespace webedit * whitespace webedit * whitespace webedit * whitespace removal * Comments and cleanup * Re-Added 20 warnings as per Ork's request * Cleanups * Spacing fix * bugfixes and cleanup * Small bugfix * Actually dirty the slipComp for real * Added Friction field to Reagent Prototype per design discussion * Sliding system is kill
This commit is contained in:
committed by
GitHub
parent
c2857c5247
commit
251cfbd8be
@@ -1,6 +1,7 @@
|
||||
using Content.Shared.StepTrigger.Components;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Slippery
|
||||
{
|
||||
@@ -13,8 +14,6 @@ namespace Content.Shared.Slippery
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class SlipperyComponent : Component
|
||||
{
|
||||
public const float DefaultParalyzeTime = 1.5f;
|
||||
public const float DefaultLaunchForwardsMultiplier = 1.5f;
|
||||
/// <summary>
|
||||
/// Path to the sound to be played when a mob slips.
|
||||
/// </summary>
|
||||
@@ -23,25 +22,47 @@ namespace Content.Shared.Slippery
|
||||
public SoundSpecifier SlipSound = new SoundPathSpecifier("/Audio/Effects/slip.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// How many seconds the mob will be paralyzed for.
|
||||
/// Loads the data needed to determine how slippery something is.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
[Access(Other = AccessPermissions.ReadWrite)]
|
||||
public float ParalyzeTime = DefaultParalyzeTime;
|
||||
public SlipperyEffectEntry SlipData = new();
|
||||
}
|
||||
/// <summary>
|
||||
/// Stores the data for slipperiness that way reagents and this component can use it.
|
||||
/// </summary>
|
||||
[DataDefinition, Serializable, NetSerializable]
|
||||
public sealed partial class SlipperyEffectEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// How many seconds the mob will be paralyzed for.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public TimeSpan ParalyzeTime = TimeSpan.FromSeconds(1.5);
|
||||
|
||||
/// <summary>
|
||||
/// The entity's speed will be multiplied by this to slip it forwards.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
[Access(Other = AccessPermissions.ReadWrite)]
|
||||
public float LaunchForwardsMultiplier = DefaultLaunchForwardsMultiplier;
|
||||
[DataField]
|
||||
public float LaunchForwardsMultiplier = 1.5f;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum speed entity must be moving to slip.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float RequiredSlipSpeed = 3.5f;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
[Access(Other = AccessPermissions.ReadWrite)]
|
||||
[DataField]
|
||||
public bool SuperSlippery;
|
||||
|
||||
/// <summary>
|
||||
/// This is used to store the friction modifier that is used on a sliding entity.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float SlipFriction;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user