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