![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <QBitArray>#include <vector>#include "fcintl.h"#include "log.h"#include "rand.h"#include "shared.h"#include "citizens.h"#include "city.h"#include "culture.h"#include "game.h"#include "map.h"#include "player.h"#include "spaceship.h"#include "achievements.h"
Include dependency graph for achievements.cpp:Go to the source code of this file.
Functions | |
| void | achievements_init () |
| Initialize achievements. More... | |
| void | achievements_free () |
| Free the memory associated with achievements. More... | |
| int | achievement_number (const struct achievement *pach) |
| Return the achievement id. More... | |
| int | achievement_index (const struct achievement *pach) |
| Return the achievement index. More... | |
| struct achievement * | achievement_by_number (int id) |
| Return achievements of given id. More... | |
| const char * | achievement_name_translation (struct achievement *pach) |
| Return translated name of this achievement type. More... | |
| const char * | achievement_rule_name (struct achievement *pach) |
| Return untranslated name of this achievement type. More... | |
| struct achievement * | achievement_by_rule_name (const char *name) |
| Returns achievement matching rule name or nullptr if there is no achievement with such name. More... | |
| struct player * | achievement_plr (struct achievement *ach, struct player_list *achievers) |
| Check if some player has now achieved the achievement and return the player in question. More... | |
| bool | achievement_check (struct achievement *ach, struct player *pplayer) |
| Check if player has now achieved the achievement. More... | |
| const char * | achievement_first_msg (struct achievement *pach) |
| Return message to send to first player gaining the achievement. More... | |
| const char * | achievement_later_msg (struct achievement *pach) |
| Return message to send to other players gaining the achievement. More... | |
| bool | achievement_player_has (const struct achievement *pach, const struct player *pplayer) |
| Has the given player got the achievement? More... | |
| bool | achievement_claimed (const struct achievement *pach) |
| Has anybody got the achievement? More... | |
| int | get_literacy (const struct player *pplayer) |
| Literacy score calculated one way. More... | |
Variables | |
| static struct achievement | achievements [MAX_ACHIEVEMENT_TYPES] |
| struct achievement* achievement_by_number | ( | int | id | ) |
Return achievements of given id.
Definition at line 90 of file achievements.cpp.
Referenced by handle_achievement_info(), handle_ruleset_achievement(), and universal_value_initial().
| struct achievement* achievement_by_rule_name | ( | const char * | name | ) |
Returns achievement matching rule name or nullptr if there is no achievement with such name.
Definition at line 118 of file achievements.cpp.
Referenced by sg_load_player_main(), and universal_by_number().
| bool achievement_check | ( | struct achievement * | ach, |
| struct player * | pplayer | ||
| ) |
Check if player has now achieved the achievement.
Definition at line 182 of file achievements.cpp.
Referenced by achievement_plr().
| bool achievement_claimed | ( | const struct achievement * | pach | ) |
Has anybody got the achievement?
Definition at line 380 of file achievements.cpp.
| const char* achievement_first_msg | ( | struct achievement * | pach | ) |
Return message to send to first player gaining the achievement.
Definition at line 347 of file achievements.cpp.
Referenced by end_turn().
| int achievement_index | ( | const struct achievement * | pach | ) |
Return the achievement index.
Definition at line 80 of file achievements.cpp.
Referenced by end_turn(), load_command(), load_game_names(), and load_ruleset_game().
| const char* achievement_later_msg | ( | struct achievement * | pach | ) |
Return message to send to other players gaining the achievement.
Definition at line 357 of file achievements.cpp.
Referenced by end_turn().
| const char* achievement_name_translation | ( | struct achievement * | pach | ) |
Return translated name of this achievement type.
Definition at line 101 of file achievements.cpp.
Referenced by api_methods_achievement_name_translation(), report_achievements(), req_text_insert(), universal_name_translation(), and worklist_item_postpone_req_vec().
| int achievement_number | ( | const struct achievement * | pach | ) |
Return the achievement id.
Definition at line 70 of file achievements.cpp.
Referenced by send_ruleset_achievements(), and universal_number().
| bool achievement_player_has | ( | const struct achievement * | pach, |
| const struct player * | pplayer | ||
| ) |
Has the given player got the achievement?
Definition at line 367 of file achievements.cpp.
Referenced by load_command(), report_achievements(), and sg_save_player_main().
| struct player* achievement_plr | ( | struct achievement * | ach, |
| struct player_list * | achievers | ||
| ) |
Check if some player has now achieved the achievement and return the player in question.
Definition at line 137 of file achievements.cpp.
Referenced by end_turn().
| const char* achievement_rule_name | ( | struct achievement * | pach | ) |
Return untranslated name of this achievement type.
Definition at line 109 of file achievements.cpp.
Referenced by achievement_by_rule_name(), api_methods_achievement_rule_name(), sanity_check_ruleset_data(), sg_save_player_main(), universal_kind_values(), and universal_rule_name().
| void achievements_free | ( | ) |
Free the memory associated with achievements.
Definition at line 57 of file achievements.cpp.
Referenced by game_ruleset_free().
| void achievements_init | ( | ) |
Initialize achievements.
Definition at line 38 of file achievements.cpp.
Referenced by game_ruleset_init().
| int get_literacy | ( | const struct player * | pplayer | ) |
Literacy score calculated one way.
See also get_literacy2() for alternative way.
Definition at line 389 of file achievements.cpp.
Referenced by achievement_check(), and report_final_scores().
|
static |
Definition at line 1 of file achievements.cpp.
Referenced by achievement_by_number(), achievement_index(), achievements_free(), and achievements_init().