mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 05:59:03 +03:00
# Description Port of https://github.com/WWhiteDreamProject/wwdpublic/pull/2 And now also https://github.com/WWhiteDreamProject/wwdpublic/pull/8 Because Lying Down System is dependent on the Telescope System. # TODO - [x] Reconcile the code with core code, do code cleanup. I'll undraft this when I'm done. Probably not going to be tonight, because I will have to get some sleep soon to get up early for my calculus classes. # Changelog 🆑 Spatison (White Dream) - add: Added lying down system / Добавлена система лежания - tweak: Lying down now uses do-afters that are visible to other people to indicate what is going on. - add: Added telescope system / Добавлена система прицеливания - tweak: Now you can aim from Hristov / Теперь можно прицеливаться из Христова --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com> Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> # Conflicts: # Content.Client/Input/ContentContexts.cs # Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs # Content.Shared/Input/ContentKeyFunctions.cs # Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml # Resources/keybinds.yml
23 lines
709 B
C#
23 lines
709 B
C#
using Content.Server.Traits.Assorted;
|
|
using Content.Shared.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;
|
|
}
|
|
}
|