Add doors in overworld, that block Nolok's challenge until the end
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11955 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
0efdf0744a
commit
1b86065775
@ -2,7 +2,7 @@
|
||||
<challenge version="2">
|
||||
<track id="fortmagma" laps="3"/>
|
||||
<mode major="single" minor="quickrace"/>
|
||||
<requirements trophies="175"/>
|
||||
<requirements trophies="180"/>
|
||||
|
||||
<hard>
|
||||
<karts number="2" aiIdent="nolok" superPower="nolokBoss"/>
|
||||
|
@ -841,6 +841,21 @@ bool Track::loadMainTrack(const XMLNode &root)
|
||||
m_all_nodes.push_back(sn);
|
||||
if (!shown) continue;
|
||||
}
|
||||
else if (condition == "allchallenges")
|
||||
{
|
||||
int unlockedChallenges = 0;
|
||||
GameSlot* slot = unlock_manager->getCurrentSlot();
|
||||
for (unsigned int c=0; c<m_challenges.size(); c++)
|
||||
{
|
||||
if (slot->getChallenge(m_challenges[c].m_challenge_id)->isSolvedAtAnyDifficulty())
|
||||
{
|
||||
unlockedChallenges++;
|
||||
}
|
||||
}
|
||||
|
||||
// allow ONE unsolved challenge : the last one
|
||||
if (unlockedChallenges < m_challenges.size() - 1) continue;
|
||||
}
|
||||
else if (condition.size() > 0)
|
||||
{
|
||||
fprintf(stderr, "[Track] WARNING: unknown condition <%s>\n", condition.c_str());
|
||||
@ -852,6 +867,21 @@ bool Track::loadMainTrack(const XMLNode &root)
|
||||
{
|
||||
if (irr_driver->supportsSplatting()) continue;
|
||||
}
|
||||
else if (neg_condition == "allchallenges")
|
||||
{
|
||||
int unlockedChallenges = 0;
|
||||
GameSlot* slot = unlock_manager->getCurrentSlot();
|
||||
for (unsigned int c=0; c<m_challenges.size(); c++)
|
||||
{
|
||||
if (slot->getChallenge(m_challenges[c].m_challenge_id)->isSolvedAtAnyDifficulty())
|
||||
{
|
||||
unlockedChallenges++;
|
||||
}
|
||||
}
|
||||
|
||||
// allow ONE unsolved challenge : the last one
|
||||
if (unlockedChallenges >= m_challenges.size() - 1) continue;
|
||||
}
|
||||
else if (neg_condition.size() > 0)
|
||||
{
|
||||
fprintf(stderr, "[Track] WARNING: unknown condition <%s>\n", neg_condition.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user