summaryrefslogtreecommitdiff
path: root/src/gamemodifiers.cpp
diff options
context:
space:
mode:
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));
+}