1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

disable all scripting code when configuring without scripting modules

This commit is contained in:
Andrey Filipenkov
2022-09-21 19:31:14 +03:00
parent 4058c2c18a
commit 7e6ed0583c
30 changed files with 124 additions and 10 deletions

View File

@ -434,7 +434,9 @@ void CContentHandler::init()
handlers.insert(std::make_pair("spells", ContentTypeHandler(VLC->spellh, "spell")));
handlers.insert(std::make_pair("skills", ContentTypeHandler(VLC->skillh, "skill")));
handlers.insert(std::make_pair("templates", ContentTypeHandler((IHandlerBase *)VLC->tplh, "template")));
#if SCRIPTING_ENABLED
handlers.insert(std::make_pair("scripts", ContentTypeHandler(VLC->scriptHandler, "script")));
#endif
handlers.insert(std::make_pair("battlefields", ContentTypeHandler(VLC->battlefieldsHandler, "battlefield")));
handlers.insert(std::make_pair("obstacles", ContentTypeHandler(VLC->obstacleHandler, "obstacle")));
//TODO: any other types of moddables?
@ -986,7 +988,9 @@ void CModHandler::load()
for(const TModID & modName : activeMods)
content->load(allMods[modName]);
#if SCRIPTING_ENABLED
VLC->scriptHandler->performRegistration(VLC);//todo: this should be done before any other handlers load
#endif
content->loadCustom();