1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

Vlc obstacles [part 1] (#888)

* obstacles content handler, entity service and VLC integration
This commit is contained in:
Nordsoft91
2022-09-15 12:06:54 +04:00
committed by GitHub
parent 7dc05d8e81
commit ad01c7ffce
25 changed files with 807 additions and 489 deletions

View File

@ -33,6 +33,7 @@
#include "mapping/CMapEditManager.h"
#include "ScriptHandler.h"
#include "BattleFieldHandler.h"
#include "ObstacleHandler.h"
LibClasses * VLC = nullptr;
@ -116,6 +117,11 @@ const BattleFieldService * LibClasses::battlefields() const
return battlefieldsHandler;
}
const ObstacleService * LibClasses::obstacles() const
{
return obstacleHandler;
}
void LibClasses::updateEntity(Metatype metatype, int32_t index, const JsonNode & data)
{
switch(metatype)
@ -212,6 +218,8 @@ void LibClasses::init(bool onlyEssential)
createHandler(scriptHandler, "Script", pomtime);
createHandler(battlefieldsHandler, "Battlefields", pomtime);
createHandler(obstacleHandler, "Obstacles", pomtime);
logGlobal->info("\tInitializing handlers: %d ms", totalTime.getDiff());