![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
Include dependency graph for rscompat.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | rscompat_info |
Macros | |
| #define | RULESET_COMPAT_CAP "+Freeciv-3.0-ruleset" |
Functions | |
| int | rscompat_check_capabilities (struct section_file *file, const char *filename, struct rscompat_info *info) |
| Ruleset files should have a capabilities string datafile.options This checks the string and that the required capabilities are satisfied. More... | |
| bool | rscompat_names (struct rscompat_info *info) |
| Do compatibility things with names before they are referred to. More... | |
| void | rscompat_postprocess (struct rscompat_info *info) |
| Do compatibility things after regular ruleset loading. More... | |
| void | rscompat_enablers_add_obligatory_hard_reqs () |
| Update existing action enablers for new hard obligatory requirements. More... | |
| 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. More... | |
| 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. More... | |
| const char * | rscompat_req_name_3_1 (const char *type, const char *old_name) |
| Replace deprecated requirement type names with currently valid ones. More... | |
| const char * | rscompat_utype_flag_name_3_1 (struct rscompat_info *info, const char *old_type) |
| Replace deprecated unit type flag names with currently valid ones. More... | |
| 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. More... | |
| 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. More... | |
| bool | rscompat_old_slow_invasions_3_1 (struct rscompat_info *compat, bool slow_invasions) |
| Replace slow_invasions and friends. More... | |
| #define RULESET_COMPAT_CAP "+Freeciv-3.0-ruleset" |
Definition at line 21 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 338 of file ruleset.cpp.
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().
| 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 1239 of file rscompat.cpp.
Referenced by load_ruleset_game().
| int rscompat_check_capabilities | ( | struct section_file * | file, |
| const char * | filename, | ||
| 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 50 of file rscompat.cpp.
Referenced by load_building_names(), load_game_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().
| void rscompat_enablers_add_obligatory_hard_reqs | ( | ) |
Update existing action enablers for new hard obligatory requirements.
Disable those that can't be upgraded.
Definition at line 227 of file rscompat.cpp.
Referenced by rscompat_postprocess().
| 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 1524 of file rscompat.cpp.
Referenced by load_ruleset_terrain().
| 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 325 of file rscompat.cpp.
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 606 of file rscompat.cpp.
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 1277 of file rscompat.cpp.
Referenced by load_ruleset_game().
| void rscompat_postprocess | ( | struct rscompat_info * | info | ) |
Do compatibility things after regular ruleset loading.
Definition at line 640 of file rscompat.cpp.
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 1502 of file rscompat.cpp.
Referenced by lookup_req_list().
| const char* rscompat_utype_flag_name_3_1 | ( | struct rscompat_info * | info, |
| const char * | old_type | ||
| ) |
Replace deprecated unit type flag names with currently valid ones.
Definition at line 1515 of file rscompat.cpp.
Referenced by load_ruleset_units(), load_unit_names(), lookup_cbonus_list(), and lookup_req_list().