diff options
-rw-r--r-- | src/actions/commands.cpp | 6 | ||||
-rw-r--r-- | src/actions/commands.h | 1 | ||||
-rw-r--r-- | src/commands.cpp | 6 | ||||
-rw-r--r-- | src/commands.h | 5 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 11 |
6 files changed, 19 insertions, 11 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index ee04acc65..fb4577719 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -674,4 +674,10 @@ impHandler(talkPet) return true; } +impHandler(gm) +{ + Net::getChatHandler()->talk("@wgm " + event.args, GENERAL_CHANNEL); + return true; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index eb9ab4575..06e288d7a 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -68,6 +68,7 @@ namespace Actions decHandler(testParticle); decHandler(talkRaw); decHandler(talkPet); + decHandler(gm); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index 1e859888f..4839899fb 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -106,12 +106,6 @@ impHandler(hack) return true; } -impHandler(gm) -{ - Net::getChatHandler()->talk("@wgm " + event.args, GENERAL_CHANNEL); - return true; -} - static int uploadUpdate(void *ptr, DownloadStatus::Type status, size_t total A_UNUSED, diff --git a/src/commands.h b/src/commands.h index 553b97ba4..caace74f4 100644 --- a/src/commands.h +++ b/src/commands.h @@ -52,7 +52,6 @@ struct CommandInfo final namespace Commands { decHandler(hack); - decHandler(gm); decHandler(debugSpawn); void replaceVars(std::string &str); @@ -60,15 +59,13 @@ namespace Commands enum { - COMMAND_GM = 0, - COMMAND_HACK, + COMMAND_HACK = 0, COMMAND_DEBUGSPAWN, END_COMMANDS }; static const CommandInfo commands[] = { - {"gm", &Commands::gm, -1, true}, {"hack", &Commands::hack, -1, true}, {"debugSpawn", &Commands::debugSpawn, -1, true} }; diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 93a3a48a7..aa4fd8c6e 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -421,6 +421,7 @@ namespace InputAction UPLOAD_CONFIG, UPLOAD_SERVER_CONFIG, UPLOAD_LOG, + GM, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index aa9432b06..27d47a707 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3566,7 +3566,16 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "uploadlog", - false} + false}, + {"keyGm", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::gm, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "gm", + true} }; #endif // INPUT_INPUTACTIONMAP_H |