Add space glue (#16355)

This commit is contained in:
Slava0135
2023-05-14 18:35:10 +03:00
committed by GitHub
parent 42587a83c5
commit 0a9bb5024f
5 changed files with 46 additions and 2 deletions

View File

@@ -3,8 +3,8 @@ using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Content.Shared.Movement.Components;
using Content.Shared.Slippery;
using Content.Shared.StepTrigger;
using Content.Shared.StepTrigger.Components;
using Content.Shared.StepTrigger.Systems;
using JetBrains.Annotations;
@@ -37,6 +37,12 @@ namespace Content.Server.Chemistry.TileReactions
var step = entityManager.EnsureComponent<StepTriggerComponent>(puddleUid);
entityManager.EntitySysManager.GetEntitySystem<StepTriggerSystem>().SetRequiredTriggerSpeed(puddleUid, _requiredSlipSpeed, step);
var slow = entityManager.EnsureComponent<SlowContactsComponent>(puddleUid);
var speedModifier = 1 - reagent.Viscosity;
slow.WalkSpeedModifier = speedModifier;
slow.SprintSpeedModifier = speedModifier;
entityManager.Dirty(slow);
return reactVolume;
}