diff options
Diffstat (limited to 'src/progs/manaverse/actions/commands.cpp')
-rw-r--r-- | src/progs/manaverse/actions/commands.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/progs/manaverse/actions/commands.cpp b/src/progs/manaverse/actions/commands.cpp index 9a622b627..668c54b80 100644 --- a/src/progs/manaverse/actions/commands.cpp +++ b/src/progs/manaverse/actions/commands.cpp @@ -58,6 +58,7 @@ #include "input/inputactionoperators.h" #include "listeners/inputactionreplaylistener.h" +#include "listeners/inputactionreplayconfirmlistener.h" #include "net/adminhandler.h" #include "net/chathandler.h" @@ -966,7 +967,22 @@ impHandler(setHomunculusName) impHandler0(fireHomunculus) { - if (homunculusHandler != nullptr) + const HomunculusInfo *const info = PlayerInfo::getHomunculus(); + if (info == nullptr) + return false; + + const std::string &args = event.args; + if (args.empty()) + { + inputActionReplayConfirmListener.openDialog( + // TRANSLATORS: dialog title + _("Really?"), + // TRANSLATORS: dialog question + _("Really kill your homunculous? This is irreversible!"), + InputAction::HOMUNCULUS_FIRE); + return true; + } + else if (args == "yes" && homunculusHandler != nullptr) { homunculusHandler->fire(); return true; |