From e7db219943d7359fd12944a5e0f2f62947fd5133 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sat, 18 May 2019 17:52:43 +0300 Subject: [PATCH] (89d59c16f) Highlight screwdriver at repair junction box objective --- .../GameModes/Tutorials/EngineerTutorial.cs | 9 +++++++++ .../Source/Screens/ServerListScreen.cs | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs index f230542a1..1f68b13c7 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs @@ -358,6 +358,15 @@ namespace Barotrauma.Tutorials do { yield return null; } while (!engineer_secondDoor.IsOpen); yield return new WaitForSeconds(1f); TriggerTutorialSegment(2, GameMain.Config.KeyBind(InputType.Select)); // Repair the junction box + do + { + if (!engineer.HasEquippedItem("screwdriver")) + { + HighlightInventorySlot(engineer.Inventory, "screwdriver", highlightColor, .5f, .5f, 0f); + } + yield return null; + } while (!engineer.HasEquippedItem("screwdriver")); // Wait until equipped + do { yield return null; } while (!engineer_brokenJunctionBox.IsFullCondition); // Wait until repaired SetHighlight(engineer_brokenJunctionBox, false); RemoveCompletedObjective(segments[2]); diff --git a/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs index 0344ba7c1..1f146ab06 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs @@ -218,6 +218,22 @@ namespace Barotrauma return true; } + private bool RefreshJoinButtonState(GUIComponent component, object obj) + { + if (obj == null || waitingForRefresh) { return false; } + + if (!string.IsNullOrWhiteSpace(clientNameBox.Text) && !string.IsNullOrWhiteSpace(ipBox.Text)) + { + joinButton.Enabled = true; + } + else + { + joinButton.Enabled = false; + } + + return true; + } + private bool SelectServer(GUIComponent component, object obj) { if (obj == null || waitingForRefresh) { return false; }