From 47ef561a03d4c596b41f224f7a18b96136056d6c Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Thu, 25 Apr 2019 17:49:23 +0300 Subject: [PATCH] (ade7449ec) increase stun baton damage slightly, should take 6 or so hits to kill a crawler instead of 12. --- .../Components/Machines/Deconstructor.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Deconstructor.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Deconstructor.cs index 7c47e9905..3d851144f 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Deconstructor.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Deconstructor.cs @@ -140,6 +140,25 @@ namespace Barotrauma.Items.Components } } + if (targetItem.Prefab.DeconstructItems.Any()) + { + inputContainer.Inventory.RemoveItem(targetItem); + Entity.Spawner.AddToRemoveQueue(targetItem); + MoveInputQueue(); + PutItemsToLinkedContainer(); + } + else + { + if (outputContainer.Inventory.Items.All(i => i != null)) + { + targetItem.Drop(dropper: null); + } + else + { + outputContainer.Inventory.TryPutItem(targetItem, user: null, createNetworkEvent: true); + } + } + if (targetItem.Prefab.DeconstructItems.Any()) { inputContainer.Inventory.RemoveItem(targetItem);