Removed friend relation between StoryModeStatus and UnlockManager.
This commit is contained in:
parent
e3f85ba41b
commit
b0b9712fb9
@ -53,6 +53,17 @@ StoryModeStatus::~StoryModeStatus()
|
||||
delete it->second;
|
||||
}
|
||||
} // ~StoryModeStatus
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Adds a ChallengeStatus with the specified id to the set of all statuses
|
||||
* of this object.
|
||||
* \param cs The challenge status.
|
||||
*/
|
||||
void StoryModeStatus::addStatus(ChallengeStatus *cs)
|
||||
{
|
||||
m_challenges_state[cs->getData()->getId()] = cs;
|
||||
} // addStatus
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool StoryModeStatus::isLocked(const std::string& feature)
|
||||
{
|
||||
|
@ -42,6 +42,7 @@ const int CHALLENGE_POINTS[] = { 8, 9, 10 };
|
||||
|
||||
class StoryModeStatus
|
||||
{
|
||||
private:
|
||||
/** Contains whether each feature of the challenge is locked or unlocked */
|
||||
std::map<std::string, bool> m_locked_features;
|
||||
|
||||
@ -55,8 +56,6 @@ class StoryModeStatus
|
||||
* if no challenge is active. */
|
||||
const ChallengeStatus *m_current_challenge;
|
||||
|
||||
friend class UnlockManager;
|
||||
|
||||
int m_points;
|
||||
|
||||
/** Set to false after the initial stuff (intro, select kart, etc.) */
|
||||
@ -79,6 +78,7 @@ public:
|
||||
void raceFinished ();
|
||||
void grandPrixFinished ();
|
||||
void save (UTFWriter &out);
|
||||
void addStatus(ChallengeStatus *cs);
|
||||
void setCurrentChallenge(const std::string &challenge_id);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -207,7 +207,7 @@ StoryModeStatus* UnlockManager::createStoryModeStatus(const XMLNode *node)
|
||||
ChallengeStatus *challenge_status = new ChallengeStatus(cd);
|
||||
if(node)
|
||||
challenge_status->load(node);
|
||||
status->m_challenges_state[cd->getId()] = challenge_status;
|
||||
status->addStatus(challenge_status);
|
||||
}
|
||||
|
||||
status->computeActive();
|
||||
|
Loading…
Reference in New Issue
Block a user