(a0a15e2cb) Removed: ContextualTutorial related calls

This commit is contained in:
Joonas Rikkonen
2019-04-26 11:13:25 +03:00
parent e90519ad2f
commit f3fbaedb42
4 changed files with 8 additions and 32 deletions
@@ -1551,14 +1551,7 @@ namespace Barotrauma
{ {
if (Tutorial.Initialized) if (Tutorial.Initialized)
{ {
if (GameMain.GameSession.GameMode is SinglePlayerCampaign) ((TutorialMode)GameMain.GameSession.GameMode).Tutorial.Stop();
{
((SinglePlayerCampaign)GameMain.GameSession.GameMode).ContextualTutorial.Stop();
}
else
{
((TutorialMode)GameMain.GameSession.GameMode).Tutorial.Stop();
}
} }
if (GameSettings.SendUserStatistics) if (GameSettings.SendUserStatistics)
@@ -65,11 +65,6 @@ namespace Barotrauma
endTimer = 5.0f; endTimer = 5.0f;
isRunning = true; isRunning = true;
CrewManager.InitSinglePlayerRound(); CrewManager.InitSinglePlayerRound();
if (ContextualTutorial.Initialized)
{
ContextualTutorial.Start();
}
} }
public bool TryHireCharacter(Location location, CharacterInfo characterInfo) public bool TryHireCharacter(Location location, CharacterInfo characterInfo)
@@ -175,11 +170,6 @@ namespace Barotrauma
base.Update(deltaTime); base.Update(deltaTime);
if (ContextualTutorial.Initialized)
{
ContextualTutorial.Update(deltaTime);
}
if (!GUI.DisableHUD && !GUI.DisableUpperHUD) if (!GUI.DisableHUD && !GUI.DisableUpperHUD)
{ {
endRoundButton.UpdateManually(deltaTime); endRoundButton.UpdateManually(deltaTime);
@@ -440,12 +430,6 @@ namespace Barotrauma
new XAttribute("cheatsenabled", CheatsEnabled)); new XAttribute("cheatsenabled", CheatsEnabled));
CrewManager.Save(modeElement); CrewManager.Save(modeElement);
Map.Save(modeElement); Map.Save(modeElement);
if (ContextualTutorial.Initialized)
{
ContextualTutorial.SavePartiallyComplete(modeElement);
}
element.Add(modeElement); element.Add(modeElement);
} }
} }
@@ -1,4 +1,4 @@
using System.Collections.Generic; /*using System.Collections.Generic;
using System.Xml.Linq; using System.Xml.Linq;
using System; using System;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
@@ -9,6 +9,11 @@ namespace Barotrauma.Tutorials
{ {
class ContextualTutorial : Tutorial class ContextualTutorial : Tutorial
{ {
public ContextualTutorial(XElement element) : base(element)
{
//Name = "ContextualTutorial";
}
public static bool Selected = false; public static bool Selected = false;
private Steering navConsole; private Steering navConsole;
@@ -32,11 +37,6 @@ namespace Barotrauma.Tutorials
private float medicalTutorialTimer = 0.0f; private float medicalTutorialTimer = 0.0f;
private const float medicalTutorialDelay = 2.0f; private const float medicalTutorialDelay = 2.0f;
public ContextualTutorial(XElement element) : base(element)
{
Name = "ContextualTutorial";
}
public override void Initialize() public override void Initialize()
{ {
base.Initialize(); base.Initialize();
@@ -517,4 +517,4 @@ namespace Barotrauma.Tutorials
Stop(); Stop();
} }
} }
} }*/
@@ -324,7 +324,6 @@ namespace Barotrauma
false, null, ""); false, null, "");
foreach (Tutorial tutorial in Tutorial.Tutorials) foreach (Tutorial tutorial in Tutorial.Tutorials)
{ {
if (tutorial is ContextualTutorial) continue;
var tutorialText = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.15f), tutorialList.Content.RectTransform), tutorial.Name, textAlignment: Alignment.Center, font: GUI.LargeFont) var tutorialText = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.15f), tutorialList.Content.RectTransform), tutorial.Name, textAlignment: Alignment.Center, font: GUI.LargeFont)
{ {
UserData = tutorial UserData = tutorial