Represents a single achievement and its data. More...
#include <achievements.hpp>
Public Member Functions | |
achievement (const config &cfg, bool achieved, int progress) | |
Public Attributes | |
std::string | id_ |
The ID of the achievement. More... | |
t_string | name_ |
The name of the achievement to show on the UI. More... | |
t_string | name_completed_ |
The name of the achievement to show on the UI if the achievement is completed. More... | |
t_string | description_ |
The description of the achievement to show on the UI. More... | |
t_string | description_completed_ |
The name of the achievement to show on the UI if the achievement is completed. More... | |
std::string | icon_ |
The icon of the achievement to show on the UI. More... | |
std::string | icon_completed_ |
The icon of the achievement to show on the UI if the achievement is completed. More... | |
bool | hidden_ |
Whether to show the achievement's actual name and description on the UI before it's been completed. More... | |
t_string | hidden_name_ |
The hint to display in place of the description if the achievement is hidden and uncompleted. More... | |
t_string | hidden_hint_ |
The hint to display in place of the description if the achievement is hidden and uncompleted. More... | |
bool | achieved_ |
Whether the achievement has been completed. More... | |
int | max_progress_ |
When the achievement's current progress matches or equals this value, then it should be marked as completed. More... | |
int | current_progress_ |
The current progress value of the achievement. More... | |
Represents a single achievement and its data.
Definition at line 28 of file achievements.hpp.
|
inline |
Definition at line 57 of file achievements.hpp.
References description_, t_string::empty(), and name_.
bool achievement::achieved_ |
Whether the achievement has been completed.
Definition at line 51 of file achievements.hpp.
Referenced by game_lua_kernel::intf_progress_achievement(), and game_lua_kernel::intf_set_achievement().
int achievement::current_progress_ |
The current progress value of the achievement.
Definition at line 55 of file achievements.hpp.
Referenced by game_lua_kernel::intf_progress_achievement().
t_string achievement::description_ |
The description of the achievement to show on the UI.
Definition at line 37 of file achievements.hpp.
Referenced by achievement().
t_string achievement::description_completed_ |
The name of the achievement to show on the UI if the achievement is completed.
Definition at line 39 of file achievements.hpp.
bool achievement::hidden_ |
Whether to show the achievement's actual name and description on the UI before it's been completed.
Definition at line 45 of file achievements.hpp.
t_string achievement::hidden_hint_ |
The hint to display in place of the description if the achievement is hidden and uncompleted.
Definition at line 49 of file achievements.hpp.
t_string achievement::hidden_name_ |
The hint to display in place of the description if the achievement is hidden and uncompleted.
Definition at line 47 of file achievements.hpp.
std::string achievement::icon_ |
The icon of the achievement to show on the UI.
Definition at line 41 of file achievements.hpp.
std::string achievement::icon_completed_ |
The icon of the achievement to show on the UI if the achievement is completed.
Definition at line 43 of file achievements.hpp.
std::string achievement::id_ |
The ID of the achievement.
Must be unique per achievement_group
Definition at line 31 of file achievements.hpp.
Referenced by game_lua_kernel::intf_progress_achievement(), and game_lua_kernel::intf_set_achievement().
int achievement::max_progress_ |
When the achievement's current progress matches or equals this value, then it should be marked as completed.
Definition at line 53 of file achievements.hpp.
Referenced by game_lua_kernel::intf_progress_achievement().
t_string achievement::name_ |
The name of the achievement to show on the UI.
Definition at line 33 of file achievements.hpp.
Referenced by achievement().
t_string achievement::name_completed_ |
The name of the achievement to show on the UI if the achievement is completed.
Definition at line 35 of file achievements.hpp.