From 9d84ddcd48d33710d16e170b36b626e564ee6a60 Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Sat, 20 Jan 2024 02:20:21 +0900 Subject: [PATCH] Fix eshield (#624) --- Content.Shared/Blocking/BlockingSystem.User.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Blocking/BlockingSystem.User.cs b/Content.Shared/Blocking/BlockingSystem.User.cs index 87f285597f..4bb757d90f 100644 --- a/Content.Shared/Blocking/BlockingSystem.User.cs +++ b/Content.Shared/Blocking/BlockingSystem.User.cs @@ -1,6 +1,5 @@ using Content.Shared.Damage; -using Content.Shared.Damage.Prototypes; -using Robust.Shared.Audio; +using Content.Shared.Item.ItemToggle.Components; using Robust.Shared.Audio.Systems; using Robust.Shared.Containers; @@ -48,6 +47,8 @@ public sealed partial class BlockingSystem return; var blockFraction = blocking.IsBlocking ? blocking.ActiveBlockFraction : blocking.PassiveBlockFraction; + if (TryComp(component.BlockingItem, out ItemToggleComponent? toggle) && !toggle.Activated) // WD + blockFraction = 0f; blockFraction = Math.Clamp(blockFraction, 0, 1); _damageable.TryChangeDamage(component.BlockingItem, blockFraction * args.OriginalDamage);