diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-10 13:38:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-10 13:38:15 +0300 |
commit | 3d2779c31490e4ac32bf72380703b9785b4e00be (patch) | |
tree | 5e031ea09c985af905973899fab78049d08475e3 /src/resources/beinginfo.cpp | |
parent | 44f9d02a86b4d2457965774f9dd6be9ce069d6ce (diff) | |
download | plus-3d2779c31490e4ac32bf72380703b9785b4e00be.tar.gz plus-3d2779c31490e4ac32bf72380703b9785b4e00be.tar.bz2 plus-3d2779c31490e4ac32bf72380703b9785b4e00be.tar.xz plus-3d2779c31490e4ac32bf72380703b9785b4e00be.zip |
Add support for change text in pet menu item "Return to egg".
Diffstat (limited to 'src/resources/beinginfo.cpp')
-rw-r--r-- | src/resources/beinginfo.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index d27339483..0cd311554 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -58,6 +58,7 @@ BeingInfo::BeingInfo() : mSounds(), mAttacks(), mMenu(), + mStrings(), mBlockWalkMask(BlockMask::WALL | BlockMask::AIR | BlockMask::WATER), @@ -239,3 +240,11 @@ const std::vector<BeingMenuItem> &BeingInfo::getMenu() const { return mMenu; } + +std::string BeingInfo::getString(const int idx) const +{ + const std::map<int, std::string>::const_iterator it = mStrings.find(idx); + if (it == mStrings.end()) + return ""; + return (*it).second; +} |