summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions/commands.cpp9
-rw-r--r--src/actions/commands.h1
-rw-r--r--src/dyetool/actions/commands.cpp1
-rw-r--r--src/enums/input/inputaction.h1
-rw-r--r--src/gui/popups/popupmenu.cpp6
-rw-r--r--src/input/inputactionmap.h6
6 files changed, 19 insertions, 5 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 08c1fcbba..81f40697b 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -1447,6 +1447,15 @@ impHandler(commandGotoPc)
return true;
}
+impHandler(commandRecallPc)
+{
+ const std::string args = event.args;
+ if (args.empty())
+ return false;
+ adminHandler->recallName(args);
+ return true;
+}
+
impHandler(commandKiller)
{
adminHandler->killer(event.args);
diff --git a/src/actions/commands.h b/src/actions/commands.h
index ed4deb9f5..24860b8f2 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -124,6 +124,7 @@ namespace Actions
decHandler(commandRandomWarp);
decHandler(commandGotoNpc);
decHandler(commandGotoPc);
+ decHandler(commandRecallPc);
decHandler(commandKiller);
decHandler(commandKillable);
decHandler(commandHeal);
diff --git a/src/dyetool/actions/commands.cpp b/src/dyetool/actions/commands.cpp
index 522ead2f2..e458d494e 100644
--- a/src/dyetool/actions/commands.cpp
+++ b/src/dyetool/actions/commands.cpp
@@ -124,6 +124,7 @@ impHandlerVoid(commandLoadPosition)
impHandlerVoid(commandRandomWarp)
impHandlerVoid(commandGotoNpc)
impHandlerVoid(commandGotoPc)
+impHandlerVoid(commandRecallPc)
impHandlerVoid(commandKiller)
impHandlerVoid(commandKillable)
impHandlerVoid(commandHeal)
diff --git a/src/enums/input/inputaction.h b/src/enums/input/inputaction.h
index 094102f2c..21749b296 100644
--- a/src/enums/input/inputaction.h
+++ b/src/enums/input/inputaction.h
@@ -698,6 +698,7 @@ enumStart(InputAction)
CLEAR_OUTFIT,
CLIPBOARD_COPY,
COMMAND_GOTO_PC,
+ COMMAND_RECALL_PC,
TOTAL
}
enumEnd(InputAction);
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 6b3aaf68a..da729206c 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -1253,10 +1253,6 @@ void PopupMenu::handleLink(const std::string &link,
if (mTextField)
mTextField->handlePaste();
}
- else if (link == "recall" && !mName.empty())
- {
- adminHandler->recallName(mName);
- }
else if (link == "ipcheck" && !mName.empty())
{
adminHandler->ipcheckName(mName);
@@ -2811,7 +2807,7 @@ void PopupMenu::showPlayerGMCommands(const std::string &name)
mBrowserBox->addRow("/gotopc 'NAME'", _("Goto"));
// TRANSLATORS: popup menu item
// TRANSLATORS: recall player to current position
- mBrowserBox->addRow("recall", _("Recall"));
+ mBrowserBox->addRow("/recallpc 'NAME'", _("Recall"));
// TRANSLATORS: popup menu item
// TRANSLATORS: revive player
mBrowserBox->addRow("/alive 'NAME'", _("Revive"));
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index e42e659d8..203d3067d 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -5678,6 +5678,12 @@ static const InputActionData inputActionData
"goto|gotopc",
UseArgs_true,
Protected_true},
+ {"keyCommandRecallPc",
+ defaultAction(&Actions::commandRecallPc),
+ InputCondition::INGAME,
+ "recall|recallpc",
+ UseArgs_true,
+ Protected_true},
};
#undef defaultAction