OBT/1.2.0(Spring Update)
Sync with Upstream
This commit is contained in:
@@ -487,7 +487,21 @@ namespace Barotrauma.Items.Components
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
public virtual bool ShouldDrawHUD(Character character)
|
||||
public bool ShouldDrawHUD(Character character)
|
||||
{
|
||||
if (Character.Controlled?.SelectedItem != null)
|
||||
{
|
||||
Controller controller = item.GetComponent<Controller>();
|
||||
if (controller != null && controller.User == Character.Controlled && controller.HideAllItemComponentHUDs)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return ShouldDrawHUDComponentSpecific(character);
|
||||
}
|
||||
|
||||
protected virtual bool ShouldDrawHUDComponentSpecific(Character character)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user