summaryrefslogtreecommitdiff
path: root/src/gamemodifiers.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-22 00:24:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-22 00:24:58 +0300
commit57e10676912d5506ff3cab9edbb77335828d597c (patch)
tree634144b0d290403c2a157148bab2b79284da50cf /src/gamemodifiers.cpp
parent90bfc776dc4975c523c4c35fb0778cd9b77dc164 (diff)
downloadManaVerse-57e10676912d5506ff3cab9edbb77335828d597c.tar.gz
ManaVerse-57e10676912d5506ff3cab9edbb77335828d597c.tar.bz2
ManaVerse-57e10676912d5506ff3cab9edbb77335828d597c.tar.xz
ManaVerse-57e10676912d5506ff3cab9edbb77335828d597c.zip
move "change imitation mode" option into gamemodifiers.
Diffstat (limited to 'src/gamemodifiers.cpp')
-rw-r--r--src/gamemodifiers.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp
index 5ce9dd63b..bb1907a37 100644
--- a/src/gamemodifiers.cpp
+++ b/src/gamemodifiers.cpp
@@ -46,6 +46,7 @@ GameModifiers::GameModifiers()
settings.pickUpType = config.getIntValue("pickUpType");
settings.magicAttackType = config.getIntValue("magicAttackType");
settings.pvpAttackType = config.getIntValue("pvpAttackType");
+ settings.imitationMode = config.getIntValue("imitationMode");
}
GameModifiers::~GameModifiers()
@@ -410,3 +411,27 @@ std::string GameModifiers::getPvpAttackTypeString()
return gettext(getVarItem(&pvpAttackTypeStrings[0],
settings.pvpAttackType, pvpAttackTypeSize));
}
+
+const unsigned imitationModeSize = 2;
+
+void GameModifiers::changeImitationMode(const bool forward)
+{
+ changeMode(&settings.imitationMode, imitationModeSize, "imitationMode",
+ &GameModifiers::getImitationModeString, 0, true, forward);
+}
+
+static const char *const imitationModeStrings[] =
+{
+ // TRANSLATORS: imitation type in status bar
+ N_("(D) default imitation"),
+ // TRANSLATORS: imitation type in status bar
+ N_("(O) outfits imitation"),
+ // TRANSLATORS: imitation type in status bar
+ N_("(?) imitation")
+};
+
+std::string GameModifiers::getImitationModeString()
+{
+ return gettext(getVarItem(&imitationModeStrings[0],
+ settings.imitationMode, imitationModeSize));
+}