summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-26 23:00:48 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-26 23:00:48 +0300
commit38a861c3e5d14ad3c1db04be8c65e84966758d88 (patch)
treef46d8d03923990f38d4d4c31229ab98b803d6ba6
parent27b760f3aa52b4ba9c4fd7e565343b35c1281755 (diff)
downloadmv-38a861c3e5d14ad3c1db04be8c65e84966758d88.tar.gz
mv-38a861c3e5d14ad3c1db04be8c65e84966758d88.tar.bz2
mv-38a861c3e5d14ad3c1db04be8c65e84966758d88.tar.xz
mv-38a861c3e5d14ad3c1db04be8c65e84966758d88.zip
add pet name loading from pet db.
New pet db attribute: name
-rw-r--r--src/resources/db/petdb.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp
index 631dceb60..f975c25f9 100644
--- a/src/resources/db/petdb.cpp
+++ b/src/resources/db/petdb.cpp
@@ -22,13 +22,14 @@
#include "resources/db/petdb.h"
+#include "configuration.h"
#include "logger.h"
#include "resources/beingcommon.h"
#include "resources/beinginfo.h"
+#include "utils/gettext.h"
#include "utils/dtor.h"
-#include "configuration.h"
#include "debug.h"
@@ -74,8 +75,12 @@ void PETDB::load()
BeingInfo *const currentInfo = new BeingInfo;
+ currentInfo->setName(XML::langProperty(petNode,
+ // TRANSLATORS: unknown info name
+ "name", _("pet")));
+
currentInfo->setTargetSelection(XML::getBoolProperty(petNode,
- "targetSelection", false));
+ "targetSelection", true));
BeingCommon::readBasicAttributes(currentInfo, petNode, "talk");