1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Added GameSettings to gamestate, potentially allowing to define game

settings per map (or in random map template)
This commit is contained in:
Ivan Savenko
2024-08-31 11:00:36 +00:00
parent 6179521364
commit 8225eb454e
68 changed files with 432 additions and 293 deletions

View File

@@ -39,7 +39,7 @@
#include "../CPlayerInterface.h"
#include "../../CCallback.h"
#include "../../lib/GameSettings.h"
#include "../../lib/IGameSettings.h"
#include "../../lib/StartInfo.h"
#include "../../lib/texts/CGeneralTextHandler.h"
#include "../../lib/spells/CSpellHandler.h"
@@ -617,7 +617,7 @@ void AdventureMapInterface::onTileHovered(const int3 &targetPosition)
case SpellID::DIMENSION_DOOR:
if(isValidAdventureSpellTarget(targetPosition))
{
if(VLC->settings()->getBoolean(EGameSettings::DIMENSION_DOOR_TRIGGERS_GUARDS) && LOCPLINT->cb->isTileGuardedUnchecked(targetPosition))
if(LOCPLINT->cb->getSettings().getBoolean(EGameSettings::DIMENSION_DOOR_TRIGGERS_GUARDS) && LOCPLINT->cb->isTileGuardedUnchecked(targetPosition))
CCS->curh->set(Cursor::Map::T1_ATTACK);
else
CCS->curh->set(Cursor::Map::TELEPORT);