diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-24 21:38:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-24 21:38:45 +0300 |
commit | 4805bee18392b56f39be68b0d6a0384cbda0f846 (patch) | |
tree | 7ccbc3892df6665667361da56e3d3abbdd1bcc7a /src | |
parent | 9522e88dbdb425211f68e94518dcfb63dc74f306 (diff) | |
download | mv-4805bee18392b56f39be68b0d6a0384cbda0f846.tar.gz mv-4805bee18392b56f39be68b0d6a0384cbda0f846.tar.bz2 mv-4805bee18392b56f39be68b0d6a0384cbda0f846.tar.xz mv-4805bee18392b56f39be68b0d6a0384cbda0f846.zip |
Move chat command /enemy into actions.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/commands.cpp | 7 | ||||
-rw-r--r-- | src/actions/commands.h | 1 | ||||
-rw-r--r-- | src/commands.cpp | 7 | ||||
-rw-r--r-- | src/commands.h | 5 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 9 |
6 files changed, 19 insertions, 11 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 79ca62973..5c16d17cc 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -212,4 +212,11 @@ impHandler(chatBlackList) return true; } +impHandler(chatEnemy) +{ + // TRANSLATORS: enemy command + changeRelation(event.args, PlayerRelation::ENEMY2, _("enemy"), event.tab); + return true; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index 9faa40b92..306c46cb9 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -34,6 +34,7 @@ namespace Actions decHandler(chatDisregard); decHandler(chatNeutral); decHandler(chatBlackList); + decHandler(chatEnemy); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index ac674b346..031bcd0a9 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -384,13 +384,6 @@ impHandler0(present) return false; } -impHandler(enemy) -{ - // TRANSLATORS: enemy command - changeRelation(event.args, PlayerRelation::ENEMY2, _("enemy"), event.tab); - return true; -} - impHandler(erase) { if (event.args.empty()) diff --git a/src/commands.h b/src/commands.h index 8ca68ece0..a017eb2ac 100644 --- a/src/commands.h +++ b/src/commands.h @@ -59,7 +59,6 @@ namespace Commands decHandler(me); decHandler(toggle); decHandler(present); - decHandler(enemy); decHandler(erase); decHandler(quit); decHandler(showAll); @@ -128,8 +127,7 @@ namespace Commands enum { - COMMAND_ENEMY = 0, - COMMAND_ERASE, + COMMAND_ERASE = 0, COMMAND_CLEANGRAPHICS, COMMAND_CLEANFONTS, COMMAND_CREATEPARTY, @@ -205,7 +203,6 @@ enum static const CommandInfo commands[] = { - {"enemy", &Commands::enemy, -1, true}, {"erase", &Commands::erase, -1, true}, {"cleangraphics", &Commands::cleanGraphics, -1, false}, {"cleanfonts", &Commands::cleanFonts, -1, false}, diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 69027cda0..258c3c3e7 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -356,6 +356,7 @@ namespace InputAction DISREGARD, NEUTRAL, BLACKLIST, + ENEMY, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index df00c1a25..e3d17710c 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -2973,6 +2973,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "blacklist", + true}, + {"keyEnemy", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::chatEnemy, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "enemy", true} }; |