Update puddle stickiness (#16597)

This commit is contained in:
Slava0135
2023-06-03 22:34:43 +03:00
committed by GitHub
parent 10932cc384
commit d3f7a9e820
4 changed files with 45 additions and 34 deletions

View File

@@ -4,6 +4,7 @@ using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Slippery;
using Content.Shared.StepTrigger.Components;
using Content.Shared.StepTrigger.Systems;
@@ -39,9 +40,7 @@ namespace Content.Server.Chemistry.TileReactions
var slow = entityManager.EnsureComponent<SlowContactsComponent>(puddleUid);
var speedModifier = 1 - reagent.Viscosity;
slow.WalkSpeedModifier = speedModifier;
slow.SprintSpeedModifier = speedModifier;
entityManager.Dirty(slow);
entityManager.EntitySysManager.GetEntitySystem<SlowContactsSystem>().ChangeModifiers(puddleUid, speedModifier, slow);
return reactVolume;
}