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:
parent
e4b60baa3b
commit
ab50bf9198
@ -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)
|
||||
|
@ -41,9 +41,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"biography" : {
|
||||
"description" : {
|
||||
"type" : "string",
|
||||
"description" : "Creature biography"
|
||||
"description" : "Description of creature"
|
||||
},
|
||||
"faction" : {
|
||||
"type" : "string",
|
||||
|
@ -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,
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user