diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-26 15:59:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-26 15:59:27 +0300 |
commit | 662ea582cd57827475062fb6b728da6c21c14181 (patch) | |
tree | 1dc38343871d3e36d09a16ee2d85d95ae81da3e0 | |
parent | ffe1b11e981112a662669358863805fabe14e94c (diff) | |
download | mv-662ea582cd57827475062fb6b728da6c21c14181.tar.gz mv-662ea582cd57827475062fb6b728da6c21c14181.tar.bz2 mv-662ea582cd57827475062fb6b728da6c21c14181.tar.xz mv-662ea582cd57827475062fb6b728da6c21c14181.zip |
Move chat command /pricesave into actions.
-rw-r--r-- | src/actions/actions.cpp | 10 | ||||
-rw-r--r-- | src/actions/actions.h | 1 | ||||
-rw-r--r-- | src/commands.cpp | 10 | ||||
-rw-r--r-- | src/commands.h | 5 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 9 | ||||
-rw-r--r-- | src/input/pages/other.cpp | 6 |
7 files changed, 28 insertions, 14 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 916bde3c2..97c792470 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -625,4 +625,14 @@ impHandler0(priceLoad) return false; } +impHandler0(priceSave) +{ + if (shopWindow) + { + shopWindow->saveList(); + return true; + } + return false; +} + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index 5cd21a9d8..4e0155556 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -62,6 +62,7 @@ namespace Actions decHandler(attackHuman); decHandler(trade); decHandler(priceLoad); + decHandler(priceSave); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index dded364ae..f70564822 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -157,16 +157,6 @@ impHandler(hack) return true; } -impHandler0(priceSave) -{ - if (shopWindow) - { - shopWindow->saveList(); - return true; - } - return false; -} - impHandler0(disconnect) { Net::getGameHandler()->disconnect2(); diff --git a/src/commands.h b/src/commands.h index dd60778e8..c658a229f 100644 --- a/src/commands.h +++ b/src/commands.h @@ -52,7 +52,6 @@ struct CommandInfo final namespace Commands { decHandler(hack); - decHandler(priceSave); decHandler(disconnect); decHandler(undress); decHandler(attack); @@ -101,8 +100,7 @@ namespace Commands enum { - COMMAND_PRICESAVE = 0, - COMMAND_CACHEINFO, + COMMAND_CACHEINFO = 0, COMMAND_DISCONNECT, COMMAND_UNDRESS, COMMAND_ATTACK, @@ -151,7 +149,6 @@ enum static const CommandInfo commands[] = { - {"pricesave", &Commands::priceSave, -1, false}, {"cacheinfo", &Commands::cacheInfo, -1, false}, {"disconnect", &Commands::disconnect, -1, false}, {"undress", &Commands::undress, -1, true}, diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 296ef17fa..280a16970 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -381,6 +381,7 @@ namespace InputAction SEND_MAIL, TRADE, PRICE_LOAD, + PRICE_SAVE, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index ab1cd04e2..fd0d573d5 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3198,6 +3198,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "priceload", + false}, + {"keyPriceSave", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::priceSave, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "pricesave", false} }; diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp index 57b0b68b0..786a1974d 100644 --- a/src/input/pages/other.cpp +++ b/src/input/pages/other.cpp @@ -244,6 +244,12 @@ SetupActionData setupActionDataOther[] = "", }, { + // TRANSLATORS: input action name + N_("Save shop items list to disk"), + InputAction::PRICE_SAVE, + "", + }, + { "", InputAction::NO_VALUE, "" |