summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-26 15:41:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-26 15:41:52 +0300
commitffe1b11e981112a662669358863805fabe14e94c (patch)
tree8f63c2127f123676cdd28491f33060f7eca84e0d /src
parentb44ae759ff5a848b7c6d15dc80bba4e7a6948575 (diff)
downloadmanaplus-ffe1b11e981112a662669358863805fabe14e94c.tar.gz
manaplus-ffe1b11e981112a662669358863805fabe14e94c.tar.bz2
manaplus-ffe1b11e981112a662669358863805fabe14e94c.tar.xz
manaplus-ffe1b11e981112a662669358863805fabe14e94c.zip
Move chat command /priceload into actions.
Diffstat (limited to 'src')
-rw-r--r--src/actions/actions.cpp10
-rw-r--r--src/actions/actions.h1
-rw-r--r--src/commands.cpp10
-rw-r--r--src/commands.h5
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h11
-rw-r--r--src/input/pages/other.cpp6
7 files changed, 29 insertions, 15 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 9d1279e3f..916bde3c2 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -615,4 +615,14 @@ impHandler(trade)
return true;
}
+impHandler0(priceLoad)
+{
+ if (shopWindow)
+ {
+ shopWindow->loadList();
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index ea9faadab..5cd21a9d8 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -61,6 +61,7 @@ namespace Actions
decHandler(cleanFonts);
decHandler(attackHuman);
decHandler(trade);
+ decHandler(priceLoad);
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index 52a9dbb2a..dded364ae 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -157,16 +157,6 @@ impHandler(hack)
return true;
}
-impHandler0(priceLoad)
-{
- if (shopWindow)
- {
- shopWindow->loadList();
- return true;
- }
- return false;
-}
-
impHandler0(priceSave)
{
if (shopWindow)
diff --git a/src/commands.h b/src/commands.h
index 58f3bf176..dd60778e8 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -52,7 +52,6 @@ struct CommandInfo final
namespace Commands
{
decHandler(hack);
- decHandler(priceLoad);
decHandler(priceSave);
decHandler(disconnect);
decHandler(undress);
@@ -102,8 +101,7 @@ namespace Commands
enum
{
- COMMAND_PRICELOAD = 0,
- COMMAND_PRICESAVE,
+ COMMAND_PRICESAVE = 0,
COMMAND_CACHEINFO,
COMMAND_DISCONNECT,
COMMAND_UNDRESS,
@@ -153,7 +151,6 @@ enum
static const CommandInfo commands[] =
{
- {"priceload", &Commands::priceLoad, -1, false},
{"pricesave", &Commands::priceSave, -1, false},
{"cacheinfo", &Commands::cacheInfo, -1, false},
{"disconnect", &Commands::disconnect, -1, false},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index d278e9799..296ef17fa 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -380,6 +380,7 @@ namespace InputAction
IMITATION,
SEND_MAIL,
TRADE,
+ PRICE_LOAD,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 58688fc27..ab1cd04e2 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3189,7 +3189,16 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"trade",
- true}
+ true},
+ {"keyPriceLoad",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::priceLoad,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "priceload",
+ false}
};
#endif // INPUT_INPUTACTIONMAP_H
diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp
index c7db9c05d..57b0b68b0 100644
--- a/src/input/pages/other.cpp
+++ b/src/input/pages/other.cpp
@@ -238,6 +238,12 @@ SetupActionData setupActionDataOther[] =
"",
},
{
+ // TRANSLATORS: input action name
+ N_("Load shop items list from disk"),
+ InputAction::PRICE_LOAD,
+ "",
+ },
+ {
"",
InputAction::NO_VALUE,
""