Freeciv-3.1
|
Go to the source code of this file.
Data Structures | |
struct | rscompat_info |
Macros | |
#define | RULESET_COMPAT_CAP "+Freeciv-3.0-ruleset" |
Functions | |
void | rscompat_init_info (struct rscompat_info *info) |
int | rscompat_check_capabilities (struct section_file *file, const char *filename, const struct rscompat_info *info) |
bool | rscompat_check_cap_and_version (struct section_file *file, const char *filename, const struct rscompat_info *info) |
bool | rscompat_names (struct rscompat_info *info) |
void | rscompat_adjust_pre_sanity (struct rscompat_info *info) |
void | rscompat_postprocess (struct rscompat_info *info) |
void | rscompat_enablers_add_obligatory_hard_reqs (void) |
struct requirement_vector * | lookup_req_list (struct section_file *file, struct rscompat_info *compat, const char *sec, const char *sub, const char *rfor) |
bool | rscompat_auto_attack_3_1 (struct rscompat_info *compat, struct action_auto_perf *auto_perf, size_t psize, enum unit_type_flag_id *protecor_flag) |
const char * | rscompat_req_type_name_3_1 (const char *old_type) |
const char * | rscompat_req_name_3_1 (const char *type, const char *old_name) |
void | rscompat_req_vec_adjust_3_1 (struct rscompat_info *compat, struct requirement_vector *preqs, int *reqs_count, const char *filename, const char *sec, const char *sub, const char *rfor) |
const char * | rscompat_utype_flag_name_3_1 (struct rscompat_info *info, const char *old_type) |
const char * | rscompat_combat_bonus_name_3_1 (struct rscompat_info *compat, const char *old_type) |
bool | rscompat_old_effect_3_1 (const char *type, struct section_file *file, const char *sec_name, struct rscompat_info *compat) |
void | rscompat_uclass_flags_3_1 (struct rscompat_info *compat, struct unit_class *pclass) |
void | rscompat_extra_adjust_3_1 (struct rscompat_info *compat, struct extra_type *pextra) |
enum road_gui_type | rscompat_road_gui_type_3_1 (struct road_type *proad) |
bool | rscompat_old_slow_invasions_3_1 (struct rscompat_info *compat, bool slow_invasions) |
const char * | rscompat_action_ui_name_S3_1 (struct rscompat_info *compat, int act_id) |
const char * | rscompat_action_max_range_name_S3_1 (struct rscompat_info *compat, int act_id) |
#define RULESET_COMPAT_CAP "+Freeciv-3.0-ruleset" |
Definition at line 26 of file rscompat.h.
struct requirement_vector * lookup_req_list | ( | struct section_file * | file, |
struct rscompat_info * | compat, | ||
const char * | sec, | ||
const char * | sub, | ||
const char * | rfor | ||
) |
Load a requirement list. The list is returned as a static vector (callers need not worry about freeing anything).
Definition at line 645 of file ruleset.c.
Referenced by effect_to_enabler(), load_ruleset_buildings(), load_ruleset_cities(), load_ruleset_effects(), load_ruleset_game(), load_ruleset_governments(), load_ruleset_styles(), load_ruleset_techs(), and load_ruleset_terrain().
const char * rscompat_action_max_range_name_S3_1 | ( | struct rscompat_info * | compat, |
int | act_id | ||
) |
Adjust freeciv-3.0 ruleset action max_range to freeciv-3.1
Definition at line 2255 of file rscompat.c.
Referenced by load_action_range_max().
const char * rscompat_action_ui_name_S3_1 | ( | struct rscompat_info * | compat, |
int | act_id | ||
) |
Adjust freeciv-3.0 ruleset action ui_name to freeciv-3.1
Definition at line 2240 of file rscompat.c.
Referenced by load_ruleset_game().
void rscompat_adjust_pre_sanity | ( | struct rscompat_info * | info | ) |
Do compatibility things after regular ruleset loading, but before sanity checking.
Definition at line 839 of file rscompat.c.
Referenced by load_rulesetdir().
bool rscompat_auto_attack_3_1 | ( | struct rscompat_info * | compat, |
struct action_auto_perf * | auto_perf, | ||
size_t | psize, | ||
enum unit_type_flag_id * | protecor_flag | ||
) |
Replace deprecated auto_attack configuration.
Definition at line 1751 of file rscompat.c.
Referenced by load_ruleset_game().
bool rscompat_check_cap_and_version | ( | struct section_file * | file, |
const char * | filename, | ||
const struct rscompat_info * | info | ||
) |
Different ruleset files within a ruleset directory should all have identical datafile.format_version This checks the file version against the expected version.
See also rscompat_check_capabilities
Definition at line 131 of file rscompat.c.
Referenced by load_building_names(), load_government_names(), load_nation_names(), load_ruleset_cities(), load_ruleset_effects(), load_style_names(), load_tech_names(), load_terrain_names(), and load_unit_names().
int rscompat_check_capabilities | ( | struct section_file * | file, |
const char * | filename, | ||
const struct rscompat_info * | info | ||
) |
Ruleset files should have a capabilities string datafile.options This checks the string and that the required capabilities are satisfied.
Definition at line 65 of file rscompat.c.
Referenced by load_game_names(), and rscompat_check_cap_and_version().
const char * rscompat_combat_bonus_name_3_1 | ( | struct rscompat_info * | compat, |
const char * | old_type | ||
) |
Replace deprecated combat bonus names with currently valid ones.
Definition at line 2179 of file rscompat.c.
Referenced by lookup_cbonus_list().
void rscompat_enablers_add_obligatory_hard_reqs | ( | void | ) |
Update existing action enablers for new hard obligatory requirements. Disable those that can't be upgraded.
Definition at line 285 of file rscompat.c.
Referenced by rscompat_postprocess(), and ruleset_purge_redundant_reqs().
void rscompat_extra_adjust_3_1 | ( | struct rscompat_info * | compat, |
struct extra_type * | pextra | ||
) |
Adjust freeciv-3.0 ruleset extra definitions to freeciv-3.1
Definition at line 2206 of file rscompat.c.
Referenced by load_ruleset_terrain().
void rscompat_init_info | ( | struct rscompat_info * | info | ) |
Initialize rscompat information structure
Definition at line 56 of file rscompat.c.
Referenced by load_rulesetdir(), and tab_misc::sanity_check().
bool rscompat_names | ( | struct rscompat_info * | info | ) |
Do compatibility things with names before they are referred to. Runs after names are loaded from the ruleset but before the ruleset objects that may refer to them are loaded.
This is needed when previously hard coded items that are referred to in the ruleset them self becomes ruleset defined.
Returns FALSE if an error occurs.
Definition at line 386 of file rscompat.c.
Referenced by load_rulesetdir().
bool rscompat_old_effect_3_1 | ( | const char * | type, |
struct section_file * | file, | ||
const char * | sec_name, | ||
struct rscompat_info * | compat | ||
) |
Check if effect name refers to one of the removed effects, and handle it if it does. Returns TRUE iff name was a valid old name.
Definition at line 806 of file rscompat.c.
Referenced by load_ruleset_effects().
bool rscompat_old_slow_invasions_3_1 | ( | struct rscompat_info * | compat, |
bool | slow_invasions | ||
) |
Replace slow_invasions and friends.
Definition at line 1910 of file rscompat.c.
Referenced by load_ruleset_game().
void rscompat_postprocess | ( | struct rscompat_info * | info | ) |
Do compatibility things after regular ruleset loading.
Definition at line 859 of file rscompat.c.
Referenced by load_rulesetdir().
const char * rscompat_req_name_3_1 | ( | const char * | type, |
const char * | old_name | ||
) |
Replace deprecated requirement type names with currently valid ones.
The extra arguments are for situation where some, but not all, instances of a requirement type should become something else.
Definition at line 2061 of file rscompat.c.
Referenced by lookup_req_list().
const char * rscompat_req_type_name_3_1 | ( | const char * | old_type | ) |
Replace deprecated requirement type names with currently valid ones.
Definition at line 2045 of file rscompat.c.
Referenced by lookup_req_list().
void rscompat_req_vec_adjust_3_1 | ( | struct rscompat_info * | compat, |
struct requirement_vector * | preqs, | ||
int * | reqs_count, | ||
const char * | filename, | ||
const char * | sec, | ||
const char * | sub, | ||
const char * | rfor | ||
) |
Modify requirement vectors in ways that require looking at the entire vector, rather than just individual requirements.
Definition at line 2081 of file rscompat.c.
Referenced by lookup_req_list().
enum road_gui_type rscompat_road_gui_type_3_1 | ( | struct road_type * | proad | ) |
Determine freeciv-3.1 road gui_type from freeciv-3.0 compat_special
Definition at line 2222 of file rscompat.c.
Referenced by load_ruleset_terrain().
void rscompat_uclass_flags_3_1 | ( | struct rscompat_info * | compat, |
struct unit_class * | pclass | ||
) |
Set compatibility unit class flags.
Definition at line 2194 of file rscompat.c.
Referenced by load_ruleset_units().
const char * rscompat_utype_flag_name_3_1 | ( | struct rscompat_info * | compat, |
const char * | old_type | ||
) |
Replace deprecated unit type flag names with currently valid ones.
Definition at line 2167 of file rscompat.c.
Referenced by load_ruleset_units(), load_unit_names(), lookup_cbonus_list(), and lookup_req_list().