mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Renamed LibClasses * VLC to GameLibrary * LIBRARY
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "../mapping/CMap.h"
|
||||
#include "../mapping/MapFormat.h"
|
||||
#include "../VCMI_Lib.h"
|
||||
#include "../GameLibrary.h"
|
||||
#include "../texts/CGeneralTextHandler.h"
|
||||
#include "../CRandomGenerator.h"
|
||||
#include "../entities/faction/CTownHandler.h"
|
||||
@@ -105,11 +105,11 @@ const CMapGenOptions& CMapGenerator::getMapGenOptions() const
|
||||
void CMapGenerator::initQuestArtsRemaining()
|
||||
{
|
||||
//TODO: Move to QuestArtifactPlacer?
|
||||
for (auto artID : VLC->arth->getDefaultAllowed())
|
||||
for (auto artID : LIBRARY->arth->getDefaultAllowed())
|
||||
{
|
||||
auto art = artID.toArtifact();
|
||||
//Don't use parts of combined artifacts
|
||||
if (art->aClass == CArtifact::ART_TREASURE && VLC->arth->legalArtifact(art->getId()) && art->getPartOf().empty())
|
||||
if (art->aClass == CArtifact::ART_TREASURE && LIBRARY->arth->legalArtifact(art->getId()) && art->getPartOf().empty())
|
||||
questArtifacts.push_back(art->getId());
|
||||
}
|
||||
}
|
||||
@@ -477,12 +477,12 @@ int CMapGenerator::getNextMonlithIndex()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (monolithIndex >= VLC->objtypeh->knownSubObjects(Obj::MONOLITH_TWO_WAY).size())
|
||||
if (monolithIndex >= LIBRARY->objtypeh->knownSubObjects(Obj::MONOLITH_TWO_WAY).size())
|
||||
throw rmgException(boost::str(boost::format("There is no Monolith Two Way with index %d available!") % monolithIndex));
|
||||
else
|
||||
{
|
||||
//Skip modded Monoliths which can't beplaced on every terrain
|
||||
auto templates = VLC->objtypeh->getHandlerFor(Obj::MONOLITH_TWO_WAY, monolithIndex)->getTemplates();
|
||||
auto templates = LIBRARY->objtypeh->getHandlerFor(Obj::MONOLITH_TWO_WAY, monolithIndex)->getTemplates();
|
||||
if (templates.empty() || !templates[0]->canBePlacedAtAnyTerrain())
|
||||
{
|
||||
monolithIndex++;
|
||||
@@ -513,7 +513,7 @@ const std::vector<HeroTypeID> CMapGenerator::getAllPossibleHeroes() const
|
||||
|
||||
for (HeroTypeID hero : map->getMap(this).allowedHeroes)
|
||||
{
|
||||
auto * h = dynamic_cast<const CHero*>(VLC->heroTypes()->getById(hero));
|
||||
auto * h = dynamic_cast<const CHero*>(LIBRARY->heroTypes()->getById(hero));
|
||||
if(h->onlyOnWaterMap && !isWaterMap)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user