SuperTuxKart
|
The state of a challenge for one player. More...
#include <challenge_status.hpp>
Public Member Functions | |
ChallengeStatus (const ChallengeData *data) | |
void | load (const XMLNode *config) |
Loads the state for a challenge object (esp. | |
void | save (UTFWriter &writer) |
void | setSolved (RaceManager::Difficulty d) |
bool | isSolved (RaceManager::Difficulty d) const |
Returns if this challenge was solved at the specified difficulty. | |
bool | isSolvedAtAnyDifficulty () const |
Returns true if this challenge was solved at any difficult. | |
RaceManager::Difficulty | highestSolved () const |
Returns the highest difficulty at which this challenge was solved. | |
bool | isActive (RaceManager::Difficulty d) const |
True if this challenge is active at the given difficulty. | |
void | setActive (RaceManager::Difficulty d) |
Sets this challenge to be active. | |
bool | isUnlockList () |
Returns if this challenge is only an unlock list. | |
bool | isGrandPrix () |
Returns if this challenge is a grand prix. | |
void | setMaxReqInLowerDiff () |
Used when a challenge's requirement in the hardest difficulty are matched in a lower difficulty. | |
bool | areMaxReqMetInLowerDiff () const |
Returns if the hardest difficulty requirements have been met in a lower difficulty. | |
const ChallengeData * | getData () const |
Returns a pointer to the actual Challenge data. | |
Private Attributes | |
int | m_active |
int | m_solved |
bool | m_max_req_in_lower_diff |
const ChallengeData * | m_data |
Pointer to the original challenge data. | |
The state of a challenge for one player.
Each ChallengeStatus has one ChallengeData associcated, which stores the actual data about the challenge. The ChallengeStatus stores if the challenge is not possible yet (inactive), active (i.e. user can try to solve it), or solved. This status is stored for each difficulty level. This data is saved to and loaded from the players.xml file. A StoryModeStatus instance will store an array of ChallengeStatuses, one for each Challenge in STK.
void ChallengeStatus::load | ( | const XMLNode * | challenges_node | ) |
Loads the state for a challenge object (esp.
m_state)
|
inline |
Used when a challenge's requirement in the hardest difficulty are matched in a lower difficulty.
Don't apply to GP