mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-19 22:49:01 +03:00
# 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  # 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>
23 lines
713 B
C#
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;
|
|
}
|
|
}
|