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:
@@ -16,7 +16,7 @@
|
||||
#include "../VCMI_Lib.h"
|
||||
#include "../GameConstants.h"
|
||||
#include "../constants/StringConstants.h"
|
||||
#include "../GameSettings.h"
|
||||
#include "../IGameSettings.h"
|
||||
#include "../CSoundBase.h"
|
||||
|
||||
#include "../mapObjectConstructors/CBankInstanceConstructor.h"
|
||||
@@ -103,7 +103,7 @@ CObjectClassesHandler::~CObjectClassesHandler() = default;
|
||||
|
||||
std::vector<JsonNode> CObjectClassesHandler::loadLegacyData()
|
||||
{
|
||||
size_t dataSize = VLC->settings()->getInteger(EGameSettings::TEXTS_OBJECT);
|
||||
size_t dataSize = VLC->engineSettings()->getInteger(EGameSettings::TEXTS_OBJECT);
|
||||
|
||||
CLegacyConfigParser parser(TextPath::builtin("Data/Objects.txt"));
|
||||
auto totalNumber = static_cast<size_t>(parser.readNumber()); // first line contains number of objects to read and nothing else
|
||||
|
||||
Reference in New Issue
Block a user