summaryrefslogtreecommitdiff
path: root/src/gui/popups/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-01 23:23:26 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-01 23:23:26 +0300
commit163c2b925053dadf7b431b6fc9f208d51f1dde4e (patch)
treea4873b8959c9fa29ebbc08782776d27b1aa47159 /src/gui/popups/popupmenu.cpp
parentd7069a3abc8da077eb7aa2c23e5f7e37f6f3ee97 (diff)
downloadmv-163c2b925053dadf7b431b6fc9f208d51f1dde4e.tar.gz
mv-163c2b925053dadf7b431b6fc9f208d51f1dde4e.tar.bz2
mv-163c2b925053dadf7b431b6fc9f208d51f1dde4e.tar.xz
mv-163c2b925053dadf7b431b6fc9f208d51f1dde4e.zip
Add to context menu action for rename homunculus.
Diffstat (limited to 'src/gui/popups/popupmenu.cpp')
-rw-r--r--src/gui/popups/popupmenu.cpp37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 37c7ee2a0..c6ed85423 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -31,6 +31,9 @@
#include "being/playerinfo.h"
#include "being/playerrelation.h"
#include "being/playerrelations.h"
+#ifdef EATHENA_SUPPORT
+#include "being/homunculusinfo.h"
+#endif
#include "const/spells.h"
@@ -343,20 +346,30 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
break;
case ActorType::Homunculus:
- // TRANSLATORS: popup menu item
- // TRANSLATORS: Mercenary move to master
- mBrowserBox->addRow("homunculus to master", _("Move to master"));
- // TRANSLATORS: popup menu item
- // TRANSLATORS: feed homunculus
- mBrowserBox->addRow("homunculus feed", _("Feed"));
+ {
+ const HomunculusInfo *const info = PlayerInfo::getHomunculus();
+ if (info)
+ {
+ mBrowserBox->addRow("homunculus to master",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: Mercenary move to master
+ _("Move to master"));
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: feed homunculus
+ mBrowserBox->addRow("homunculus feed", _("Feed"));
+ mBrowserBox->addRow("##3---");
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: pet rename item
+ mBrowserBox->addRow("/sethomunname", _("Rename"));
+ mBrowserBox->addRow("##3---");
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: delete homunculus
+ mBrowserBox->addRow("homunculus delete", _("Kill"));
+ mBrowserBox->addRow("##3---");
+ }
addGmCommands();
- mBrowserBox->addRow("##3---");
- // TRANSLATORS: popup menu item
- // TRANSLATORS: delete homunculus
- mBrowserBox->addRow("homunculus delete", _("Kill"));
- mBrowserBox->addRow("##3---");
break;
-
+ }
case ActorType::Pet:
if (being->getOwner() == localPlayer)
{