(5670a7c58) Don't get stuck if cannot use the button.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:44:48 +03:00
parent 96b2d953d2
commit f8090d470e
87 changed files with 1711 additions and 2564 deletions
@@ -26,6 +26,8 @@ namespace Barotrauma.Items.Components
private bool autoOrientGap;
private bool isStuck;
public bool IsStuck => isStuck;
private float resetPredictionTimer;
private Rectangle doorRect;
@@ -227,8 +229,7 @@ namespace Barotrauma.Items.Components
{
msg = msg ?? (HasIntegratedButtons ? accessDeniedTxt : cannotOpenText);
}
if (isBroken) { return true; }
return base.HasRequiredItems(character, addMessage, msg);
return isBroken || base.HasRequiredItems(character, addMessage, msg);
}
public override bool Pick(Character picker)