Unstable 0.16.1.0
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
namespace Barotrauma
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
abstract partial class AIObjective
|
||||
{
|
||||
public static Color ObjectiveIconColor => Color.LightGray;
|
||||
|
||||
public static Sprite GetSprite(string identifier, string option, Entity targetEntity)
|
||||
{
|
||||
if (string.IsNullOrEmpty(identifier))
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace Barotrauma
|
||||
|
||||
public bool PlaySound;
|
||||
|
||||
public GUIMessage(string rawText, Color color, float delay, string identifier = null, int? value = null)
|
||||
public GUIMessage(string rawText, Color color, float delay, string identifier = null, int? value = null, float lifeTime = 3.0f)
|
||||
{
|
||||
RawText = Text = rawText;
|
||||
if (value.HasValue)
|
||||
@@ -166,7 +166,7 @@ namespace Barotrauma
|
||||
Size = GUI.Font.MeasureString(Text);
|
||||
Color = color;
|
||||
Identifier = identifier;
|
||||
Lifetime = 3.0f;
|
||||
Lifetime = lifeTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -997,7 +997,7 @@ namespace Barotrauma
|
||||
return nameColor;
|
||||
}
|
||||
|
||||
public void AddMessage(string rawText, Color color, bool playSound, string identifier = null, int? value = null)
|
||||
public void AddMessage(string rawText, Color color, bool playSound, string identifier = null, int? value = null, float lifetime = 3.0f)
|
||||
{
|
||||
GUIMessage existingMessage = null;
|
||||
|
||||
@@ -1026,7 +1026,7 @@ namespace Barotrauma
|
||||
}
|
||||
if (existingMessage == null || !value.HasValue)
|
||||
{
|
||||
var newMessage = new GUIMessage(rawText, color, delay, identifier, value);
|
||||
var newMessage = new GUIMessage(rawText, color, delay, identifier, value, lifetime);
|
||||
guiMessages.Insert(0, newMessage);
|
||||
if (playSound)
|
||||
{
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace Barotrauma
|
||||
|
||||
return
|
||||
character?.Inventory != null &&
|
||||
character.AllowInput &&
|
||||
!character.Removed && !character.IsKnockedDown &&
|
||||
(controller?.User != character || !controller.HideHUD) &&
|
||||
!IsCampaignInterfaceOpen &&
|
||||
!ConversationAction.FadeScreenToBlack;
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace Barotrauma
|
||||
private static Sprite infoAreaPortraitBG;
|
||||
|
||||
public bool LastControlled;
|
||||
public int CrewListIndex { get; set; } = -1;
|
||||
|
||||
#warning TODO: Refactor
|
||||
private Sprite disguisedPortrait;
|
||||
@@ -831,7 +832,7 @@ namespace Barotrauma
|
||||
};
|
||||
|
||||
new GUIFrame(
|
||||
new RectTransform(new Vector2(1.25f, 1.25f), HeadSelectionList.RectTransform, Anchor.Center),
|
||||
new RectTransform(new Vector2(1.25f, 1.25f), HeadSelectionList.ContentBackground.RectTransform, Anchor.Center),
|
||||
style: "OuterGlow", color: Color.Black)
|
||||
{
|
||||
UserData = "outerglow",
|
||||
@@ -966,10 +967,15 @@ namespace Barotrauma
|
||||
foreach (Sprite sprite in characterSprites) { sprite.Remove(); }
|
||||
characterSprites.Clear();
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
ClearSprites();
|
||||
if (HeadSelectionList != null)
|
||||
{
|
||||
HeadSelectionList.RectTransform.Parent = null;
|
||||
HeadSelectionList = null;
|
||||
}
|
||||
}
|
||||
|
||||
~AppearanceCustomizationMenu()
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace Barotrauma
|
||||
Hull fireHull = Hull.hullList.GetRandom(h => h.Submarine == character.Submarine);
|
||||
if (fireHull != null)
|
||||
{
|
||||
var fakeFire = new DummyFireSource(Vector2.One * 500.0f, new Vector2(Rand.Range(fireHull.WorldRect.X, fireHull.WorldRect.Right), fireHull.WorldPosition.Y), fireHull, isNetworkMessage: true)
|
||||
var fakeFire = new DummyFireSource(Vector2.One * 500.0f, new Vector2(Rand.Range(fireHull.WorldRect.X, fireHull.WorldRect.Right), fireHull.WorldPosition.Y + 1), fireHull, isNetworkMessage: true)
|
||||
{
|
||||
CausedByPsychosis = true,
|
||||
DamagesItems = false,
|
||||
|
||||
@@ -2018,6 +2018,27 @@ namespace Barotrauma
|
||||
|
||||
limbIndicatorOverlay?.Remove();
|
||||
limbIndicatorOverlay = null;
|
||||
|
||||
if (healthWindow != null)
|
||||
{
|
||||
healthWindow.RectTransform.Parent = null;
|
||||
healthWindow = null;
|
||||
}
|
||||
if (healthBarHolder != null)
|
||||
{
|
||||
healthBarHolder.RectTransform.Parent = null;
|
||||
healthBarHolder = null;
|
||||
}
|
||||
if (SuicideButton != null)
|
||||
{
|
||||
SuicideButton.RectTransform.Parent = null;
|
||||
SuicideButton = null;
|
||||
}
|
||||
if (afflictionTooltip != null)
|
||||
{
|
||||
afflictionTooltip.RectTransform.Parent = null;
|
||||
afflictionTooltip = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user