summaryrefslogtreecommitdiff
path: root/src/gamemodifiers.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-21 13:00:00 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-21 13:00:00 +0300
commitcfffcc941898c4163e1bd62b8e514d3535511666 (patch)
treeb9889c95f521b81edaec32ac8b45fe859154ca3d /src/gamemodifiers.cpp
parentb02b4ce0b656a93fbcaa927b0ba289edfec6e22c (diff)
downloadmanaverse-cfffcc941898c4163e1bd62b8e514d3535511666.tar.gz
manaverse-cfffcc941898c4163e1bd62b8e514d3535511666.tar.bz2
manaverse-cfffcc941898c4163e1bd62b8e514d3535511666.tar.xz
manaverse-cfffcc941898c4163e1bd62b8e514d3535511666.zip
move "change move to target type" option into gamemodifiers.
Diffstat (limited to 'src/gamemodifiers.cpp')
-rw-r--r--src/gamemodifiers.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp
index 4facc4cf4..3d74169ee 100644
--- a/src/gamemodifiers.cpp
+++ b/src/gamemodifiers.cpp
@@ -38,6 +38,7 @@ GameModifiers *modifiers = nullptr;
GameModifiers::GameModifiers()
{
settings.crazyMoveType = config.getIntValue("crazyMoveType");
+ settings.moveToTargetType = config.getIntValue("moveToTargetType");
}
GameModifiers::~GameModifiers()
@@ -146,3 +147,50 @@ std::string GameModifiers::getCrazyMoveTypeString()
return _("(?) crazy move");
}
}
+
+static const unsigned moveToTargetTypeSize = 13;
+
+void GameModifiers::changeMoveToTargetType(const bool forward)
+{
+ changeMode(&settings.moveToTargetType, moveToTargetTypeSize,
+ "moveToTargetType",
+ &GameModifiers::getMoveToTargetTypeString, 0, true, forward);
+}
+
+static const char *const moveToTargetTypeStrings[] =
+{
+ // TRANSLATORS: move to target type in status bar
+ N_("(0) default moves to target"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(1) moves to target in distance 1"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(2) moves to target in distance 2"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(3) moves to target in distance 3"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(4) moves to target in distance 4"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(5) moves to target in distance 5"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(6) moves to target in distance 6"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(7) moves to target in distance 7"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(8) moves to target in distance 8"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(9) moves to target in distance 9"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(A) moves to target in attack range"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(a) archer attack range"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(B) moves to target in attack range - 1"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(?) move to target")
+};
+
+std::string GameModifiers::getMoveToTargetTypeString()
+{
+ return gettext(getVarItem(&moveToTargetTypeStrings[0],
+ settings.moveToTargetType, moveToTargetTypeSize));
+}