浏览代码

biography to description

Laserlicht 1 年之前
父节点
当前提交
ab50bf9198

+ 2 - 2
client/windows/CCreatureWindow.cpp

@@ -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)

+ 2 - 2
config/schemas/creature.json

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

+ 2 - 2
docs/modders/Entities_Format/Creature_Format.md

@@ -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,
 

+ 5 - 5
lib/CCreatureHandler.cpp

@@ -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);

+ 2 - 2
lib/CCreatureHandler.h

@@ -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;