summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/basicstat.h14
-rw-r--r--src/resources/db/statdb.cpp48
2 files changed, 47 insertions, 15 deletions
diff --git a/src/resources/basicstat.h b/src/resources/basicstat.h
index 598e9dc8b..a57581ffe 100644
--- a/src/resources/basicstat.h
+++ b/src/resources/basicstat.h
@@ -23,20 +23,28 @@
#ifndef RESOURCES_BASICSTAT_H
#define RESOURCES_BASICSTAT_H
+#include "enums/being/attributes.h"
+
#include <string>
#include "localconsts.h"
struct BasicStat final
{
- BasicStat(const std::string &tag0,
- const std::string &format0) :
+ BasicStat(const AttributesT attr0,
+ const std::string &tag0,
+ const std::string &name0,
+ const std::string &format0) :
tag(tag0),
- format(format0)
+ name(name0),
+ format(format0),
+ attr(attr0)
{}
std::string tag;
+ std::string name;
std::string format;
+ AttributesT attr;
};
#endif // RESOURCES_BASICSTAT_H
diff --git a/src/resources/db/statdb.cpp b/src/resources/db/statdb.cpp
index 0d25b07dd..36748c476 100644
--- a/src/resources/db/statdb.cpp
+++ b/src/resources/db/statdb.cpp
@@ -41,18 +41,42 @@ namespace
void StatDb::addBasicStats()
{
- // TRANSLATORS: player stat
- mBasicStats.push_back(BasicStat("str", _("Strength %s")));
- // TRANSLATORS: player stat
- mBasicStats.push_back(BasicStat("agi", _("Agility %s")));
- // TRANSLATORS: player stat
- mBasicStats.push_back(BasicStat("vit", _("Vitality %s")));
- // TRANSLATORS: player stat
- mBasicStats.push_back(BasicStat("int", _("Intelligence %s")));
- // TRANSLATORS: player stat
- mBasicStats.push_back(BasicStat("dex", _("Dexterity %s")));
- // TRANSLATORS: player stat
- mBasicStats.push_back(BasicStat("luck", _("Luck %s")));
+ mBasicStats.push_back(BasicStat(Attributes::STR,
+ "str",
+ // TRANSLATORS: player stat
+ _("Strength"),
+ // TRANSLATORS: player stat
+ _("Strength %s")));
+ mBasicStats.push_back(BasicStat(Attributes::AGI,
+ "agi",
+ // TRANSLATORS: player stat
+ _("Agility"),
+ // TRANSLATORS: player stat
+ _("Agility %s")));
+ mBasicStats.push_back(BasicStat(Attributes::VIT,
+ "vit",
+ // TRANSLATORS: player stat
+ _("Vitality"),
+ // TRANSLATORS: player stat
+ _("Vitality %s")));
+ mBasicStats.push_back(BasicStat(Attributes::INT,
+ "int",
+ // TRANSLATORS: player stat
+ _("Intelligence"),
+ // TRANSLATORS: player stat
+ _("Intelligence %s")));
+ mBasicStats.push_back(BasicStat(Attributes::DEX,
+ "dex",
+ // TRANSLATORS: player stat
+ _("Dexterity"),
+ // TRANSLATORS: player stat
+ _("Dexterity %s")));
+ mBasicStats.push_back(BasicStat(Attributes::LUK,
+ "luk",
+ // TRANSLATORS: player stat
+ _("Luck"),
+ // TRANSLATORS: player stat
+ _("Luck %s")));
}
const std::vector<BasicStat> &StatDb::getExtraStats()