(3cc40bf1d) Added prefabs for new autodoors. Replaced doors in Dugong and Bunyip

This commit is contained in:
Joonas Rikkonen
2019-04-26 11:13:43 +03:00
parent f3fbaedb42
commit a7f56ced21
7 changed files with 43 additions and 10 deletions
@@ -1551,7 +1551,14 @@ namespace Barotrauma
{ {
if (Tutorial.Initialized) if (Tutorial.Initialized)
{ {
((TutorialMode)GameMain.GameSession.GameMode).Tutorial.Stop(); if (GameMain.GameSession.GameMode is SinglePlayerCampaign)
{
((SinglePlayerCampaign)GameMain.GameSession.GameMode).ContextualTutorial.Stop();
}
else
{
((TutorialMode)GameMain.GameSession.GameMode).Tutorial.Stop();
}
} }
if (GameSettings.SendUserStatistics) if (GameSettings.SendUserStatistics)
@@ -65,6 +65,11 @@ 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)
@@ -170,6 +175,11 @@ 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);
@@ -430,6 +440,12 @@ 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,11 +9,6 @@ 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;
@@ -37,6 +32,11 @@ 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,6 +324,7 @@ 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
@@ -364,9 +364,18 @@
<Content Include="$(MSBuildThisFileDirectory)Content\Items\Assemblies\airlock doors.xml"> <Content Include="$(MSBuildThisFileDirectory)Content\Items\Assemblies\airlock doors.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="$(MSBuildThisFileDirectory)Content\Items\Assemblies\AutoDoor.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MSBuildThisFileDirectory)Content\Items\Assemblies\AutoHatch.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MSBuildThisFileDirectory)Content\Items\Assemblies\Automatic Bilge Pump.xml"> <Content Include="$(MSBuildThisFileDirectory)Content\Items\Assemblies\Automatic Bilge Pump.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="$(MSBuildThisFileDirectory)Content\Items\Assemblies\WindowedAutoDoor.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MSBuildThisFileDirectory)Content\Items\Door\door2.png"> <Content Include="$(MSBuildThisFileDirectory)Content\Items\Door\door2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
@@ -2191,7 +2200,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="$(MSBuildThisFileDirectory)Submarines\Berilia.sub"> <None Include="$(MSBuildThisFileDirectory)Submarines\Berilia.sub">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
<None Include="$(MSBuildThisFileDirectory)Submarines\Dugong_Tutorial.sub"> <None Include="$(MSBuildThisFileDirectory)Submarines\Dugong_Tutorial.sub">
<CopyToOutputDirectory>Never</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
@@ -3350,7 +3359,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="$(MSBuildThisFileDirectory)Submarines\Remora.sub"> <None Include="$(MSBuildThisFileDirectory)Submarines\Remora.sub">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
<None Include="$(MSBuildThisFileDirectory)Submarines\RemoraDrone.sub"> <None Include="$(MSBuildThisFileDirectory)Submarines\RemoraDrone.sub">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Binary file not shown.
Binary file not shown.