1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

- ignore wog maps if wog is not present

This commit is contained in:
Ivan Savenko 2013-05-04 19:20:32 +00:00
parent 8be801a6dc
commit b3bbe27089
4 changed files with 14 additions and 6 deletions

View File

@ -1,5 +1,3 @@
// default configuration for mod system loaded at launch
{
"textData" :
{
@ -7,7 +5,8 @@
"artifact" : 171,
"creature" : 197,
"faction" : 9,
"hero" : 156
"hero" : 156,
"mapVersion" : 33 // WoG
},
"modules":

View File

@ -1108,7 +1108,10 @@ void SelectionTab::parseMaps(const std::vector<ResourceID> & files)
{
CMapInfo mapInfo;
mapInfo.mapInit(files[i].getName());
allItems.push_back(mapInfo);
// ignore unsupported map versions (e.g. WoG maps without WoG
if (mapInfo.mapHeader->version <= CGI->modh->settings.data["textData"]["mapVersion"].Float())
allItems.push_back(mapInfo);
}
catch(std::exception & e)
{

View File

@ -7,7 +7,8 @@
"artifact" : 144,
"creature" : 150,
"faction" : 9,
"hero" : 156
"hero" : 156,
"mapVersion" : 28 // max supported version, SoD
},
"hardcodedFeatures" :

View File

@ -278,7 +278,12 @@ namespace EMapFormat
{
enum EMapFormat
{
INVALID, WOG=0x33, AB=0x15, ROE=0x0e, SOD=0x1c
INVALID = 0,
// HEX DEC
ROE = 0x0e, // 14
AB = 0x15, // 21
SOD = 0x1c, // 28
WOG = 0x33 // 51
};
}