mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts: # lib/Terrain.cpp # lib/Terrain.h
This commit is contained in:
@ -82,10 +82,12 @@ const HeroTypeService * LibClasses::heroTypes() const
|
||||
return heroh;
|
||||
}
|
||||
|
||||
#if SCRIPTING_ENABLED
|
||||
const scripting::Service * LibClasses::scripts() const
|
||||
{
|
||||
return scriptHandler;
|
||||
}
|
||||
#endif
|
||||
|
||||
const spells::Service * LibClasses::spells() const
|
||||
{
|
||||
@ -217,7 +219,9 @@ void LibClasses::init(bool onlyEssential)
|
||||
|
||||
createHandler(tplh, "Template", pomtime); //templates need already resolved identifiers (refactor?)
|
||||
|
||||
#if SCRIPTING_ENABLED
|
||||
createHandler(scriptHandler, "Script", pomtime);
|
||||
#endif
|
||||
|
||||
createHandler(battlefieldsHandler, "Battlefields", pomtime);
|
||||
|
||||
@ -248,7 +252,9 @@ void LibClasses::clear()
|
||||
delete bth;
|
||||
delete tplh;
|
||||
delete terviewh;
|
||||
#if SCRIPTING_ENABLED
|
||||
delete scriptHandler;
|
||||
#endif
|
||||
delete battlefieldsHandler;
|
||||
makeNull();
|
||||
}
|
||||
@ -268,7 +274,9 @@ void LibClasses::makeNull()
|
||||
bth = nullptr;
|
||||
tplh = nullptr;
|
||||
terviewh = nullptr;
|
||||
#if SCRIPTING_ENABLED
|
||||
scriptHandler = nullptr;
|
||||
#endif
|
||||
battlefieldsHandler = nullptr;
|
||||
}
|
||||
|
||||
@ -289,10 +297,12 @@ void LibClasses::callWhenDeserializing()
|
||||
//modh->loadConfigFromFile ("defaultMods"); //TODO: remember last saved config
|
||||
}
|
||||
|
||||
#if SCRIPTING_ENABLED
|
||||
void LibClasses::scriptsLoaded()
|
||||
{
|
||||
scriptHandler->performRegistration(this);
|
||||
}
|
||||
#endif
|
||||
|
||||
LibClasses::~LibClasses()
|
||||
{
|
||||
|
Reference in New Issue
Block a user