summaryrefslogtreecommitdiff
path: root/src/gamemodifiers.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-21 21:39:00 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-21 21:39:00 +0300
commiteed7ef561a9d590d507255118132676f868b1bd3 (patch)
tree586f7f394c0d7678ed615525c6129fb9d787bf04 /src/gamemodifiers.cpp
parentc41fcc1f637e76e5ff671b223ce6c151af89e7d3 (diff)
downloadmanaverse-eed7ef561a9d590d507255118132676f868b1bd3.tar.gz
manaverse-eed7ef561a9d590d507255118132676f868b1bd3.tar.bz2
manaverse-eed7ef561a9d590d507255118132676f868b1bd3.tar.xz
manaverse-eed7ef561a9d590d507255118132676f868b1bd3.zip
move "change pickup type" option into gamemodifiers.
Diffstat (limited to 'src/gamemodifiers.cpp')
-rw-r--r--src/gamemodifiers.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp
index d98332f39..3f2650659 100644
--- a/src/gamemodifiers.cpp
+++ b/src/gamemodifiers.cpp
@@ -43,6 +43,7 @@ GameModifiers::GameModifiers()
settings.attackWeaponType = config.getIntValue("attackWeaponType");
settings.attackType = config.getIntValue("attackType");
settings.quickDropCounter = config.getIntValue("quickDropCounter");
+ settings.pickUpType = config.getIntValue("pickUpType");
}
GameModifiers::~GameModifiers()
@@ -315,3 +316,37 @@ void GameModifiers::setQuickDropCounter(const int n)
config.setValue("quickDropCounter", n);
UpdateStatusListener::distributeEvent();
}
+
+const unsigned pickUpTypeSize = 7;
+
+void GameModifiers::changePickUpType(const bool forward)
+{
+ changeMode(&settings.pickUpType, pickUpTypeSize, "pickUpType",
+ &GameModifiers::getPickUpTypeString, 0, true, forward);
+}
+
+static const char *const pickUpTypeStrings[] =
+{
+ // TRANSLATORS: pickup size in status bar
+ N_("(S) small pick up 1x1 cells"),
+ // TRANSLATORS: pickup size in status bar
+ N_("(D) default pick up 2x1 cells"),
+ // TRANSLATORS: pickup size in status bar
+ N_("(F) forward pick up 2x3 cells"),
+ // TRANSLATORS: pickup size in status bar
+ N_("(3) pick up 3x3 cells"),
+ // TRANSLATORS: pickup size in status bar
+ N_("(g) go and pick up in distance 4"),
+ // TRANSLATORS: pickup size in status bar
+ N_("(G) go and pick up in distance 8"),
+ // TRANSLATORS: pickup size in status bar
+ N_("(A) go and pick up in max distance"),
+ // TRANSLATORS: pickup size in status bar
+ N_("(?) pick up")
+};
+
+std::string GameModifiers::getPickUpTypeString()
+{
+ return gettext(getVarItem(&pickUpTypeStrings[0],
+ settings.pickUpType, pickUpTypeSize));
+}