Fix for new maps always saving as map extensions even if field is blank

This commit is contained in:
GrapeshotGames 2019-02-26 17:50:12 -05:00
parent 682c568a4b
commit e866207ebd
2 changed files with 3 additions and 1 deletions

Binary file not shown.

View file

@ -1129,7 +1129,8 @@ namespace ServerGridEditor
Dictionary<string, Island> originalIslands = new Dictionary<string, Island>(); Dictionary<string, Island> originalIslands = new Dictionary<string, Island>();
foreach (Island island in allIslands) foreach (Island island in allIslands)
if (island.modDir != null) {
if (!string.IsNullOrWhiteSpace(island.modDir))
{ {
//This is a mod island group it to be saved //This is a mod island group it to be saved
Dictionary<string, Island> modIslandsDict = null; Dictionary<string, Island> modIslandsDict = null;
@ -1145,6 +1146,7 @@ namespace ServerGridEditor
{ {
originalIslands.Add(island.name, island); originalIslands.Add(island.name, island);
} }
}
//Serialize Main island file //Serialize Main island file
string json = JsonConvert.SerializeObject(originalIslands, Formatting.Indented); string json = JsonConvert.SerializeObject(originalIslands, Formatting.Indented);