Unstable 0.1300.0.4

This commit is contained in:
Markus Isberg
2021-03-30 15:51:49 +03:00
parent 58c50a235d
commit 862221635c
108 changed files with 907 additions and 378 deletions
@@ -767,6 +767,10 @@ namespace Barotrauma
else if (orderInfo.MatchesOrder(order, option))
{
icon.UserData = new OrderInfo(order, option, priority);
if (icon is GUIImage image)
{
image.Sprite = GetOrderIconSprite(order, option);
}
updatedExistingIcon = true;
}
}
@@ -55,6 +55,10 @@ namespace Barotrauma
{
chatBox.ToggleOpen = wasChatBoxOpen;
}
if (!value && CampaignUI?.SelectedTab == InteractionType.PurchaseSub)
{
SubmarinePreview.Close();
}
showCampaignUI = value;
}
}
@@ -533,7 +533,7 @@ namespace Barotrauma
base.Update(deltaTime);
Map?.Radiation.UpdateRadiation(deltaTime);
Map?.Radiation?.UpdateRadiation(deltaTime);
if (PlayerInput.SecondaryMouseButtonClicked() ||
PlayerInput.KeyHit(Microsoft.Xna.Framework.Input.Keys.Escape))
@@ -106,7 +106,7 @@ namespace Barotrauma
CheckIsInteracting();
CheckIfDivingGearOutOfOxygen();
CheckAdjacentHulls();
CheckHulls();
CheckReminders();
}
@@ -503,6 +503,19 @@ namespace Barotrauma
DisplayHint("onrepairfailed");
}
public static void OnActiveOrderAdded(Order order)
{
if (!CanDisplayHints()) { return; }
if (order == null) { return; }
if (order.Identifier == "reportballastflora" &&
order.TargetEntity is Hull h &&
h.Submarine?.TeamID == Character.Controlled.TeamID)
{
DisplayHint("onballastflorainfected");
}
}
private static void CheckIfDivingGearOutOfOxygen()
{
if (!CanDisplayHints()) { return; }
@@ -520,10 +533,14 @@ namespace Barotrauma
});
}
private static void CheckAdjacentHulls()
private static void CheckHulls()
{
if (!CanDisplayHints()) { return; }
if (Character.Controlled.CurrentHull == null) { return; }
if (HumanAIController.IsBallastFloraNoticeable(Character.Controlled, Character.Controlled.CurrentHull))
{
if (DisplayHint("onballastflorainfected")) { return; }
}
foreach (var gap in Character.Controlled.CurrentHull.ConnectedGaps)
{
if (gap.ConnectedDoor == null || gap.ConnectedDoor.Impassable) { continue; }