From 3a586578e24ad1a19f6b141d85155fffcd1630fc Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Mon, 6 Jan 2025 18:15:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=BE=D0=BB=D1=8C=D1=88=D0=B5=20=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D1=88=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DirectBallsHit/DirectBallsHitComponent.cs | 4 ++-- .../_Engi/DirectBallsHit/DirectBallsHitSystem.cs | 15 +++++++++++---- .../_White/Mood/generic_negativeEffects.yml | 6 ++++++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Content.Server/_White/_Engi/DirectBallsHit/DirectBallsHitComponent.cs b/Content.Server/_White/_Engi/DirectBallsHit/DirectBallsHitComponent.cs index 8c7d981789..03deb5b847 100644 --- a/Content.Server/_White/_Engi/DirectBallsHit/DirectBallsHitComponent.cs +++ b/Content.Server/_White/_Engi/DirectBallsHit/DirectBallsHitComponent.cs @@ -9,10 +9,10 @@ public sealed partial class DirectBallsHitComponent : Component public TimeSpan KnockdownTime = TimeSpan.FromSeconds(2.0f); [DataField] - public TimeSpan JitterTime = TimeSpan.FromSeconds(2.0f); + public TimeSpan JitterTime = TimeSpan.FromSeconds(4.0f); [DataField] - public TimeSpan StutterTime = TimeSpan.FromSeconds(2.0f); + public TimeSpan StutterTime = TimeSpan.FromSeconds(4.0f); [DataField] public SharedStandingStateSystem.DropHeldItemsBehavior KnockDownBehavior = SharedStandingStateSystem.DropHeldItemsBehavior.AlwaysDrop; diff --git a/Content.Server/_White/_Engi/DirectBallsHit/DirectBallsHitSystem.cs b/Content.Server/_White/_Engi/DirectBallsHit/DirectBallsHitSystem.cs index 49d2feb519..d558a3992c 100644 --- a/Content.Server/_White/_Engi/DirectBallsHit/DirectBallsHitSystem.cs +++ b/Content.Server/_White/_Engi/DirectBallsHit/DirectBallsHitSystem.cs @@ -10,6 +10,7 @@ using Content.Shared.Popups; using Content.Shared._White.Implants.NeuroControl; using Robust.Shared.Timing; using Content.Server.Chat.Systems; +using Content.Server._White.Mood; namespace Content.Server._White._Engi.DirectBallsHit; @@ -21,6 +22,7 @@ public sealed class DirectBallsHitSystem : EntitySystem [Dependency] private readonly SharedElectrocutionSystem _electrocution = default!; [Dependency] private readonly SharedPopupSystem _popupSystem = default!; [Dependency] private readonly ChatSystem _chat = default!; + [Dependency] private readonly MoodSystem _mood = default!; public override void Initialize() { @@ -42,10 +44,15 @@ public sealed class DirectBallsHitSystem : EntitySystem foreach (var uid in args.HitEntities) { - _popupSystem.PopupEntity( - Loc.GetString("direct-balls-hit", ("uid", uid)), - uid, - PopupType.SmallCaution); + if (TryComp(uid, out var mood)) + { + _popupSystem.PopupEntity( + Loc.GetString("direct-balls-hit", ("uid", uid)), + uid, + PopupType.SmallCaution); + + _mood.ApplyEffect(uid, mood, "GotHitInTheBalls"); + } Timer.Spawn(TimeSpan.FromSeconds(0.5f), () => _chat.TryEmoteWithChat(uid, "Scream")); diff --git a/Resources/Prototypes/_White/Mood/generic_negativeEffects.yml b/Resources/Prototypes/_White/Mood/generic_negativeEffects.yml index 296b3b4465..aef085a1d9 100644 --- a/Resources/Prototypes/_White/Mood/generic_negativeEffects.yml +++ b/Resources/Prototypes/_White/Mood/generic_negativeEffects.yml @@ -41,3 +41,9 @@ id: MobHighPressure description: "На меня оказывается огромное давление!" moodChange: enum.MoodChangeLevel.Medium + +- type: moodEffect + id: GotHitInTheBalls + description: "Господи... Как же больно..." + moodChange: enum.MoodChangeLevel.Large + timeout: 1