Freeciv-3.3
|
#include "capability.h"
#include "registry.h"
#include "section_file.h"
#include "shared.h"
#include "game.h"
#include "modpack.h"
#include "speclist.h"
Go to the source code of this file.
Data Structures | |
struct | modpack_cache_item |
Functions | |
void | modpacks_init (void) |
void | modpacks_free (void) |
bool | modpack_check_capabilities (struct section_file *file, const char *us_capstr, const char *filename, bool verbose) |
struct fileinfo_list * | get_modpacks_list (void) |
const char * | modpack_has_ruleset (struct section_file *sf) |
const char * | modpack_has_tileset (struct section_file *sf) |
const char * | modpack_serv_file (struct section_file *sf) |
const char * | modpack_rulesetdir (struct section_file *sf) |
const char * | modpack_tilespec (struct section_file *sf) |
const char * | modpack_cache_ruleset (struct section_file *sf) |
const char * | modpack_cache_tileset (struct section_file *sf) |
const char * | modpack_file_from_ruleset_cache (const char *name) |
const char * | modpack_file_from_tileset_cache (const char *name) |
const char * | modpack_tileset_target (const char *name) |
void | modpack_ruleset_cache_iterate (mrc_cb cb, void *data) |
void | modpack_tileset_cache_iterate (mrc_cb cb, void *data) |
Variables | |
static struct modpack_cache_list * | modpack_rulesets |
static struct modpack_cache_list * | modpack_tilesets |
#define modpack_cache_iterate | ( | mplist, | |
item | |||
) | TYPED_LIST_ITERATE(struct modpack_cache_item, mplist, item) |
#define modpack_cache_iterate_end LIST_ITERATE_END |
#define SPECLIST_TAG modpack_cache |
#define SPECLIST_TYPE struct modpack_cache_item |
struct fileinfo_list * get_modpacks_list | ( | void | ) |
Get list of modpack meta info files.
Definition at line 127 of file modpack.c.
Referenced by cache_rulesets(), and cache_tilesets().
const char * modpack_cache_ruleset | ( | struct section_file * | sf | ) |
Add modpack/ruleset mapping to cache, if modpack has ruleset. Return name of the modpack, if the mapping exist.
sf | Modpack section file to cache |
Definition at line 235 of file modpack.c.
Referenced by cache_rulesets().
const char * modpack_cache_tileset | ( | struct section_file * | sf | ) |
Add modpack/ruleset mapping to cache, if modpack has tileset. Return name of the modpack, if the mapping exist.
sf | Modpack section file to cache |
Definition at line 262 of file modpack.c.
Referenced by cache_tilesets().
bool modpack_check_capabilities | ( | struct section_file * | file, |
const char * | us_capstr, | ||
const char * | filename, | ||
bool | verbose | ||
) |
Check modpack file capabilities.
file | Modpack section file |
us_capstr | Engine capabilities |
filename | Modpack filename |
verbose | Whether logging should be verbose |
Definition at line 92 of file modpack.c.
Referenced by modpack_has_ruleset(), and modpack_has_tileset().
Find filename by name of the modpack, from the ruleset cache
name | Modpack name |
Definition at line 295 of file modpack.c.
Referenced by handle_ruleset_select(), and ruleset_cache_listcmd_cb().
const char * modpack_has_ruleset | ( | struct section_file * | sf | ) |
Return name of the modpack if it contains a ruleset. If it does not contain ruleset, return nullptr.
sf | Modpack section file |
Definition at line 144 of file modpack.c.
Referenced by modpack_cache_ruleset().
const char * modpack_has_tileset | ( | struct section_file * | sf | ) |
Return name of the modpack if it contains a tileset. If it does not contain ruleset, return nullptr.
sf | Modpack section file |
Definition at line 167 of file modpack.c.
Referenced by modpack_cache_tileset().
Call callback for each item in the ruleset cache.
cb | Callback to call |
data | Data to pass to the callback |
Definition at line 346 of file modpack.c.
Referenced by send_ruleset_choices(), and show_rulesets().
const char * modpack_rulesetdir | ( | struct section_file * | sf | ) |
Return rulesetdir for the modpack, if any.
sf | Modpack section file |
Definition at line 204 of file modpack.c.
Referenced by handle_ruleset_select(), and ruleset_cache_listcmd_cb().
const char * modpack_serv_file | ( | struct section_file * | sf | ) |
Return .serv file name for the modpack, if any.
sf | Modpack section file |
Definition at line 189 of file modpack.c.
Referenced by handle_ruleset_select(), and ruleset_cache_listcmd_cb().
Call callback for each item in the tileset cache.
cb | Callback to call |
data | Data to pass to the callback |
Definition at line 360 of file modpack.c.
Referenced by get_tileset_list(), and tilespec_try_read().
Find target by name of the modpack, from the tileset cache
name | Modpack name |
Definition at line 329 of file modpack.c.
Referenced by ts_cb(), and ts_list_cb().
const char * modpack_tilespec | ( | struct section_file * | sf | ) |
Free the memory associated with modpacks system
Definition at line 62 of file modpack.c.
Referenced by client_main(), and server_quit().
Initialize modpacks system
Definition at line 50 of file modpack.c.
Referenced by client_main(), and srv_prepare().
|
static |
Definition at line 44 of file modpack.c.
Referenced by modpack_cache_ruleset(), modpack_file_from_ruleset_cache(), modpack_ruleset_cache_iterate(), modpacks_free(), and modpacks_init().
|
static |
Definition at line 45 of file modpack.c.
Referenced by modpack_cache_tileset(), modpack_file_from_tileset_cache(), modpack_tileset_cache_iterate(), modpack_tileset_target(), modpacks_free(), and modpacks_init().