Achievements progress now actually gets saved.. how cool is that?
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13634 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
d6f6383833
commit
c67c5a6fb1
@ -75,6 +75,8 @@ void Achievement::check()
|
||||
SingleAchievement::SingleAchievement(const AchievementInfo * info)
|
||||
: Achievement(info)
|
||||
{
|
||||
m_progress = 0;
|
||||
m_achieved = false;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
@ -77,7 +77,6 @@ public:
|
||||
virtual ~MapAchievementInfo () {};
|
||||
int getGoalValue (const std::string & key) { return m_goal_values[key];}
|
||||
virtual bool checkCompletion (Achievement * achievement) const;
|
||||
|
||||
virtual Achievement::AchievementType getType() const { return Achievement::AT_MAP; };
|
||||
}; // class MapAchievementInfo
|
||||
|
||||
|
@ -152,14 +152,18 @@ void AchievementsManager::createSlotsIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
if(something_changed) save();
|
||||
if(something_changed){
|
||||
Log::warn("AchievementsManager::save",
|
||||
"errueeeur");
|
||||
save();
|
||||
}
|
||||
} // UnlockManager::createSlotsIfNeeded
|
||||
|
||||
|
||||
// ============================================================================
|
||||
void AchievementsManager::save()
|
||||
{
|
||||
std::string filename = file_manager->getConfigFile("challenges.xml");
|
||||
std::string filename = file_manager->getConfigFile("achievements.xml");
|
||||
|
||||
std::ofstream achievements_file(filename.c_str(), std::ios::out);
|
||||
|
||||
|
@ -1367,7 +1367,6 @@ int main(int argc, char *argv[] )
|
||||
file_manager->getGUIDir() + "options_video.png") );
|
||||
kart_properties_manager -> loadAllKarts ();
|
||||
unlock_manager = new UnlockManager();
|
||||
AchievementsManager::get();
|
||||
//m_tutorial_manager = new TutorialManager();
|
||||
GUIEngine::addLoadingIcon( irr_driver->getTexture(
|
||||
file_manager->getTextureFile("gui_lock.png")) );
|
||||
@ -1524,6 +1523,7 @@ int main(int argc, char *argv[] )
|
||||
// Go straight to the race
|
||||
StateManager::get()->enterGameState();
|
||||
}
|
||||
AchievementsManager::get();
|
||||
|
||||
|
||||
// If an important news message exists it is shown in a popup dialog.
|
||||
|
Loading…
Reference in New Issue
Block a user