The old plural [race] name= key is not plural_name=
Add a few race descriptions for proof of concept purpose
This commit is contained in:
parent
2fb0462b2c
commit
8965563d72
5 changed files with 63 additions and 21 deletions
|
@ -40,20 +40,26 @@
|
|||
|
||||
[race]
|
||||
id=bats
|
||||
name= _ "race^Bats"
|
||||
name= _ "race^Bat"
|
||||
plural_name= _ "race^Bats"
|
||||
description= ""
|
||||
num_traits=2
|
||||
[/race]
|
||||
|
||||
[race]
|
||||
id=drake
|
||||
name= _ "race^Drakes"
|
||||
name= _ "race^Drake"
|
||||
plural_name= _ "race^Drakes"
|
||||
description= ""
|
||||
num_traits=2
|
||||
{DRAKE_NAMES}
|
||||
[/race]
|
||||
|
||||
[race]
|
||||
id=dwarf
|
||||
name= _ "race^Dwarves"
|
||||
name= _ "race^Dwarf"
|
||||
plural_name= _ "race^Dwarves"
|
||||
description= ""
|
||||
num_traits=2
|
||||
{DWARVISH_NAMES}
|
||||
{TRAIT_HEALTHY}
|
||||
|
@ -61,7 +67,9 @@
|
|||
|
||||
[race]
|
||||
id=elf
|
||||
name= _ "race^Elves"
|
||||
name= _ "race^Elf"
|
||||
plural_name= _ "race^Elves"
|
||||
description= ""
|
||||
num_traits=2
|
||||
markov_chain_size=2
|
||||
{ELVISH_NAMES}
|
||||
|
@ -70,28 +78,36 @@
|
|||
|
||||
[race]
|
||||
id=goblin
|
||||
name= _ "race^Goblins"
|
||||
name= _ "race^Goblin"
|
||||
plural_name= _ "race^Goblins"
|
||||
description= ""
|
||||
num_traits=2
|
||||
{ORCISH_NAMES}
|
||||
[/race]
|
||||
|
||||
[race]
|
||||
id=gryphon
|
||||
name= _ "race^Gryphons"
|
||||
name= _ "race^Gryphon"
|
||||
plural_name= _ "race^Gryphons"
|
||||
description= _ "These majestic and powerful creatures are masters of the sky. Gryphons are both dangerous and wary of other intelligent creatures, and thus should not be disturbed without a good reason."
|
||||
num_traits=2
|
||||
{GRYPHON_NAMES}
|
||||
[/race]
|
||||
|
||||
[race]
|
||||
id=human
|
||||
name= _ "race^Humans"
|
||||
name= _ "race^Human"
|
||||
plural_name= _ "race^Humans"
|
||||
description= ""
|
||||
num_traits=2
|
||||
{HUMAN_NAMES}
|
||||
[/race]
|
||||
|
||||
[race]
|
||||
id=lizard
|
||||
name= _ "race^Saurians"
|
||||
name= _ "race^Saurian"
|
||||
plural_name= _ "race^Saurians"
|
||||
description= ""
|
||||
num_traits=2
|
||||
#Tentative list of fricative heavy lizard names
|
||||
{LIZARD_NAMES}
|
||||
|
@ -100,6 +116,8 @@
|
|||
[race]
|
||||
id=mechanical
|
||||
name= _ "race^Mechanical"
|
||||
plural_name= _ "race+plural^Mechanical"
|
||||
description= ""
|
||||
num_traits=1
|
||||
undead_variation=null
|
||||
ignore_global_traits=yes
|
||||
|
@ -108,41 +126,53 @@
|
|||
|
||||
[race]
|
||||
id=merman
|
||||
name= _ "race^Mermen"
|
||||
name= _ "race^Merman"
|
||||
plural_name= _ "race^Mermen"
|
||||
description= ""
|
||||
num_traits=2
|
||||
{MERMAN_NAMES}
|
||||
[/race]
|
||||
|
||||
[race]
|
||||
id=monster
|
||||
name= _ "race^Monsters"
|
||||
name= _ "race^Monster"
|
||||
plural_name= _ "race^Monsters"
|
||||
description= ""
|
||||
num_traits=0
|
||||
[/race]
|
||||
|
||||
[race]
|
||||
id=naga
|
||||
name= _ "race^Nagas"
|
||||
name= _ "race^Naga"
|
||||
plural_name= _ "race^Nagas"
|
||||
description= ""
|
||||
num_traits=2
|
||||
{NAGA_NAMES}
|
||||
[/race]
|
||||
|
||||
[race]
|
||||
id=ogre
|
||||
name= _ "race^Ogres"
|
||||
num_traits=2
|
||||
name= _ "race^Ogre"
|
||||
plural_name= _ "race^Ogres"
|
||||
description= _ "Ogres are giant creatures that usually live alone in the wilderness, remarkably similar to humans in form, though large and misshapen. While they can be easily outrun or outsmarted, their strength is not to be underestimated."
|
||||
num_traits=2
|
||||
{OGRE_NAMES}
|
||||
[/race]
|
||||
|
||||
[race]
|
||||
id=orc
|
||||
name= _ "race^Orcs"
|
||||
name= _ "race^Orc"
|
||||
plural_name= _ "race^Orcs"
|
||||
description= ""
|
||||
num_traits=2
|
||||
{ORCISH_NAMES}
|
||||
[/race]
|
||||
|
||||
[race]
|
||||
id=troll
|
||||
name= _ "race^Trolls"
|
||||
name= _ "race^Troll"
|
||||
plural_name= _ "race^Trolls"
|
||||
description= ""
|
||||
num_traits=2
|
||||
ignore_global_traits=yes
|
||||
{TRAIT_STRONG}
|
||||
|
@ -155,6 +185,8 @@
|
|||
[race]
|
||||
id=undead
|
||||
name= _ "race^Undead"
|
||||
plural_name= _ "race+plural^Undead"
|
||||
description= _ "Undead units are the bodies of the dead, risen to fight again."
|
||||
num_traits=1
|
||||
ignore_global_traits=yes
|
||||
{TRAIT_UNDEAD}
|
||||
|
@ -162,7 +194,9 @@
|
|||
|
||||
[race]
|
||||
id=wose
|
||||
name= _ "race^Woses"
|
||||
name= _ "race^Wose"
|
||||
plural_name= _ "race^Woses"
|
||||
description= ""
|
||||
num_traits=0
|
||||
markov_chain_size=3
|
||||
{WOSE_NAMES}
|
||||
|
|
|
@ -1130,7 +1130,7 @@ std::vector<topic> generate_race_topics(const bool sort_generated)
|
|||
|
||||
const race_map::const_iterator race_it = game_info->races.find(r->first);
|
||||
if (race_it != game_info->races.end()) {
|
||||
name = race_it->second.name();
|
||||
name = race_it->second.plural_name();
|
||||
description = race_it->second.description();
|
||||
// if (description.empty()) description = _("No description Available");
|
||||
} else {
|
||||
|
@ -1329,7 +1329,7 @@ public:
|
|||
std::string race_name;
|
||||
const race_map::const_iterator race_it = game_info->races.find(race_id);
|
||||
if (race_it != game_info->races.end()) {
|
||||
race_name = race_it->second.name();
|
||||
race_name = race_it->second.plural_name();
|
||||
} else {
|
||||
race_name = _ ("race^Miscellaneous");
|
||||
}
|
||||
|
@ -1575,7 +1575,7 @@ void generate_races_sections(const config *help_cfg, section &sec, int level)
|
|||
std::string title;
|
||||
const race_map::const_iterator race_it = game_info->races.find(*it);
|
||||
if (race_it != game_info->races.end()) {
|
||||
title = race_it->second.name();
|
||||
title = race_it->second.plural_name();
|
||||
} else {
|
||||
title = _ ("race^Miscellaneous");
|
||||
}
|
||||
|
@ -1626,7 +1626,7 @@ std::vector<topic> generate_unit_topics(const bool sort_generated, const std::st
|
|||
std::string race_description;
|
||||
const race_map::const_iterator race_it = game_info->races.find(race);
|
||||
if (race_it != game_info->races.end()) {
|
||||
race_name = race_it->second.name();
|
||||
race_name = race_it->second.plural_name();
|
||||
race_description = race_it->second.description();
|
||||
// if (description.empty()) description = _("No description Available");
|
||||
} else {
|
||||
|
|
|
@ -1591,7 +1591,7 @@ private:
|
|||
std::string race;
|
||||
const race_map::const_iterator race_it = gameinfo_.races.find(i->second.race());
|
||||
if (race_it != gameinfo_.races.end()) {
|
||||
race = race_it->second.name();
|
||||
race = race_it->second.plural_name();
|
||||
}
|
||||
row << race << COLUMN_SEPARATOR;
|
||||
row << i->second.language_name() << COLUMN_SEPARATOR;
|
||||
|
|
|
@ -132,6 +132,7 @@ static wide_string markov_generate_name(const markov_prefix_map& prefixes, size_
|
|||
unit_race::unit_race() :
|
||||
id_(),
|
||||
name_(),
|
||||
plural_name_(),
|
||||
description_(),
|
||||
ntraits_(0),
|
||||
chain_size_(0),
|
||||
|
@ -143,6 +144,7 @@ unit_race::unit_race() :
|
|||
unit_race::unit_race(const config& cfg) :
|
||||
id_(cfg["id"]),
|
||||
name_(cfg["name"]),
|
||||
plural_name_(cfg["plural_name"]),
|
||||
description_(cfg["description"]),
|
||||
ntraits_(atoi(cfg["num_traits"].c_str())),
|
||||
chain_size_(atoi(cfg["markov_chain_size"].c_str())),
|
||||
|
@ -154,6 +156,10 @@ unit_race::unit_race(const config& cfg) :
|
|||
// This code is only for compatibility with old race defs.
|
||||
id_ = (cfg["name"]);
|
||||
}
|
||||
if(plural_name_.empty()) {
|
||||
// This code is only for compatibility with old race defs.
|
||||
plural_name_ = (cfg["name"]);
|
||||
}
|
||||
|
||||
names_[MALE] = utils::split(cfg["male_names"]);
|
||||
names_[FEMALE] = utils::split(cfg["female_names"]);
|
||||
|
|
|
@ -34,6 +34,7 @@ public:
|
|||
|
||||
const std::string& id() const { return id_; };
|
||||
const t_string& name() const { return name_; };
|
||||
const t_string& plural_name() const { return plural_name_; };
|
||||
const t_string& description() const { return description_; };
|
||||
|
||||
std::string generate_name(GENDER gender) const;
|
||||
|
@ -46,6 +47,7 @@ public:
|
|||
private:
|
||||
std::string id_;
|
||||
t_string name_;
|
||||
t_string plural_name_;
|
||||
t_string description_;
|
||||
unsigned int ntraits_;
|
||||
std::vector<std::string> names_[NUM_GENDERS];
|
||||
|
|
Loading…
Add table
Reference in a new issue