mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Hardcoded feature: no random week/month effects
This commit is contained in:
parent
8b6316c8ee
commit
36cb9f11c4
@ -25,7 +25,8 @@
|
||||
"MAX_HEROES_AVAILABLE_PER_PLAYER" : 16,
|
||||
"MAX_HEROES_ON_MAP_PER_PLAYER" : 8,
|
||||
"WINNING_HERO_WITH_NO_TROOPS_RETREATS": true,
|
||||
"BLACK_MARKET_MONTHLY_ARTIFACTS_CHANGE": true
|
||||
"BLACK_MARKET_MONTHLY_ARTIFACTS_CHANGE": true,
|
||||
"NO_RANDOM_SPECIAL_WEEKS_AND_MONTHS": false
|
||||
},
|
||||
"modules":
|
||||
{
|
||||
|
@ -663,6 +663,8 @@ void CModHandler::loadConfigFromFile (std::string name)
|
||||
logMod->debug("\tWINNING_HERO_WITH_NO_TROOPS_RETREATS\t%d", static_cast<int>(settings.WINNING_HERO_WITH_NO_TROOPS_RETREATS));
|
||||
settings.BLACK_MARKET_MONTHLY_ARTIFACTS_CHANGE = hardcodedFeatures["BLACK_MARKET_MONTHLY_ARTIFACTS_CHANGE"].Bool();
|
||||
logMod->debug("\tBLACK_MARKET_MONTHLY_ARTIFACTS_CHANGE\t%d", static_cast<int>(settings.BLACK_MARKET_MONTHLY_ARTIFACTS_CHANGE));
|
||||
settings.NO_RANDOM_SPECIAL_WEEKS_AND_MONTHS = hardcodedFeatures["NO_RANDOM_SPECIAL_WEEKS_AND_MONTHS"].Bool();
|
||||
logMod->debug("\tNO_RANDOM_SPECIAL_WEEKS_AND_MONTHS\t%d", static_cast<int>(settings.NO_RANDOM_SPECIAL_WEEKS_AND_MONTHS));
|
||||
|
||||
const JsonNode & gameModules = settings.data["modules"];
|
||||
modules.STACK_EXP = gameModules["STACK_EXPERIENCE"].Bool();
|
||||
|
@ -284,6 +284,7 @@ public:
|
||||
int MAX_HEROES_ON_MAP_PER_PLAYER;
|
||||
bool WINNING_HERO_WITH_NO_TROOPS_RETREATS;
|
||||
bool BLACK_MARKET_MONTHLY_ARTIFACTS_CHANGE;
|
||||
bool NO_RANDOM_SPECIAL_WEEKS_AND_MONTHS;
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
@ -313,6 +314,15 @@ public:
|
||||
{
|
||||
BLACK_MARKET_MONTHLY_ARTIFACTS_CHANGE = true;
|
||||
}
|
||||
|
||||
if(version >= 791)
|
||||
{
|
||||
h & NO_RANDOM_SPECIAL_WEEKS_AND_MONTHS;
|
||||
}
|
||||
else if(!h.saving)
|
||||
{
|
||||
NO_RANDOM_SPECIAL_WEEKS_AND_MONTHS = false;
|
||||
}
|
||||
}
|
||||
} settings;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "../ConstTransitivePtr.h"
|
||||
#include "../GameConstants.h"
|
||||
|
||||
const ui32 SERIALIZATION_VERSION = 790;
|
||||
const ui32 SERIALIZATION_VERSION = 791;
|
||||
const ui32 MINIMAL_SERIALIZATION_VERSION = 753;
|
||||
const std::string SAVEGAME_MAGIC = "VCMISVG";
|
||||
|
||||
|
@ -1641,7 +1641,7 @@ void CGameHandler::newTurn()
|
||||
n.specialWeek = NewTurn::DEITYOFFIRE;
|
||||
n.creatureid = CreatureID::IMP;
|
||||
}
|
||||
else
|
||||
else if(!VLC->modh->settings.NO_RANDOM_SPECIAL_WEEKS_AND_MONTHS)
|
||||
{
|
||||
int monthType = getRandomGenerator().nextInt(99);
|
||||
if (newMonth) //new month
|
||||
|
Loading…
Reference in New Issue
Block a user