1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Added an option to configure validation level in launcher

This commit is contained in:
Ivan Savenko
2024-10-06 19:21:18 +00:00
parent 3e3f842fbe
commit 66fdad145c
8 changed files with 1200 additions and 1034 deletions

View File

@@ -14,6 +14,7 @@
#include "../mapObjects/CRewardableObject.h"
#include "../texts/CGeneralTextHandler.h"
#include "../IGameCallback.h"
#include "../CConfigHandler.h"
VCMI_LIB_NAMESPACE_BEGIN
@@ -25,7 +26,8 @@ void CRewardableConstructor::initTypeData(const JsonNode & config)
if (!config["name"].isNull())
VLC->generaltexth->registerString( config.getModScope(), getNameTextID(), config["name"].String());
JsonUtils::validate(config, "vcmi:rewardable", getJsonKey());
if (settings["mods"]["validation"].String() != "off")
JsonUtils::validate(config, "vcmi:rewardable", getJsonKey());
}