1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Renamed LibClasses * VLC to GameLibrary * LIBRARY

This commit is contained in:
Ivan Savenko
2025-02-14 16:23:37 +00:00
parent 156de5b17e
commit 645b95ba02
287 changed files with 2032 additions and 2032 deletions

View File

@@ -17,7 +17,7 @@
#include "texts/CGeneralTextHandler.h"
#include "CSkillHandler.h"
#include "GameConstants.h"
#include "VCMI_Lib.h"
#include "GameLibrary.h"
#include "mapObjectConstructors/CObjectClassesHandler.h"
#include "spells/CSpellHandler.h"
#include "serializer/JsonSerializeFormat.h"
@@ -122,13 +122,13 @@ std::string MetaString::getLocalString(const std::pair<EMetaText, ui32> & txt) c
switch(type)
{
case EMetaText::GENERAL_TXT:
return VLC->generaltexth->translate("core.genrltxt", ser);
return LIBRARY->generaltexth->translate("core.genrltxt", ser);
case EMetaText::ARRAY_TXT:
return VLC->generaltexth->translate("core.arraytxt", ser);
return LIBRARY->generaltexth->translate("core.arraytxt", ser);
case EMetaText::ADVOB_TXT:
return VLC->generaltexth->translate("core.advevent", ser);
return LIBRARY->generaltexth->translate("core.advevent", ser);
case EMetaText::JK_TXT:
return VLC->generaltexth->translate("core.jktext", ser);
return LIBRARY->generaltexth->translate("core.jktext", ser);
default:
logGlobal->error("Failed string substitution because type is %d", static_cast<int>(type));
return "#@#";
@@ -156,7 +156,7 @@ DLL_LINKAGE std::string MetaString::toString() const
dst += getLocalString(localStrings.at(loSt++));
break;
case EMessage::APPEND_TEXTID_STRING:
dst += VLC->generaltexth->translate(stringsTextID.at(textID++));
dst += LIBRARY->generaltexth->translate(stringsTextID.at(textID++));
break;
case EMessage::APPEND_NUMBER:
dst += std::to_string(numbers.at(nums++));
@@ -171,7 +171,7 @@ DLL_LINKAGE std::string MetaString::toString() const
boost::replace_first(dst, "%s", getLocalString(localStrings.at(loSt++)));
break;
case EMessage::REPLACE_TEXTID_STRING:
boost::replace_first(dst, "%s", VLC->generaltexth->translate(stringsTextID.at(textID++)));
boost::replace_first(dst, "%s", LIBRARY->generaltexth->translate(stringsTextID.at(textID++)));
break;
case EMessage::REPLACE_NUMBER:
boost::replace_first(dst, "%d", std::to_string(numbers.at(nums++)));
@@ -211,7 +211,7 @@ DLL_LINKAGE std::string MetaString::buildList() const
if(i > 0 && (message.at(i) == EMessage::APPEND_RAW_STRING || message.at(i) == EMessage::APPEND_LOCAL_STRING))
{
if(exSt == exactStrings.size() - 1)
lista += VLC->generaltexth->allTexts[141]; //" and "
lista += LIBRARY->generaltexth->allTexts[141]; //" and "
else
lista += ", ";
}
@@ -224,7 +224,7 @@ DLL_LINKAGE std::string MetaString::buildList() const
lista += getLocalString(localStrings.at(loSt++));
break;
case EMessage::APPEND_TEXTID_STRING:
lista += VLC->generaltexth->translate(stringsTextID.at(textID++));
lista += LIBRARY->generaltexth->translate(stringsTextID.at(textID++));
break;
case EMessage::APPEND_NUMBER:
lista += std::to_string(numbers.at(nums++));
@@ -239,7 +239,7 @@ DLL_LINKAGE std::string MetaString::buildList() const
lista.replace(lista.find("%s"), 2, getLocalString(localStrings.at(loSt++)));
break;
case EMessage::REPLACE_TEXTID_STRING:
lista.replace(lista.find("%s"), 2, VLC->generaltexth->translate(stringsTextID.at(textID++)));
lista.replace(lista.find("%s"), 2, LIBRARY->generaltexth->translate(stringsTextID.at(textID++)));
break;
case EMessage::REPLACE_NUMBER:
lista.replace(lista.find("%d"), 2, std::to_string(numbers.at(nums++)));
@@ -347,12 +347,12 @@ void MetaString::serializeJson(JsonSerializeFormat & handler)
void MetaString::appendName(const ArtifactID & id)
{
appendTextID(id.toEntity(VLC)->getNameTextID());
appendTextID(id.toEntity(LIBRARY)->getNameTextID());
}
void MetaString::appendName(const SpellID & id)
{
appendTextID(id.toEntity(VLC)->getNameTextID());
appendTextID(id.toEntity(LIBRARY)->getNameTextID());
}
void MetaString::appendName(const PlayerColor & id)
@@ -375,27 +375,27 @@ void MetaString::appendName(const GameResID& id)
void MetaString::appendNameSingular(const CreatureID & id)
{
appendTextID(id.toEntity(VLC)->getNameSingularTextID());
appendTextID(id.toEntity(LIBRARY)->getNameSingularTextID());
}
void MetaString::appendNamePlural(const CreatureID & id)
{
appendTextID(id.toEntity(VLC)->getNamePluralTextID());
appendTextID(id.toEntity(LIBRARY)->getNamePluralTextID());
}
void MetaString::replaceName(const ArtifactID & id)
{
replaceTextID(id.toEntity(VLC)->getNameTextID());
replaceTextID(id.toEntity(LIBRARY)->getNameTextID());
}
void MetaString::replaceName(const FactionID & id)
{
replaceTextID(id.toEntity(VLC)->getNameTextID());
replaceTextID(id.toEntity(LIBRARY)->getNameTextID());
}
void MetaString::replaceName(const MapObjectID & id, const MapObjectSubID & subId)
{
replaceTextID(VLC->objtypeh->getObjectName(id, subId));
replaceTextID(LIBRARY->objtypeh->getObjectName(id, subId));
}
void MetaString::replaceName(const PlayerColor & id)
@@ -405,12 +405,12 @@ void MetaString::replaceName(const PlayerColor & id)
void MetaString::replaceName(const SecondarySkill & id)
{
replaceTextID(VLC->skillh->getById(id)->getNameTextID());
replaceTextID(LIBRARY->skillh->getById(id)->getNameTextID());
}
void MetaString::replaceName(const SpellID & id)
{
replaceTextID(id.toEntity(VLC)->getNameTextID());
replaceTextID(id.toEntity(LIBRARY)->getNameTextID());
}
void MetaString::replaceName(const GameResID& id)
@@ -420,12 +420,12 @@ void MetaString::replaceName(const GameResID& id)
void MetaString::replaceNameSingular(const CreatureID & id)
{
replaceTextID(id.toEntity(VLC)->getNameSingularTextID());
replaceTextID(id.toEntity(LIBRARY)->getNameSingularTextID());
}
void MetaString::replaceNamePlural(const CreatureID & id)
{
replaceTextID(id.toEntity(VLC)->getNamePluralTextID());
replaceTextID(id.toEntity(LIBRARY)->getNamePluralTextID());
}
void MetaString::replaceName(const CreatureID & id, TQuantity count) //adds sing or plural name;