summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-27 13:11:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-27 13:11:54 +0300
commit2981363fef524501a4a24a5f4c60661ebdee80fa (patch)
tree6067275efc1b7c512436725f9ff1928b63bead13
parent7c87b2ac8e01307e603bd85420f8d10724a296e6 (diff)
downloadmv-2981363fef524501a4a24a5f4c60661ebdee80fa.tar.gz
mv-2981363fef524501a4a24a5f4c60661ebdee80fa.tar.bz2
mv-2981363fef524501a4a24a5f4c60661ebdee80fa.tar.xz
mv-2981363fef524501a4a24a5f4c60661ebdee80fa.zip
Move chat command /dumpmods into actions.
-rw-r--r--src/actions/actions.cpp7
-rw-r--r--src/actions/actions.h1
-rw-r--r--src/commands.cpp7
-rw-r--r--src/commands.h5
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
-rw-r--r--src/input/pages/other.cpp6
7 files changed, 25 insertions, 11 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 9f3259c09..22dd4834b 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -986,4 +986,11 @@ impHandler0(dumpGL)
}
#endif
+impHandler(dumpMods)
+{
+ std::string str = "enabled mods: " + serverConfig.getValue("mods", "");
+ outStringNormal(event.tab, str, str);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index 4aaa8b199..7a8217570 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -77,6 +77,7 @@ namespace Actions
decHandler(dumpTests);
decHandler(dumpOGL);
decHandler(dumpGL);
+ decHandler(dumpMods);
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index 02697c7ab..b534c8616 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -413,13 +413,6 @@ impHandler0(testsdlfont)
return true;
}
-impHandler(dumpMods)
-{
- std::string str = "enabled mods: " + serverConfig.getValue("mods", "");
- outStringNormal(event.tab, str, str);
- return true;
-}
-
impHandler0(debugSpawn)
{
int cnt = atoi(event.args.c_str());
diff --git a/src/commands.h b/src/commands.h
index 6c209f4a4..cf2491476 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -54,7 +54,6 @@ namespace Commands
decHandler(hack);
decHandler(url);
decHandler(open);
- decHandler(dumpMods);
decHandler(execute);
decHandler(testsdlfont);
decHandler(enableHighlight);
@@ -78,8 +77,7 @@ namespace Commands
enum
{
- COMMAND_DUMPMODS = 0,
- COMMAND_URL,
+ COMMAND_URL = 0,
COMMAND_OPEN,
COMMAND_EXECUTE,
COMMAND_TESTSDLFONT,
@@ -104,7 +102,6 @@ enum
static const CommandInfo commands[] =
{
- {"dumpmods", &Commands::dumpMods, -1, false},
{"url", &Commands::url, -1, true},
{"open", &Commands::open, -1, true},
{"execute", &Commands::execute, -1, true},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index 928b1d5b9..6758492b9 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -403,6 +403,7 @@ namespace InputAction
DUMP_TESTS,
DUMP_OGL,
DUMP_GL,
+ DUMP_MODS,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index eb430ddfa..5e3260584 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3396,6 +3396,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"dumpgl",
+ false},
+ {"keyDumpMods",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::dumpMods,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "dumpMods",
false}
};
diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp
index 4ade43d61..06ce2c348 100644
--- a/src/input/pages/other.cpp
+++ b/src/input/pages/other.cpp
@@ -311,6 +311,12 @@ SetupActionData setupActionDataOther[] =
},
{
// TRANSLATORS: input action name
+ N_("Print enabled mods in chat"),
+ InputAction::DUMP_MODS,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
N_("Dump environments into log"),
InputAction::DUMP_ENVIRONMENT,
"",