Apparently, we can no longer load a map named "MAP" after r2151. Let's warn a user about this unfortunate event.

This commit is contained in:
MaxED 2014-12-29 19:38:24 +00:00
parent 858bffd64a
commit de43f4f959
2 changed files with 18 additions and 0 deletions

View file

@ -168,6 +168,15 @@ namespace CodeImp.DoomBuilder.Windows
return;
}
//mxd. Level name will fuck things up horribly?
if(levelname.Text.ToUpperInvariant() == "MAP")
{
// Enter a level name!
MessageBox.Show(this, "Please choose a different level name.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
levelname.Focus();
return;
}
// Collect information
ConfigurationInfo configinfo = config.SelectedItem as ConfigurationInfo; //mxd
DataLocationList locations = datalocations.GetResources();

View file

@ -388,6 +388,15 @@ namespace CodeImp.DoomBuilder.Windows
mapslist.Focus();
return;
}
//mxd. We cant't deal with this... We just can't...
if(mapslist.SelectedItems[0].Text.ToUpperInvariant() == "MAP")
{
// Choose a map!
MessageBox.Show(this, "A map with this name cannot be loaded. Please rename the map and try again.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
mapslist.Focus();
return;
}
// Check if we should warn the user for missing resources
if((wadfile.Type != WAD.TYPE_IWAD) && (locations.Count == 0) && (configinfo.Resources.Count == 0))