mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 15:47:26 +00:00
* cherry-pick: Screenshake (EphemeralSpace/ephemeral-space#627) * commit your shit at some point maybe * y * who knows * rename? * debugging + shit api * i hope no one fucks my ass * erm * p * replace with shit that makes way more sense * stuff * pretty sure this is just fine * actual fix noise shit * uhhh hmaybe if i feel like it wrong then later * explosion shake * grav shake * gun shake * idk * projectile melee Co-authored-by: DisposableCrewmember42 <disposablecrewmember42@proton.me> * tweak: tune recoil on weapons * docs: add _ES license info to LEGAL.md * fix: screenshake on spawn fix from ss14Starlight/space-station-14#3664 Co-authored-by: neomoth <69372252+neomoth@users.noreply.github.com> * feat: add client cvar to disable screenshake * feat: add screenshake toggle to accessibility settings * fix: upmerge compatibility * docs: properly document cvar * docs: add missing import comments --------- Co-authored-by: mirrorcult <mirrorcult@pm.me> Co-authored-by: neomoth <69372252+neomoth@users.noreply.github.com>
18 lines
589 B
C#
18 lines
589 B
C#
using Content.Shared.Trigger;
|
|
|
|
namespace Content.Shared._ES.Camera.Trigger;
|
|
|
|
public sealed class ESScreenshakeUserOnTriggerSystem : XOnTriggerSystem<ESScreenshakeUserOnTriggerComponent>
|
|
{
|
|
[Dependency] private readonly SharedESScreenshakeSystem _screenShake = default!;
|
|
|
|
protected override void OnTrigger(Entity<ESScreenshakeUserOnTriggerComponent> ent, EntityUid target, ref TriggerEvent args)
|
|
{
|
|
if (args.User == null)
|
|
return;
|
|
|
|
_screenShake.Screenshake(args.User.Value, ent.Comp.Translation, ent.Comp.Rotation);
|
|
args.Handled = true;
|
|
}
|
|
}
|