(552a3719d) Don't open a door by clicking "select", if the door has any required items (in which case we want to force open it by clicking "use").

This commit is contained in:
Joonas Rikkonen
2019-04-10 13:24:36 +03:00
parent c1c869b944
commit fa4d1caeed

View File

@@ -247,7 +247,10 @@ namespace Barotrauma.Items.Components
{
//can only be selected if the item is broken
if (item.Condition <= RepairThreshold) return true; //repairs
ForceOpen(ActionType.OnUse);
if (requiredItems.None())
{
ForceOpen(ActionType.OnUse);
}
return false;
}