diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-24 17:59:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-24 17:59:08 +0300 |
commit | 1ceb3b90a9a00cae73cecb2b81ca3b6bd043f816 (patch) | |
tree | 910a3ec3ec9529908b93eb1b0de8b44304d5882d /src | |
parent | efa45459a4d79cf1adba3327f6dad02fc5aa55cd (diff) | |
download | plus-1ceb3b90a9a00cae73cecb2b81ca3b6bd043f816.tar.gz plus-1ceb3b90a9a00cae73cecb2b81ca3b6bd043f816.tar.bz2 plus-1ceb3b90a9a00cae73cecb2b81ca3b6bd043f816.tar.xz plus-1ceb3b90a9a00cae73cecb2b81ca3b6bd043f816.zip |
Move chat command /disregard 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 0c029fa54..c63e8a439 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -191,4 +191,11 @@ impHandler(chatFriend) return true; } +impHandler(chatDisregard) +{ + // TRANSLATORS: disregard command + changeRelation(event.args, PlayerRelation::DISREGARDED, _("disregarded"), event.tab); + return true; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index 6b554e5fe..356b0d7e2 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -31,6 +31,7 @@ namespace Actions decHandler(chatIgnore); decHandler(chatUnignore); decHandler(chatFriend); + decHandler(chatDisregard); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index b81ed5961..b03979eba 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -384,13 +384,6 @@ impHandler0(present) return false; } -impHandler(disregard) -{ - // TRANSLATORS: disregard command - changeRelation(event.args, PlayerRelation::DISREGARDED, _("disregarded"), event.tab); - return true; -} - impHandler(neutral) { // TRANSLATORS: neutral command diff --git a/src/commands.h b/src/commands.h index 41ee05818..668a8d1d9 100644 --- a/src/commands.h +++ b/src/commands.h @@ -59,7 +59,6 @@ namespace Commands decHandler(me); decHandler(toggle); decHandler(present); - decHandler(disregard); decHandler(neutral); decHandler(blackList); decHandler(enemy); @@ -131,8 +130,7 @@ namespace Commands enum { - COMMAND_DISREGARD = 0, - COMMAND_NEUTRAL, + COMMAND_NEUTRAL = 0, COMMAND_BLACKLIST, COMMAND_ENEMY, COMMAND_ERASE, @@ -211,7 +209,6 @@ enum static const CommandInfo commands[] = { - {"disregard", &Commands::disregard, -1, true}, {"neutral", &Commands::neutral, -1, true}, {"blacklist", &Commands::blackList, -1, true}, {"enemy", &Commands::enemy, -1, true}, diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 8abf6f65d..eb6e8c881 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -353,6 +353,7 @@ namespace InputAction IGNORE, UNIGNORE, FRIEND, + DISREGARD, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index f94af5e9e..a8e27d04f 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -2946,6 +2946,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "friend|befriend", + true}, + {"keyDisregard", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::chatDisregard, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "disregard", true} }; |