summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actions/commands.cpp6
-rw-r--r--src/actions/commands.h1
-rw-r--r--src/commands.cpp6
-rw-r--r--src/commands.h5
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
6 files changed, 18 insertions, 10 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 80e7493da..018cca54a 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -524,4 +524,10 @@ impHandler(addIgnoreAttack)
return true;
}
+impHandler(setDrop)
+{
+ GameModifiers::setQuickDropCounter(atoi(event.args.c_str()));
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 8b02a7322..b171e49e2 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -55,6 +55,7 @@ namespace Actions
decHandler(addAttack);
decHandler(removeAttack);
decHandler(addIgnoreAttack);
+ decHandler(setDrop);
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index 608be620f..eb3e44e96 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -219,12 +219,6 @@ impHandler(dumpTests)
return true;
}
-impHandler(setDrop)
-{
- GameModifiers::setQuickDropCounter(atoi(event.args.c_str()));
- return true;
-}
-
impHandler0(error)
{
const int *const ptr = nullptr;
diff --git a/src/commands.h b/src/commands.h
index 6b7ec8401..d91b7345a 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -52,7 +52,6 @@ struct CommandInfo final
namespace Commands
{
decHandler(hack);
- decHandler(setDrop);
decHandler(error) __attribute__ ((noreturn));
decHandler(url);
decHandler(open);
@@ -85,8 +84,7 @@ namespace Commands
enum
{
- COMMAND_SETDROP = 0,
- COMMAND_ERROR,
+ COMMAND_ERROR = 0,
COMMAND_DUMPG,
COMMAND_DUMPE,
COMMAND_DUMPT,
@@ -118,7 +116,6 @@ enum
static const CommandInfo commands[] =
{
- {"setdrop", &Commands::setDrop, -1, true},
{"error", &Commands::error, -1, false},
{"dumpg", &Commands::dumpGraphics, -1, false},
{"dumpe", &Commands::dumpEnvironment, -1, false},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index cb79d84a2..d81a66352 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -396,6 +396,7 @@ namespace InputAction
DUMP,
SERVER_IGNORE_ALL,
SERVER_UNIGNORE_ALL,
+ SET_DROP,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index b0976916c..8f7ec4b73 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3333,6 +3333,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"serverunignoreall",
+ false},
+ {"keySetDrop",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::setDrop,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "setdrop",
false}
};