From 2dd6bac8014b5a70ed11d72fcbb4a583928b169e Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Mon, 20 May 2019 20:18:34 +0300 Subject: [PATCH] (33e7bf99e) Added: Missing repair button highlight to broken junction box in EngineerTutorial --- .../GameModes/Tutorials/EngineerTutorial.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs index de3f57c4f..12f6bcf47 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs @@ -357,6 +357,7 @@ namespace Barotrauma.Tutorials // Room 4 do { yield return null; } while (!engineer_secondDoor.IsOpen); yield return new WaitForSeconds(1f, false); + Repairable repairableJunctionBoxComponent = engineer_brokenJunctionBox.GetComponent(); TriggerTutorialSegment(2, GameMain.Config.KeyBind(InputType.Select)); // Repair the junction box do { @@ -364,10 +365,15 @@ namespace Barotrauma.Tutorials { HighlightInventorySlot(engineer.Inventory, "screwdriver", highlightColor, .5f, .5f, 0f); } + else if (IsSelectedItem(engineer_brokenJunctionBox) && repairableJunctionBoxComponent.CurrentFixer == null) + { + if (repairableJunctionBoxComponent.RepairButton.Frame.FlashTimer <= 0) + { + repairableJunctionBoxComponent.RepairButton.Frame.Flash(); + } + } yield return null; - } while (!engineer.HasEquippedItem("screwdriver")); // Wait until equipped - - do { yield return null; } while (!engineer_brokenJunctionBox.IsFullCondition); // Wait until repaired + } while (!engineer_brokenJunctionBox.IsFullCondition); // Wait until repaired SetHighlight(engineer_brokenJunctionBox, false); RemoveCompletedObjective(segments[2]); SetDoorAccess(engineer_thirdDoor, engineer_thirdDoorLight, true);