diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-24 20:40:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-24 20:40:00 +0300 |
commit | 4b5a38945c47d492fe8e4581b2d92956a689612e (patch) | |
tree | c55f181245e4c675fe2d8c78478bc2dce54d844e /src | |
parent | 1ceb3b90a9a00cae73cecb2b81ca3b6bd043f816 (diff) | |
download | manaverse-4b5a38945c47d492fe8e4581b2d92956a689612e.tar.gz manaverse-4b5a38945c47d492fe8e4581b2d92956a689612e.tar.bz2 manaverse-4b5a38945c47d492fe8e4581b2d92956a689612e.tar.xz manaverse-4b5a38945c47d492fe8e4581b2d92956a689612e.zip |
Move chat command /neutral 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 c63e8a439..aba86a87f 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -198,4 +198,11 @@ impHandler(chatDisregard) return true; } +impHandler(chatNeutral) +{ + // TRANSLATORS: neutral command + changeRelation(event.args, PlayerRelation::NEUTRAL, _("neutral"), event.tab); + return true; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index 356b0d7e2..32a8155c7 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -32,6 +32,7 @@ namespace Actions decHandler(chatUnignore); decHandler(chatFriend); decHandler(chatDisregard); + decHandler(chatNeutral); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index b03979eba..7105215c3 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -384,13 +384,6 @@ impHandler0(present) return false; } -impHandler(neutral) -{ - // TRANSLATORS: neutral command - changeRelation(event.args, PlayerRelation::NEUTRAL, _("neutral"), event.tab); - return true; -} - impHandler(blackList) { // TRANSLATORS: blacklist command diff --git a/src/commands.h b/src/commands.h index 668a8d1d9..29ffcf402 100644 --- a/src/commands.h +++ b/src/commands.h @@ -59,7 +59,6 @@ namespace Commands decHandler(me); decHandler(toggle); decHandler(present); - decHandler(neutral); decHandler(blackList); decHandler(enemy); decHandler(erase); @@ -130,8 +129,7 @@ namespace Commands enum { - COMMAND_NEUTRAL = 0, - COMMAND_BLACKLIST, + COMMAND_BLACKLIST = 0, COMMAND_ENEMY, COMMAND_ERASE, COMMAND_CLEANGRAPHICS, @@ -209,7 +207,6 @@ enum static const CommandInfo commands[] = { - {"neutral", &Commands::neutral, -1, true}, {"blacklist", &Commands::blackList, -1, true}, {"enemy", &Commands::enemy, -1, true}, {"erase", &Commands::erase, -1, true}, diff --git a/src/input/inputaction.h b/src/input/inputaction.h index eb6e8c881..74ac06c13 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -354,6 +354,7 @@ namespace InputAction UNIGNORE, FRIEND, DISREGARD, + NEUTRAL, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index a8e27d04f..4ee1113e6 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -2955,6 +2955,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "disregard", + true}, + {"keyNeutral", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::chatNeutral, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "neutral", true} }; |