summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-22 01:41:19 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-22 01:41:19 +0300
commitd569dc78b5b50c0e6cbe84e48164e5774fd36de7 (patch)
treeabe4bf6e0822fe0d1ee2149f88cd0e6e4452c396 /src/being
parentaaa50f7ef8de21ea1f32065beb15a7a58faf28a5 (diff)
downloadmv-d569dc78b5b50c0e6cbe84e48164e5774fd36de7.tar.gz
mv-d569dc78b5b50c0e6cbe84e48164e5774fd36de7.tar.bz2
mv-d569dc78b5b50c0e6cbe84e48164e5774fd36de7.tar.xz
mv-d569dc78b5b50c0e6cbe84e48164e5774fd36de7.zip
move "change game modifiers" option into gamemodifiers.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp34
-rw-r--r--src/being/localplayer.h8
2 files changed, 2 insertions, 40 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index d7580b552..54dd93ff9 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -160,7 +160,6 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) :
mEnableAdvert(config.getBoolValue("enableAdvert")),
mTradebot(config.getBoolValue("tradebot")),
mTargetOnlyReachable(config.getBoolValue("targetOnlyReachable")),
- mDisableGameModifiers(config.getBoolValue("disableGameModifiers")),
mIsServerBuggy(serverConfig.getValueBool("enableBuggyServers", true)),
mSyncPlayerMove(config.getBoolValue("syncPlayerMove")),
mDrawPath(config.getBoolValue("drawPath")),
@@ -1357,36 +1356,6 @@ std::string LocalPlayer::getCameraModeString()
viewport->getCameraMode(), cameraModeSize));
}
-const unsigned gameModifiersSize = 2;
-
-void LocalPlayer::switchGameModifiers()
-{
- mDisableGameModifiers = !mDisableGameModifiers;
- config.setValue("disableGameModifiers", mDisableGameModifiers);
- UpdateStatusListener::distributeEvent();
-
- const std::string str = getGameModifiersString();
- if (str.size() > 4)
- debugMsg(str.substr(4));
-}
-
-static const char *const gameModifiersStrings[] =
-{
- // TRANSLATORS: game modifiers state in status bar
- N_("Game modifiers are enabled"),
- // TRANSLATORS: game modifiers state in status bar
- N_("Game modifiers are disabled"),
- // TRANSLATORS: game modifiers state in status bar
- N_("Game modifiers are unknown")
-};
-
-std::string LocalPlayer::getGameModifiersString()
-{
- return gettext(getVarItem(&gameModifiersStrings[0],
- mDisableGameModifiers, gameModifiersSize));
-}
-
-
void LocalPlayer::changeEquipmentBeforeAttack(const Being *const target) const
{
if (settings.attackWeaponType == 1 || !target || !PlayerInfo::getInventory())
@@ -3391,7 +3360,8 @@ void LocalPlayer::resetYellowBar()
if (mMap)
mMap->setDrawLayersFlags(0);
settings.imitationMode = config.resetIntValue("imitationMode");
- mDisableGameModifiers = config.resetBoolValue("disableGameModifiers");
+ settings.disableGameModifiers = config.resetBoolValue(
+ "disableGameModifiers");
UpdateStatusListener::distributeEvent();
}
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index b7b071c46..8e32b8d14 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -198,15 +198,10 @@ class LocalPlayer final : public Being,
void setCrazyMoveState(const unsigned int n)
{ mCrazyMoveState = n; }
- int getDisableGameModifiers() const A_WARN_UNUSED
- { return mDisableGameModifiers; }
-
std::string getPingTime() const A_WARN_UNUSED;
void tryPingRequest();
- void switchGameModifiers();
-
void magicAttack() const;
void specialMove(const unsigned char direction);
@@ -403,8 +398,6 @@ class LocalPlayer final : public Being,
static std::string getCameraModeString();
- std::string getGameModifiersString();
-
int getLastAttackX() const override final
{ return mTarget ? mTarget->getTileX() : mLastAttackX; }
@@ -527,7 +520,6 @@ class LocalPlayer final : public Being,
bool mEnableAdvert;
bool mTradebot;
bool mTargetOnlyReachable;
- bool mDisableGameModifiers;
bool mIsServerBuggy;
bool mSyncPlayerMove;
bool mDrawPath;