(b1ed113e0) Randomize map seed when opening the "new game" tab. Closes #1399

This commit is contained in:
Joonas Rikkonen
2019-04-08 13:37:12 +03:00
parent 9594ea67a7
commit 24794932dc
2 changed files with 6 additions and 0 deletions
@@ -181,6 +181,11 @@ namespace Barotrauma
UpdateLoadMenu(saveFiles); UpdateLoadMenu(saveFiles);
} }
public void RandomizeSeed()
{
seedBox.Text = ToolBox.RandomSeed(8);
}
private bool OnSubSelected(GUIComponent component, object obj) private bool OnSubSelected(GUIComponent component, object obj)
{ {
if (subPreviewContainer == null) { return false; } if (subPreviewContainer == null) { return false; }
@@ -387,6 +387,7 @@ namespace Barotrauma
{ {
case Tab.NewGame: case Tab.NewGame:
campaignSetupUI.CreateDefaultSaveName(); campaignSetupUI.CreateDefaultSaveName();
campaignSetupUI.RandomizeSeed();
campaignSetupUI.UpdateTutorialSelection(); campaignSetupUI.UpdateTutorialSelection();
campaignSetupUI.UpdateSubList(Submarine.SavedSubmarines); campaignSetupUI.UpdateSubList(Submarine.SavedSubmarines);
break; break;