Files
wwdpublic/Content.Server/Traits/Assorted/LayingDownModifierSystem.cs
Spatison 58f3ff4f5c [Port] Lying Down System / Система Лежания (#2)
* add: White lay down

* fix: rotation

* fix

* fix: rotation

* fix
2024-08-23 20:30:07 +07:00

23 lines
716 B
C#

using Content.Server.Traits.Assorted;
using Content.Shared._White.Standing;
namespace Content.Shared.Traits.Assorted.Systems;
public sealed class LayingDownModifierSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<LayingDownModifierComponent, ComponentStartup>(OnStartup);
}
private void OnStartup(EntityUid uid, LayingDownModifierComponent component, ComponentStartup args)
{
if (!TryComp<LayingDownComponent>(uid, out var layingDown))
return;
layingDown.StandingUpTime *= component.LayingDownCooldownMultiplier;
layingDown.SpeedModify *= component.DownedSpeedMultiplierMultiplier;
}
}