Unstable v0.1300.0.2

This commit is contained in:
Markus Isberg
2021-03-12 15:57:04 +02:00
parent 0f6de8ada9
commit 874616027b
145 changed files with 1897 additions and 939 deletions
@@ -18,6 +18,8 @@ namespace Barotrauma
protected Color overlayTextColor;
protected Sprite overlaySprite;
private TransitionType prevCampaignUIAutoOpenType;
protected GUIButton endRoundButton;
public GUIButton ReadyCheckButton;
@@ -199,7 +201,19 @@ namespace Barotrauma
if (endRoundButton.Visible)
{
if (!AllowedToEndRound()) { buttonText = TextManager.Get("map"); }
if (!AllowedToEndRound())
{
buttonText = TextManager.Get("map");
}
else if (prevCampaignUIAutoOpenType != availableTransition &&
(availableTransition == TransitionType.ProgressToNextEmptyLocation || availableTransition == TransitionType.ReturnToPreviousEmptyLocation))
{
HintManager.OnAvailableTransition(availableTransition);
//opening the campaign map pauses the game and prevents HintManager from running -> update it manually to get the hint to show up immediately
HintManager.Update();
endRoundButton.OnClicked(EndRoundButton, null);
prevCampaignUIAutoOpenType = availableTransition;
}
endRoundButton.Text = ToolBox.LimitString(buttonText, endRoundButton.Font, endRoundButton.Rect.Width - 5);
if (endRoundButton.Text != buttonText)
{
@@ -420,7 +420,7 @@ namespace Barotrauma
{
//wasn't initially docked (sub doesn't have a docking port?)
// -> choose a destination when the sub is far enough from the start outpost
if (!Submarine.MainSub.AtStartPosition)
if (!Submarine.MainSub.AtStartExit)
{
ForceMapUI = true;
if (CampaignUI == null) { InitCampaignUI(); }
@@ -584,7 +584,7 @@ namespace Barotrauma
{
//wasn't initially docked (sub doesn't have a docking port?)
// -> choose a destination when the sub is far enough from the start outpost
if (!Submarine.MainSub.AtStartPosition)
if (!Submarine.MainSub.AtStartExit)
{
ForceMapUI = true;
CampaignUI.SelectTab(InteractionType.Map);
@@ -249,7 +249,7 @@ namespace Barotrauma.Tutorials
{
//captain_navConsoleCustomInterface.HighlightElement(0, uiHighlightColor, duration: 1.0f, pulsateAmount: 0.0f);
yield return new WaitForSeconds(1.0f, false);
} while (!Submarine.MainSub.AtEndPosition || !Submarine.MainSub.DockedTo.Any());
} while (!Submarine.MainSub.AtEndExit || !Submarine.MainSub.DockedTo.Any());
RemoveCompletedObjective(segments[6]);
yield return new WaitForSeconds(3f, false);
GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.GetWithVariable("Captain.Radio.Complete", "[OUTPOSTNAME]", GameMain.GameSession.EndLocation.Name), ChatMessageType.Radio, null);