Build 0.21.6.0 (1.0 pre-patch)
This commit is contained in:
@@ -413,7 +413,7 @@ namespace Barotrauma.Items.Components
|
||||
var wire = it.GetComponent<Wire>();
|
||||
if (wire != null && wire.Connections.Any(c => c != null)) { return false; }
|
||||
|
||||
if (it.Container?.GetComponent<ItemContainer>() is { DrawInventory: false }) { return false; }
|
||||
if (it.Container?.GetComponent<ItemContainer>() is { DrawInventory: false } or { AllowAccess: false }) { return false; }
|
||||
|
||||
if (it.HasTag("traitormissionitem")) { return false; }
|
||||
|
||||
@@ -519,7 +519,10 @@ namespace Barotrauma.Items.Components
|
||||
Color color = !hasPower ? NoPowerColor : turret.ActiveUser is null ? Color.DimGray : GUIStyle.Green;
|
||||
weaponSprite.Draw(batch, center, color, origin, rotation, scale, SpriteEffects.None);
|
||||
}
|
||||
});
|
||||
})
|
||||
{
|
||||
CanBeFocused = false
|
||||
};
|
||||
|
||||
weaponChilds.Add(component, frame);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,9 @@ namespace Barotrauma.Items.Components
|
||||
public override bool RecreateGUIOnResolutionChange => true;
|
||||
|
||||
public bool TriggerInfographic { get; set; }
|
||||
|
||||
|
||||
public bool IsInfographicVisible => infographic != null && infographic.Visible;
|
||||
|
||||
partial void InitProjSpecific(ContentXElement element)
|
||||
{
|
||||
CreateGUI();
|
||||
@@ -108,6 +110,9 @@ namespace Barotrauma.Items.Components
|
||||
{ AbsoluteOffset = GUIStyle.ItemFrameOffset },
|
||||
isHorizontal: true)
|
||||
{
|
||||
CanBeFocused = true,
|
||||
HoverCursor = CursorState.Default,
|
||||
AlwaysOverrideCursor = true,
|
||||
RelativeSpacing = 0.012f,
|
||||
Stretch = true
|
||||
};
|
||||
@@ -675,7 +680,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
if (TriggerInfographic)
|
||||
if (GuiFrame is not null && GuiFrame.Visible && TriggerInfographic)
|
||||
{
|
||||
CreateInfrographic();
|
||||
TriggerInfographic = false;
|
||||
@@ -851,8 +856,9 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
AbsoluteOffset = new Point(0, -50).Multiply(GUI.Scale)
|
||||
};
|
||||
new GUIButton(closeButtonRt, TextManager.Get("close"))
|
||||
new GUIButton(closeButtonRt, TextManager.Get("closeinfographic"))
|
||||
{
|
||||
UserData = UIHighlightAction.ElementId.CloseButton,
|
||||
OnClicked = (_, _) =>
|
||||
{
|
||||
CloseInfographic(Character.Controlled);
|
||||
@@ -871,6 +877,7 @@ namespace Barotrauma.Items.Components
|
||||
string style = arrowStyle == InfographicArrowStyle.Straight ? "InfographicArrow" : "InfographicArrowCurved";
|
||||
return new GUIImage(rt, style)
|
||||
{
|
||||
CanBeFocused = false,
|
||||
Rotation = MathHelper.ToRadians(rotationDegrees),
|
||||
SpriteEffects = spriteEffects
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user