1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

biography to description

This commit is contained in:
Laserlicht 2024-04-27 18:41:21 +02:00 committed by GitHub
parent e4b60baa3b
commit ab50bf9198
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 13 deletions

View File

@ -519,8 +519,8 @@ CStackWindow::MainSection::MainSection(CStackWindow * owner, int yOffset, bool s
animation = std::make_shared<CCreaturePic>(5, 41, parent->info->creature);
animationArea = std::make_shared<LRClickableArea>(Rect(5, 41, 100, 130), nullptr, [&]{
if(!parent->info->creature->getBiographyTranslated().empty())
CRClickPopup::createAndPush(parent->info->creature->getBiographyTranslated());
if(!parent->info->creature->getDescriptionTranslated().empty())
CRClickPopup::createAndPush(parent->info->creature->getDescriptionTranslated());
});
if(parent->info->stackNode != nullptr && parent->info->commander == nullptr)

View File

@ -41,9 +41,9 @@
}
}
},
"biography" : {
"description" : {
"type" : "string",
"description" : "Creature biography"
"description" : "Description of creature"
},
"faction" : {
"type" : "string",

View File

@ -32,8 +32,8 @@ In order to make functional creature you also need:
"plural" : "Creatures"
},
// Biography and information about creature
"biography" : "",
// Description of creature
"description" : "",
"level" : 0,

View File

@ -199,9 +199,9 @@ std::string CCreature::getNameTextID() const
return getNameSingularTextID();
}
std::string CCreature::getBiographyTranslated() const
std::string CCreature::getDescriptionTranslated() const
{
return VLC->generaltexth->translate(getBiographyTextID());
return VLC->generaltexth->translate(getDescriptionTextID());
}
std::string CCreature::getNamePluralTextID() const
@ -214,9 +214,9 @@ std::string CCreature::getNameSingularTextID() const
return TextIdentifier("creatures", modScope, identifier, "name", "singular" ).get();
}
std::string CCreature::getBiographyTextID() const
std::string CCreature::getDescriptionTextID() const
{
return TextIdentifier("creatures", modScope, identifier, "biography").get();
return TextIdentifier("creatures", modScope, identifier, "description").get();
}
CCreature::CreatureQuantityId CCreature::getQuantityID(const int & quantity)
@ -610,7 +610,7 @@ CCreature * CCreatureHandler::loadFromJson(const std::string & scope, const Json
VLC->generaltexth->registerString(scope, cre->getNameSingularTextID(), node["name"]["singular"].String());
VLC->generaltexth->registerString(scope, cre->getNamePluralTextID(), node["name"]["plural"].String());
VLC->generaltexth->registerString(scope, cre->getBiographyTextID(), node["biography"].String());
VLC->generaltexth->registerString(scope, cre->getDescriptionTextID(), node["description"].String());
cre->addBonus(node["hitPoints"].Integer(), BonusType::STACK_HEALTH);
cre->addBonus(node["speed"].Integer(), BonusType::STACKS_SPEED);

View File

@ -51,8 +51,8 @@ class DLL_LINKAGE CCreature : public Creature, public CBonusSystemNode
TResources cost; //cost[res_id] - amount of that resource required to buy creature from dwelling
public:
std::string getBiographyTranslated() const;
std::string getBiographyTextID() const;
std::string getDescriptionTranslated() const;
std::string getDescriptionTextID() const;
ui32 ammMin; // initial size of stack of these creatures on adventure map (if not set in editor)
ui32 ammMax;