From 7a55c07e228f4718a65a0d38b3575d2c9ffe9aba Mon Sep 17 00:00:00 2001 From: Acruid Date: Sun, 1 Sep 2019 16:23:30 -0700 Subject: [PATCH] The entity spawned when an item is thrown from a stack now properly sets its stack size to 1. This resolves https://github.com/space-wizards/space-station-14/issues/312. --- Content.Server/GameObjects/EntitySystems/HandsSystem.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs index 181b5a024e..79bdc6b00d 100644 --- a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs @@ -155,6 +155,10 @@ namespace Content.Server.GameObjects.EntitySystems { stackComp.Use(1); throwEnt = throwEnt.EntityManager.SpawnEntityAt(throwEnt.Prototype.ID, plyEnt.Transform.GridPosition); + + // can only throw one item at a time, regardless of what the prototype stack size is. + if (throwEnt.TryGetComponent(out var newStackComp)) + newStackComp.Count = 1; } if (!throwEnt.TryGetComponent(out CollidableComponent colComp))