Build 0.20.9.0
This commit is contained in:
@@ -9,7 +9,7 @@ using System.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
class CharacterHUD
|
||||
partial class CharacterHUD
|
||||
{
|
||||
const float BossHealthBarDuration = 120.0f;
|
||||
|
||||
@@ -99,8 +99,8 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ShouldRecreateHudTexts { get; set; } = true;
|
||||
private static bool heldDownShiftWhenGotHudTexts;
|
||||
public static bool RecreateHudTexts { get; set; } = true;
|
||||
private static bool lastHudTextsContextual;
|
||||
private static float timeHealthWindowClosed;
|
||||
|
||||
public static bool IsCampaignInterfaceOpen =>
|
||||
@@ -218,7 +218,7 @@ namespace Barotrauma
|
||||
if (focusedItemOverlayTimer <= 0.0f)
|
||||
{
|
||||
focusedItem = null;
|
||||
ShouldRecreateHudTexts = true;
|
||||
RecreateHudTexts = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -340,7 +340,7 @@ namespace Barotrauma
|
||||
if (focusedItem != character.FocusedItem)
|
||||
{
|
||||
focusedItemOverlayTimer = Math.Min(1.0f, focusedItemOverlayTimer);
|
||||
ShouldRecreateHudTexts = true;
|
||||
RecreateHudTexts = true;
|
||||
}
|
||||
focusedItem = character.FocusedItem;
|
||||
}
|
||||
@@ -364,14 +364,14 @@ namespace Barotrauma
|
||||
|
||||
if (!GUI.DisableItemHighlights && !Inventory.DraggingItemToWorld)
|
||||
{
|
||||
bool shiftDown = PlayerInput.IsShiftDown();
|
||||
if (ShouldRecreateHudTexts || heldDownShiftWhenGotHudTexts != shiftDown)
|
||||
bool hudTextsContextual = PlayerInput.IsShiftDown();
|
||||
if (RecreateHudTexts || lastHudTextsContextual != hudTextsContextual)
|
||||
{
|
||||
ShouldRecreateHudTexts = true;
|
||||
heldDownShiftWhenGotHudTexts = shiftDown;
|
||||
RecreateHudTexts = true;
|
||||
lastHudTextsContextual = hudTextsContextual;
|
||||
}
|
||||
var hudTexts = focusedItem.GetHUDTexts(character, ShouldRecreateHudTexts);
|
||||
ShouldRecreateHudTexts = false;
|
||||
var hudTexts = focusedItem.GetHUDTexts(character, RecreateHudTexts);
|
||||
RecreateHudTexts = false;
|
||||
|
||||
int dir = Math.Sign(focusedItem.WorldPosition.X - character.WorldPosition.X);
|
||||
|
||||
@@ -790,5 +790,25 @@ namespace Barotrauma
|
||||
Vector2 drawPos = objectiveEntity.Entity.WorldPosition;// + Vector2.UnitX * objectiveEntity.Sprite.size.X * 1.5f;
|
||||
GUI.DrawIndicator(spriteBatch, drawPos, cam, 100.0f, objectiveEntity.Sprite, objectiveEntity.Color * iconAlpha);
|
||||
}
|
||||
|
||||
static partial void RecreateHudTextsIfControllingProjSpecific(Character character)
|
||||
{
|
||||
if (character == Character.Controlled)
|
||||
{
|
||||
RecreateHudTexts = true;
|
||||
}
|
||||
}
|
||||
|
||||
static partial void RecreateHudTextsIfFocusedProjSpecific(params Item[] items)
|
||||
{
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (item == Character.Controlled?.FocusedItem)
|
||||
{
|
||||
RecreateHudTexts = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user