summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-26 20:53:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-26 20:53:04 +0300
commit67ecfd5dc5ac6b45e42f6a47263f494fa17bc46d (patch)
tree912d2741d258a32f966d5cbb984a5865a5492783 /src
parenta4077c474c370275442982965bb174b2e1e59422 (diff)
downloadplus-67ecfd5dc5ac6b45e42f6a47263f494fa17bc46d.tar.gz
plus-67ecfd5dc5ac6b45e42f6a47263f494fa17bc46d.tar.bz2
plus-67ecfd5dc5ac6b45e42f6a47263f494fa17bc46d.tar.xz
plus-67ecfd5dc5ac6b45e42f6a47263f494fa17bc46d.zip
Move chat command /dirs into actions.
Diffstat (limited to 'src')
-rw-r--r--src/actions/actions.cpp16
-rw-r--r--src/actions/actions.h1
-rw-r--r--src/commands.cpp16
-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, 34 insertions, 20 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index a46e37347..65f6e366c 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -702,4 +702,20 @@ impHandler(undress)
return true;
}
+impHandler0(dirs)
+{
+ if (!debugChatTab)
+ return false;
+
+ debugChatTab->chatLog("config directory: "
+ + settings.configDir);
+ debugChatTab->chatLog("logs directory: "
+ + settings.localDataDir);
+ debugChatTab->chatLog("screenshots directory: "
+ + settings.screenshotDir);
+ debugChatTab->chatLog("temp directory: "
+ + settings.tempDir);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index 4b586b169..f80c4f8e6 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -66,6 +66,7 @@ namespace Actions
decHandler(cacheInfo);
decHandler(disconnect);
decHandler(undress);
+ decHandler(dirs);
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index 3c3b1dbe4..acb240b28 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -157,22 +157,6 @@ impHandler(hack)
return true;
}
-impHandler0(dirs)
-{
- if (!localPlayer || !debugChatTab)
- return false;
-
- debugChatTab->chatLog("config directory: "
- + settings.configDir);
- debugChatTab->chatLog("logs directory: "
- + settings.localDataDir);
- debugChatTab->chatLog("screenshots directory: "
- + settings.screenshotDir);
- debugChatTab->chatLog("temp directory: "
- + settings.tempDir);
- return true;
-}
-
impHandler(info)
{
if (!event.tab || !localPlayer || tmwServerVersion > 0)
diff --git a/src/commands.h b/src/commands.h
index 5dde98d8f..d5c7b2e35 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -52,7 +52,6 @@ struct CommandInfo final
namespace Commands
{
decHandler(hack);
- decHandler(dirs);
decHandler(info);
decHandler(wait);
decHandler(uptime);
@@ -96,8 +95,7 @@ namespace Commands
enum
{
- COMMAND_DIRS = 0,
- COMMAND_INFO,
+ COMMAND_INFO = 0,
COMMAND_WAIT,
COMMAND_UPTIME,
COMMAND_ADDPRIORITYATTACK,
@@ -141,7 +139,6 @@ enum
static const CommandInfo commands[] =
{
- {"dirs", &Commands::dirs, -1, false},
{"info", &Commands::info, -1, false},
{"wait", &Commands::wait, -1, true},
{"uptime", &Commands::uptime, -1, false},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index 67ed7a8a0..e57deb0bc 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -385,6 +385,7 @@ namespace InputAction
CACHE_INFO,
DISCONNECT,
UNDRESS,
+ DIRS,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 7fdda0480..10dbcf90f 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3234,6 +3234,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"undress",
+ true},
+ {"keyDirs",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::dirs,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "dirs",
false}
};
diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp
index 5d9aca31e..f730db629 100644
--- a/src/input/pages/other.cpp
+++ b/src/input/pages/other.cpp
@@ -268,6 +268,12 @@ SetupActionData setupActionDataOther[] =
"",
},
{
+ // TRANSLATORS: input action name
+ N_("Print configured directories in chat"),
+ InputAction::DIRS,
+ "",
+ },
+ {
"",
InputAction::NO_VALUE,
""