Files
wwdpublic/Content.Server/Traits/Assorted/LayingDownModifierSystem.cs
Angelo Fallaria da3956bbcb New Trait: Parkour Training (#670)
# Description

**Parkour Training** is a 3-point Physical trait that increases your
table climbing speed (and all other climbables), and crawling speed, and
reduces the cooldown on laying down/standing up.

Inspired by the SS13 trait called Freerunning, expanding on it by
including new mechanics around the Laying Down system.

Stats (Adjustable):
- 30% faster table climbing speed
- 25% faster crawling speed
- Cooldown on laying down/standing up reduced from 2.5 seconds to 2
seconds

## Media


![image](https://github.com/user-attachments/assets/09237d2f-667b-473a-98ad-71bd19bce6c3)

# Changelog

🆑 Skubman
- add: Add Parkour Training, a 3-point trait that makes you faster with
climbing tables and crawling.

---------

Signed-off-by: Angelo Fallaria <ba.fallaria@gmail.com>
2024-08-06 16:36:59 -04:00

23 lines
713 B
C#

using Content.Server.Traits.Assorted;
using Content.Server.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.Cooldown *= component.LayingDownCooldownMultiplier;
layingDown.DownedSpeedMultiplier *= component.DownedSpeedMultiplierMultiplier;
}
}