From 6dc3e64bf50e398b0fee48d55a44201de83af8da Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sun, 9 Jun 2019 17:39:32 +0300 Subject: [PATCH] (fba51acd3) Fixed: Mechanic tutorial getting stuck if repairing the broken pump before the leaks are repaired --- .../GameSession/GameModes/Tutorials/MechanicTutorial.cs | 4 ++++ Barotrauma/BarotraumaClient/Source/Screens/MainMenuScreen.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs index c7a4755bb..7eebb036c 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs @@ -188,6 +188,8 @@ namespace Barotrauma.Tutorials mechanic_brokenPump = Item.ItemList.Find(i => i.HasTag("mechanic_brokenpump")).GetComponent(); mechanic_brokenPump.Item.Indestructible = false; mechanic_brokenPump.Item.Condition = 0; + mechanic_brokenPump.CanBeSelected = false; + mechanic_brokenPump.Item.GetComponent().CanBeSelected = false; mechanic_brokenWall_2 = Structure.WallList.Find(i => i.SpecialTag == "mechanic_brokenwall_2"); tutorial_submarineDoor = Item.ItemList.Find(i => i.HasTag("tutorial_submarinedoor")).GetComponent(); tutorial_submarineDoorLight = Item.ItemList.Find(i => i.HasTag("tutorial_submarinedoorlight")).GetComponent(); @@ -525,7 +527,9 @@ namespace Barotrauma.Tutorials mechanic.RemoveActiveObjectiveEntity(mechanic_brokenWall_2); TriggerTutorialSegment(9, GameMain.Config.KeyBind(InputType.Use)); // Repairing machinery (pump) SetHighlight(mechanic_brokenPump.Item, true); + mechanic_brokenPump.CanBeSelected = true; Repairable repairablePumpComponent = mechanic_brokenPump.Item.GetComponent(); + repairablePumpComponent.CanBeSelected = true; do { yield return null; diff --git a/Barotrauma/BarotraumaClient/Source/Screens/MainMenuScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/MainMenuScreen.cs index d8ab767b4..d4bfe4bd2 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/MainMenuScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/MainMenuScreen.cs @@ -708,7 +708,7 @@ namespace Barotrauma " -queryport " + queryPort.ToString() + " -password \"" + passwordBox.Text.Replace("\\", "\\\\").Replace("\"", "\\\"") + "\"" + " -upnp " + useUpnpBox.Selected + - " -maxplayers " + maxPlayersBox.Text + + " -playercount " + maxPlayersBox.Text + " -ownerkey " + ownerKey.ToString(); string filename = "DedicatedServer.exe";