From 57e10676912d5506ff3cab9edbb77335828d597c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 22 Jul 2014 00:24:58 +0300 Subject: move "change imitation mode" option into gamemodifiers. --- src/being/localplayer.cpp | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) (limited to 'src/being/localplayer.cpp') diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index baeb75146..d7580b552 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -115,7 +115,6 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) : mGMLevel(0), mCrazyMoveState(0), mMoveState(0), - mImitationMode(config.getIntValue("imitationMode")), mLastTargetX(0), mLastTargetY(0), mHomes(), @@ -1285,30 +1284,6 @@ std::string LocalPlayer::getMapDrawTypeString() viewport->getMapDrawType(), debugPathSize)); } -const unsigned imitationModeSize = 2; - -void LocalPlayer::changeImitationMode(const bool forward) -{ - changeMode(&mImitationMode, imitationModeSize, "imitationMode", - &LocalPlayer::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 LocalPlayer::getImitationModeString() -{ - return gettext(getVarItem(&imitationModeStrings[0], - mImitationMode, imitationModeSize)); -} - const unsigned awayModeSize = 2; void LocalPlayer::changeAwayMode() @@ -3113,7 +3088,7 @@ void LocalPlayer::imitateOutfit(const Being *const player, if (!player) return; - if (mImitationMode == 1 && !mPlayerImitated.empty() + if (settings.imitationMode == 1 && !mPlayerImitated.empty() && player->getName() == mPlayerImitated) { if (sprite < 0 || sprite >= player->getNumberOfLayers()) @@ -3415,7 +3390,7 @@ void LocalPlayer::resetYellowBar() } if (mMap) mMap->setDrawLayersFlags(0); - mImitationMode = config.resetIntValue("imitationMode"); + settings.imitationMode = config.resetIntValue("imitationMode"); mDisableGameModifiers = config.resetBoolValue("disableGameModifiers"); UpdateStatusListener::distributeEvent(); -- cgit v1.2.3-70-g09d2