From: Plykiya <58439124+Plykiya@users.noreply.github.com> Date: Fri, 9 Aug 2024 12:02:06 +0000 (-0700) Subject: Fix for stripping doafters (#30821) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=9f8ff021ea480cf711a72847303af014c62cdbdc;p=space-station-14.git Fix for stripping doafters (#30821) Apparently I need to check if they're holding an item Co-authored-by: plykiya --- diff --git a/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs b/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs index 213dc624b2..f9718be52d 100644 --- a/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs +++ b/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs @@ -229,7 +229,7 @@ public abstract partial class SharedDoAfterSystem : EntitySystem // If an item was in the user's hand to begin with, // check if the user is no longer holding the item. - if (args.BreakOnDropItem && !_hands.IsHolding((args.User, hands), doAfter.InitialItem)) + if (args.BreakOnDropItem && doAfter.InitialItem != null && !_hands.IsHolding((args.User, hands), doAfter.InitialItem)) return true; // If the user changes which hand is active at all, interrupt the do-after