(025652eb8) Fixed: Holding an item preventing interaction with tutorial elements, medical overlay appearing on top of video / info, reactor command tutorial not completing when powered up by the player

This commit is contained in:
Joonas Rikkonen
2019-03-27 20:53:30 +02:00
parent ec481eba45
commit 8808edcd21
9 changed files with 209 additions and 21 deletions
@@ -274,7 +274,7 @@ namespace Barotrauma.Tutorials
base.AddToGUIUpdateList();
if (videoPlayer != null)
{
videoPlayer.AddToGUIUpdateList();
videoPlayer.AddToGUIUpdateList(order: 100);
}
}
@@ -404,14 +404,15 @@ namespace Barotrauma.Tutorials
switch (index)
{
case 0: // Welcome: Game Start [Text]
if (tutorialTimer < 0.5f)
if (tutorialTimer < 1.0f)
{
tutorialTimer += deltaTime;
return false;
}
break;
case 1: // Command Reactor: 2 seconds after 'Welcome' dismissed and only if no command given to start reactor [Video]
if (tutorialTimer < 2.5f)
if (!segments[0].IsTriggered) return false;
if (tutorialTimer < 3.0f)
{
tutorialTimer += deltaTime;
@@ -565,7 +566,10 @@ namespace Barotrauma.Tutorials
switch(objective.Id)
{
case "ReactorCommand": // Reactor commanded
if (!HasOrder("operatereactor")) return;
if (!IsReactorPoweredUp())
{
if (!HasOrder("operatereactor")) return;
}
break;
case "NavConsole": // traveled 50 meters
if (Vector2.Distance(subStartingPosition, Submarine.MainSub.WorldPosition) < 4000f)
@@ -724,6 +728,7 @@ namespace Barotrauma.Tutorials
private void TriggerTutorialSegment(int index, params object[] args)
{
Inventory.draggingItem = null;
ContentRunning = true;
activeSegment = segments[index];
@@ -121,7 +121,7 @@ namespace Barotrauma.Tutorials
public virtual void AddToGUIUpdateList()
{
if (infoBox != null) infoBox.AddToGUIUpdateList();
if (infoBox != null) infoBox.AddToGUIUpdateList(order: 100);
}
public virtual void Update(float deltaTime)