From 1536c1a225d7b5ebadd256fc8fe17c6fe7c01764 Mon Sep 17 00:00:00 2001 From: Vigers Ray Date: Tue, 11 Feb 2025 07:31:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=B1=D1=8B=20=D0=B8=D0=B7=20=D0=B2=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=B8=D0=BB=D1=8F=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_Sunrise/VentCraw/VentCrawableSystem.cs | 7 ++++ .../VentCraw/SharedVentCrawableSystem.cs | 42 ++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Content.Client/_Sunrise/VentCraw/VentCrawableSystem.cs diff --git a/Content.Client/_Sunrise/VentCraw/VentCrawableSystem.cs b/Content.Client/_Sunrise/VentCraw/VentCrawableSystem.cs new file mode 100644 index 0000000000..c053d8f7b1 --- /dev/null +++ b/Content.Client/_Sunrise/VentCraw/VentCrawableSystem.cs @@ -0,0 +1,7 @@ +using Content.Shared._Sunrise.VentCraw; + +namespace Content.Client._Sunrise.VentCraw; + +public sealed class VentCrawableSystem : SharedVentCrawableSystem +{ +} diff --git a/Content.Shared/_Sunrise/VentCraw/SharedVentCrawableSystem.cs b/Content.Shared/_Sunrise/VentCraw/SharedVentCrawableSystem.cs index eb3813a9ae..2bd9ddfc3f 100644 --- a/Content.Shared/_Sunrise/VentCraw/SharedVentCrawableSystem.cs +++ b/Content.Shared/_Sunrise/VentCraw/SharedVentCrawableSystem.cs @@ -2,9 +2,13 @@ using System.Linq; using System.Numerics; using Content.Shared._Sunrise.VentCraw.Components; using Content.Shared.Body.Components; +using Content.Shared.Emoting; +using Content.Shared.Interaction.Events; using Content.Shared.Item; using Content.Shared.Movement.Events; +using Content.Shared.Movement.Pulling.Events; using Content.Shared.Movement.Systems; +using Content.Shared.Throwing; using Content.Shared.Tools.Components; using Robust.Shared.Audio.Systems; using Robust.Shared.Containers; @@ -17,7 +21,7 @@ namespace Content.Shared._Sunrise.VentCraw; /// /// A system that handles the crawling behavior for vent creatures. /// -public sealed class SharedVentCrawableSystem : EntitySystem +public abstract class SharedVentCrawableSystem : EntitySystem { [Dependency] private readonly SharedVentTubeSystem _ventCrawTubeSystem = default!; [Dependency] private readonly SharedPhysicsSystem _physicsSystem = default!; @@ -32,6 +36,42 @@ public sealed class SharedVentCrawableSystem : EntitySystem SubscribeLocalEvent(OnComponentStartup); SubscribeLocalEvent(OnMoveInput); + + SubscribeLocalEvent(OnAttempt); + SubscribeLocalEvent(OnAttempt); + SubscribeLocalEvent(OnAttempt); + SubscribeLocalEvent(OnInteractAttempt); + SubscribeLocalEvent(OnPullAttempt); + SubscribeLocalEvent(OnAttempt); + SubscribeLocalEvent(OnAttempt); + // SubscribeLocalEvent(OnEmoteAttempt); + // SubscribeLocalEvent(OnSpeakAttempt); + } + + // SUNRISE-TODO: Не уверен что стоит блокировать эмоции и речь в трубах, но атмос-фелинид может знатно подзаебать. + // private void OnSpeakAttempt(EntityUid uid, BeingVentCrawComponent component, SpeakAttemptEvent args) + // { + // args.Cancel(); + // } + // + // private void OnEmoteAttempt(EntityUid uid, BeingVentCrawComponent component, EmoteAttemptEvent args) + // { + // args.Cancel(); + // } + + private void OnInteractAttempt(Entity ent, ref InteractionAttemptEvent args) + { + args.Cancelled = true; + } + + private void OnAttempt(EntityUid uid, BeingVentCrawComponent component, CancellableEntityEventArgs args) + { + args.Cancel(); + } + + private void OnPullAttempt(EntityUid uid, BeingVentCrawComponent component, PullAttemptEvent args) + { + args.Cancelled = true; } ///