mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Added GameSettings to gamestate, potentially allowing to define game
settings per map (or in random map template)
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include "../texts/CGeneralTextHandler.h"
|
||||
#include "../texts/TextOperations.h"
|
||||
#include "../CCreatureHandler.h"
|
||||
#include "../GameSettings.h"
|
||||
#include "../IGameSettings.h"
|
||||
#include "../CHeroHandler.h"
|
||||
#include "../CConfigHandler.h"
|
||||
|
||||
@@ -167,19 +167,19 @@ int CMapInfo::getMapSizeFormatIconId() const
|
||||
switch(mapHeader->version)
|
||||
{
|
||||
case EMapFormat::ROE:
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_RESTORATION_OF_ERATHIA)["iconIndex"].Integer();
|
||||
return VLC->engineSettings()->getValue(EGameSettings::MAP_FORMAT_RESTORATION_OF_ERATHIA)["iconIndex"].Integer();
|
||||
case EMapFormat::AB:
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_ARMAGEDDONS_BLADE)["iconIndex"].Integer();
|
||||
return VLC->engineSettings()->getValue(EGameSettings::MAP_FORMAT_ARMAGEDDONS_BLADE)["iconIndex"].Integer();
|
||||
case EMapFormat::SOD:
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_SHADOW_OF_DEATH)["iconIndex"].Integer();
|
||||
return VLC->engineSettings()->getValue(EGameSettings::MAP_FORMAT_SHADOW_OF_DEATH)["iconIndex"].Integer();
|
||||
case EMapFormat::CHR:
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_CHRONICLES)["iconIndex"].Integer();
|
||||
return VLC->engineSettings()->getValue(EGameSettings::MAP_FORMAT_CHRONICLES)["iconIndex"].Integer();
|
||||
case EMapFormat::WOG:
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_IN_THE_WAKE_OF_GODS)["iconIndex"].Integer();
|
||||
return VLC->engineSettings()->getValue(EGameSettings::MAP_FORMAT_IN_THE_WAKE_OF_GODS)["iconIndex"].Integer();
|
||||
case EMapFormat::HOTA:
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_HORN_OF_THE_ABYSS)["iconIndex"].Integer();
|
||||
return VLC->engineSettings()->getValue(EGameSettings::MAP_FORMAT_HORN_OF_THE_ABYSS)["iconIndex"].Integer();
|
||||
case EMapFormat::VCMI:
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_JSON_VCMI)["iconIndex"].Integer();
|
||||
return VLC->engineSettings()->getValue(EGameSettings::MAP_FORMAT_JSON_VCMI)["iconIndex"].Integer();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user