20#ifndef HEADER_ACHIEVEMENT_HPP
21#define HEADER_ACHIEVEMENT_HPP
23#include "achievements/achievement_info.hpp"
56 bool and_or,
bool sum_andatonce);
83 uint32_t getID()
const {
return m_id; }
This class stores an achievement definition from the xml file, including title, description,...
Definition: achievement_info.hpp:41
Dialog that shows an achievement description and progress.
Definition: achievement_progress_dialog.hpp:42
Definition: achievement.hpp:42
AchievementInfo::goalTree m_progress_goal_tree
The tree of goals.
Definition: achievement.hpp:66
void onCompletion()
Manages what needs to happen once the achievement is completed, like displaying the completion messag...
Definition: achievement.cpp:378
int computeGoalProgress(AchievementInfo::goalTree &progress, AchievementInfo::goalTree &reference, bool same_tree=false)
Should ONLY be called if the achievement has one goal (a sum counts as one goal).
Definition: achievement.cpp:168
void setGoalValue(std::string &goal_string, int value)
Set any leaf of the progress goal tree whose type matches the goal_string to the value passed as para...
Definition: achievement.cpp:253
int getProgress()
Returns how many goals of an achievement have been achieved.
Definition: achievement.cpp:155
virtual irr::core::stringw getGoalProgressAsString()
Returns how many goals of an achievement have been achieved, in the form n/m.
Definition: achievement.cpp:76
bool m_achieved
True if this achievement has been achieved.
Definition: achievement.hpp:45
virtual irr::core::stringw getProgressAsString()
Returns how much of an achievement has been achieved in the form n/m.
Definition: achievement.cpp:141
virtual void saveProgress(UTFWriter &out)
Saves the achievement status to a file.
Definition: achievement.cpp:64
int getFullfiledGoals()
Returns how many goals of an achievement have been achieved.
Definition: achievement.cpp:86
virtual void loadProgress(const XMLNode *node)
Loads the value from an XML node.
Definition: achievement.cpp:55
bool recursiveCompletionCheck(AchievementInfo::goalTree &progress, AchievementInfo::goalTree &reference)
Checks if this achievement has been achieved.
Definition: achievement.cpp:336
AchievementInfo * m_achievement_info
A pointer to the corresponding AchievementInfo instance.
Definition: achievement.hpp:69
utility class used to write wide (UTF-16 or UTF-32, depending of size of wchar_t) XML files
Definition: utf_writer.hpp:35
utility class used to parse XML files
Definition: xml_node.hpp:48
Definition: achievement_info.hpp:53
Declares the general types that are used by the network.