From 06576984857c4c278871392168fd7e35fa85e594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Thu, 24 Sep 2020 13:13:10 +0200 Subject: [PATCH] You can't construct without hands or when you can't interact anymore. --- .../GameObjects/EntitySystems/ConstructionSystem.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs b/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs index 00d456bbdb..feb1508aae 100644 --- a/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs @@ -299,6 +299,8 @@ namespace Content.Server.GameObjects.EntitySystems private void TryStartItemConstruction(IEntity placingEnt, string prototypeName) { + if (!ActionBlockerSystem.CanInteract(placingEnt)) return; + var prototype = _prototypeManager.Index(prototypeName); if (prototype.Stages.Count < 2) @@ -313,7 +315,8 @@ namespace Content.Server.GameObjects.EntitySystems } // Try to find the stack with the material in the user's hand. - var hands = placingEnt.GetComponent(); + if (!placingEnt.TryGetComponent(out HandsComponent hands)) return; + var activeHand = hands.GetActiveHand?.Owner; if (activeHand == null) {