Fix SuperSlippery And StepTriggers persisting when UpdateSlip is called (#34525)

* Fix superSlippery and stepTrigger values persist

- made values in SpillTileReaction's public so we can query the
prototype

- made the default values for slippery component and
StepTriggerComponent based on default constants
for easier resetting

- added a calculation and check in UpdateSlips to check
if a super slip is present as well as Update
relevant steptrigger and slip values based on the contents of the
solution

* The worlds biggest change

---------

Co-authored-by: Myra <vascreeper@yahoo.com>
This commit is contained in:
Zachary Higgs
2025-02-17 16:53:23 -04:00
committed by GitHub
parent a9b487e628
commit 241d0e12e2
4 changed files with 45 additions and 19 deletions

View File

@@ -8,6 +8,7 @@ namespace Content.Shared.StepTrigger.Components;
[Access(typeof(StepTriggerSystem))]
public sealed partial class StepTriggerComponent : Component
{
public const float DefaultRequiredTriggeredSpeed = 3.5f;
/// <summary>
/// List of entities that are currently colliding with the entity.
/// </summary>
@@ -37,7 +38,7 @@ public sealed partial class StepTriggerComponent : Component
/// Entities will only be triggered if their speed exceeds this limit.
/// </summary>
[DataField, AutoNetworkedField]
public float RequiredTriggeredSpeed = 3.5f;
public float RequiredTriggeredSpeed = DefaultRequiredTriggeredSpeed;
/// <summary>
/// If any entities occupy the blacklist on the same tile then steptrigger won't work.