diff --git a/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs index ae478d92d..9826e5d9c 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs @@ -204,7 +204,33 @@ namespace Barotrauma private bool RefreshJoinButtonState(GUIComponent component, object obj) { - if (obj == null || waitingForRefresh) return false; + 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; } + + if (!string.IsNullOrWhiteSpace(clientNameBox.Text)) + { + joinButton.Enabled = true; + } + else + { + clientNameBox.Flash(); + joinButton.Enabled = false; + } if (!string.IsNullOrWhiteSpace(clientNameBox.Text) && !string.IsNullOrWhiteSpace(ipBox.Text)) { diff --git a/Barotrauma/BarotraumaServer/Source/Program.cs b/Barotrauma/BarotraumaServer/Source/Program.cs index 189a20477..eba307e45 100644 --- a/Barotrauma/BarotraumaServer/Source/Program.cs +++ b/Barotrauma/BarotraumaServer/Source/Program.cs @@ -49,6 +49,14 @@ namespace Barotrauma static void CrashDump(GameMain game, string filePath, Exception exception) { + int existingFiles = 0; + string originalFilePath = filePath; + while (File.Exists(filePath)) + { + existingFiles++; + filePath = Path.GetFileNameWithoutExtension(originalFilePath) + " (" + (existingFiles + 1) + ")" + Path.GetExtension(originalFilePath); + } + StreamWriter sw = new StreamWriter(filePath); StringBuilder sb = new StringBuilder(); @@ -56,7 +64,11 @@ namespace Barotrauma sb.AppendLine("\n"); sb.AppendLine("Barotrauma seems to have crashed. Sorry for the inconvenience! "); sb.AppendLine("\n"); +#if DEBUG + sb.AppendLine("Game version " + GameMain.Version + " (debug build)"); +#else sb.AppendLine("Game version " + GameMain.Version); +#endif sb.AppendLine("Selected content packages: " + (!GameMain.SelectedPackages.Any() ? "None" : string.Join(", ", GameMain.SelectedPackages.Select(c => c.Name)))); sb.AppendLine("Level seed: " + ((Level.Loaded == null) ? "no level loaded" : Level.Loaded.Seed)); sb.AppendLine("Loaded submarine: " + ((Submarine.MainSub == null) ? "None" : Submarine.MainSub.Name + " (" + Submarine.MainSub.MD5Hash + ")"));