(db4f4a55b) HasRequiredItems method is used for different purposes. Thus we shouldn't return true if the door is damaged but not broken, because it would cause issues for example in steering. Similarly I don't think we should use the canBePicked here, because it could be possible that the door should be interactable but not pickable.
This commit is contained in:
@@ -227,9 +227,8 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
msg = msg ?? (HasIntegratedButtons ? accessDeniedTxt : cannotOpenText);
|
||||
}
|
||||
if (item.Condition <= RepairThreshold) { return true; }
|
||||
//this is a bit pointless atm because if canBePicked is false it won't allow you to do Pick() anyway, however it's still good for future-proofing.
|
||||
return requiredItems.Any() ? base.HasRequiredItems(character, addMessage, msg) : canBePicked;
|
||||
if (isBroken) { return true; }
|
||||
return base.HasRequiredItems(character, addMessage, msg);
|
||||
}
|
||||
|
||||
public override bool Pick(Character picker)
|
||||
|
||||
@@ -86,7 +86,17 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
get { return zoom; }
|
||||
}
|
||||
|
||||
|
||||
//TODO: remove, only for testing
|
||||
#if DEBUG
|
||||
[Serialize(false, false), Editable]
|
||||
public bool DynamicDockingIndicator
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
#endif
|
||||
|
||||
public override bool IsActive
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user