aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorred-001 <red-001@outlook.ie>2017-03-24 23:43:36 +0000
committerparamat <mat.gregory@virginmedia.com>2017-03-26 05:51:14 +0100
commite70e15134c95d37241bb6f6124105c0f1c08ab8a (patch)
tree6cafdf536c8c77e350abe7a249fa91c695c9165e /src
parent4d5177ff708c7e696eead18200e240047ff520fe (diff)
downloadminetest-e70e15134c95d37241bb6f6124105c0f1c08ab8a.tar.gz
minetest-e70e15134c95d37241bb6f6124105c0f1c08ab8a.tar.bz2
minetest-e70e15134c95d37241bb6f6124105c0f1c08ab8a.zip
Change command prefix to "." and add "help" command.
Diffstat (limited to 'src')
-rw-r--r--src/client/keys.h1
-rw-r--r--src/defaultsettings.cpp1
-rw-r--r--src/game.cpp3
-rw-r--r--src/guiKeyChangeMenu.cpp2
4 files changed, 7 insertions, 0 deletions
diff --git a/src/client/keys.h b/src/client/keys.h
index 6467c443e..25f3e44d2 100644
--- a/src/client/keys.h
+++ b/src/client/keys.h
@@ -42,6 +42,7 @@ public:
INVENTORY,
CHAT,
CMD,
+ CMD_LOCAL,
CONSOLE,
MINIMAP,
FREEMOVE,
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 396b69b3a..5b66c583a 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -72,6 +72,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("keymap_special1", "KEY_KEY_E");
settings->setDefault("keymap_chat", "KEY_KEY_T");
settings->setDefault("keymap_cmd", "/");
+ settings->setDefault("keymap_cmd_local", ".");
settings->setDefault("keymap_minimap", "KEY_F9");
settings->setDefault("keymap_console", "KEY_F10");
settings->setDefault("keymap_rangeselect", "KEY_KEY_R");
diff --git a/src/game.cpp b/src/game.cpp
index 9d52e4326..62d2405f2 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1034,6 +1034,7 @@ void KeyCache::populate()
key[KeyType::INVENTORY] = getKeySetting("keymap_inventory");
key[KeyType::CHAT] = getKeySetting("keymap_chat");
key[KeyType::CMD] = getKeySetting("keymap_cmd");
+ key[KeyType::CMD_LOCAL] = getKeySetting("keymap_cmd_local");
key[KeyType::CONSOLE] = getKeySetting("keymap_console");
key[KeyType::MINIMAP] = getKeySetting("keymap_minimap");
key[KeyType::FREEMOVE] = getKeySetting("keymap_freemove");
@@ -2449,6 +2450,8 @@ void Game::processKeyInput()
openConsole(0.2, L"");
} else if (wasKeyDown(KeyType::CMD)) {
openConsole(0.2, L"/");
+ } else if (wasKeyDown(KeyType::CMD_LOCAL)) {
+ openConsole(0.2, L".");
} else if (wasKeyDown(KeyType::CONSOLE)) {
openConsole(core::clamp(g_settings->getFloat("console_height"), 0.1f, 1.0f));
} else if (wasKeyDown(KeyType::FREEMOVE)) {
diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp
index 07137d1bc..e85ee8271 100644
--- a/src/guiKeyChangeMenu.cpp
+++ b/src/guiKeyChangeMenu.cpp
@@ -53,6 +53,7 @@ enum
GUI_ID_KEY_CINEMATIC_BUTTON,
GUI_ID_KEY_CHAT_BUTTON,
GUI_ID_KEY_CMD_BUTTON,
+ GUI_ID_KEY_CMD_LOCAL_BUTTON,
GUI_ID_KEY_CONSOLE_BUTTON,
GUI_ID_KEY_SNEAK_BUTTON,
GUI_ID_KEY_DROP_BUTTON,
@@ -408,6 +409,7 @@ void GUIKeyChangeMenu::init_keys()
this->add_key(GUI_ID_KEY_INVENTORY_BUTTON, wgettext("Inventory"), "keymap_inventory");
this->add_key(GUI_ID_KEY_CHAT_BUTTON, wgettext("Chat"), "keymap_chat");
this->add_key(GUI_ID_KEY_CMD_BUTTON, wgettext("Command"), "keymap_cmd");
+ this->add_key(GUI_ID_KEY_CMD_LOCAL_BUTTON, wgettext("Local command"), "keymap_cmd_local");
this->add_key(GUI_ID_KEY_CONSOLE_BUTTON, wgettext("Console"), "keymap_console");
this->add_key(GUI_ID_KEY_FLY_BUTTON, wgettext("Toggle fly"), "keymap_freemove");
this->add_key(GUI_ID_KEY_FAST_BUTTON, wgettext("Toggle fast"), "keymap_fastmove");