Give a little sense for story mode on android.
At least close big door until all available challenges are completed.
This commit is contained in:
parent
8c8a0f8452
commit
a3eecaedc1
@ -70,7 +70,7 @@ void StoryModeStatus::addStatus(ChallengeStatus *cs)
|
||||
//-----------------------------------------------------------------------------
|
||||
bool StoryModeStatus::isLocked(const std::string& feature)
|
||||
{
|
||||
if (UserConfigParams::m_everything_unlocked)
|
||||
if (UserConfigParams::m_everything_unlocked > 0)
|
||||
return false;
|
||||
|
||||
return m_locked_features.find(feature)!=m_locked_features.end();
|
||||
|
@ -1032,9 +1032,10 @@ namespace UserConfigParams
|
||||
PARAM_DEFAULT(BoolUserConfigParam(false, "debug_hide_gui",
|
||||
"Whether to hide the GUI (artist debug mode)"));
|
||||
|
||||
PARAM_PREFIX BoolUserConfigParam m_everything_unlocked
|
||||
PARAM_DEFAULT( BoolUserConfigParam(false, "everything_unlocked",
|
||||
"Enable all karts and tracks") );
|
||||
PARAM_PREFIX IntUserConfigParam m_everything_unlocked
|
||||
PARAM_DEFAULT( IntUserConfigParam(0, "everything_unlocked",
|
||||
"Enable all karts and tracks: 0 = disabled, "
|
||||
"1 = everything except final race, 2 = everything") );
|
||||
|
||||
PARAM_PREFIX StringUserConfigParam m_commandline
|
||||
PARAM_DEFAULT( StringUserConfigParam("", "commandline",
|
||||
|
@ -1562,12 +1562,12 @@ int handleCmdLine(bool has_server_config, bool has_parent_process)
|
||||
|
||||
if(CommandLine::has("--unlock-all"))
|
||||
{
|
||||
UserConfigParams::m_everything_unlocked = true;
|
||||
UserConfigParams::m_everything_unlocked = 2;
|
||||
} // --unlock-all
|
||||
|
||||
if(CommandLine::has("--no-unlock-all"))
|
||||
{
|
||||
UserConfigParams::m_everything_unlocked = false;
|
||||
UserConfigParams::m_everything_unlocked = 0;
|
||||
} // --no-unlock-all
|
||||
|
||||
if(CommandLine::has("--profile-time", &n))
|
||||
|
@ -78,7 +78,7 @@ void override_default_params()
|
||||
|
||||
// Make sure that user can play every track even if there are installed
|
||||
// only few tracks and it's impossible to finish overworld challenges
|
||||
UserConfigParams::m_everything_unlocked = true;
|
||||
UserConfigParams::m_everything_unlocked = 1;
|
||||
|
||||
// Create default user istead of showing login screen to make life easier
|
||||
UserConfigParams::m_enforce_current_player = true;
|
||||
|
@ -264,7 +264,7 @@ void OverWorld::onFirePressed(Controller* who)
|
||||
#endif
|
||||
bool unlocked = enough_challenges && (PlayerManager::getCurrentPlayer()->getPoints() >= val);
|
||||
|
||||
if (UserConfigParams::m_everything_unlocked)
|
||||
if (UserConfigParams::m_everything_unlocked > 0)
|
||||
unlocked = true;
|
||||
|
||||
if (unlocked)
|
||||
|
@ -61,7 +61,7 @@ namespace Scripting
|
||||
/** Get number of challenges that were completed at any difficulty */
|
||||
int getCompletedChallengesCount()
|
||||
{
|
||||
if (UserConfigParams::m_everything_unlocked)
|
||||
if (UserConfigParams::m_everything_unlocked > 1)
|
||||
return getChallengeCount();
|
||||
|
||||
return ::Track::getCurrentTrack()->getNumOfCompletedChallenges();
|
||||
@ -86,7 +86,7 @@ namespace Scripting
|
||||
// --------------------------------------------------------------------
|
||||
bool isChallengeUnlocked(std::string* challenge_name)
|
||||
{
|
||||
if (UserConfigParams::m_everything_unlocked)
|
||||
if (UserConfigParams::m_everything_unlocked > 0)
|
||||
return true;
|
||||
|
||||
const ChallengeData* challenge =
|
||||
|
@ -486,7 +486,7 @@ void RaceGUIOverworld::drawGlobalMiniMap()
|
||||
|
||||
int state = (unlocked ? OPEN : LOCKED);
|
||||
|
||||
if (UserConfigParams::m_everything_unlocked)
|
||||
if (UserConfigParams::m_everything_unlocked > 0)
|
||||
state = OPEN;
|
||||
|
||||
const ChallengeStatus* c = PlayerManager::getCurrentPlayer()
|
||||
@ -534,7 +534,7 @@ void RaceGUIOverworld::drawGlobalMiniMap()
|
||||
const unsigned int val = challenge->getNumTrophies();
|
||||
bool unlocked = (PlayerManager::getCurrentPlayer()->getPoints() >= val);
|
||||
|
||||
if (UserConfigParams::m_everything_unlocked)
|
||||
if (UserConfigParams::m_everything_unlocked > 0)
|
||||
unlocked = true;
|
||||
|
||||
if (!unlocked)
|
||||
|
Loading…
Reference in New Issue
Block a user