Default new maps to oramap.
This commit is contained in:
@@ -104,7 +104,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
return item;
|
return item;
|
||||||
};
|
};
|
||||||
|
|
||||||
typeDropdown.Text = Path.GetExtension(map.Path);
|
typeDropdown.Text = map.Path != null ? Path.GetExtension(map.Path) : ".oramap";
|
||||||
if (string.IsNullOrEmpty(typeDropdown.Text))
|
if (string.IsNullOrEmpty(typeDropdown.Text))
|
||||||
typeDropdown.Text = fileTypes.First(t => t.Value == "").Key;
|
typeDropdown.Text = fileTypes.First(t => t.Value == "").Key;
|
||||||
|
|
||||||
@@ -137,6 +137,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
var combinedPath = Platform.ResolvePath(Path.Combine(directoryDropdown.Text, filename.Text + fileTypes[typeDropdown.Text]));
|
var combinedPath = Platform.ResolvePath(Path.Combine(directoryDropdown.Text, filename.Text + fileTypes[typeDropdown.Text]));
|
||||||
|
|
||||||
// Invalidate the old map metadata
|
// Invalidate the old map metadata
|
||||||
|
if (map.Uid != null)
|
||||||
Game.ModData.MapCache[map.Uid].Invalidate();
|
Game.ModData.MapCache[map.Uid].Invalidate();
|
||||||
|
|
||||||
map.Save(combinedPath);
|
map.Save(combinedPath);
|
||||||
|
|||||||
Reference in New Issue
Block a user