![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "deprecations.h"#include "registry_ini.h"#include "achievements.h"#include "actions.h"#include "effects.h"#include "game.h"#include "government.h"#include "movement.h"#include "nation.h"#include "road.h"#include "server_settings.h"#include "specialist.h"#include "style.h"#include "tech.h"#include "ruleset.h"#include "settings.h"#include "rssanity.h"
Include dependency graph for rssanity.cpp:Go to the source code of this file.
Functions | |
| static bool | sanity_check_metadata () |
| Is non-rule data in ruleset sane? More... | |
| static bool | nation_has_initial_tech (const nation_type *pnation, struct advance *tech) |
| Does nation have tech initially? More... | |
| static bool | sanity_check_setting_is_seen (struct setting *pset) |
| Returns TRUE iff the given server setting is visible enough to be allowed to appear in ServerSetting requirements. More... | |
| static bool | sanity_check_setting_is_game_rule (struct setting *pset) |
| Returns TRUE iff the specified server setting is a game rule and therefore may appear in a requirement. More... | |
| bool | sanity_check_server_setting_value_in_req (ssetv ssetval) |
| Returns TRUE iff the given server setting and value combination is allowed to appear in ServerSetting requirements. More... | |
| static bool | sanity_check_req_individual (struct requirement *preq, const char *list_for) |
| Sanity checks on a requirement in isolation. More... | |
| static bool | sanity_check_req_set (int reqs_of_type[], int local_reqs_of_type[], struct requirement *preq, bool conjunctive, int max_tiles, const char *list_for) |
| Helper function for sanity_check_req_list() and sanity_check_req_vec() More... | |
| static bool | sanity_check_req_vec (const struct requirement_vector *preqs, bool conjunctive, int max_tiles, const char *list_for) |
| Sanity check requirement vector, including whether it's free of conflicting requirements. More... | |
| static bool | effect_list_sanity_cb (struct effect *peffect, void *data) |
| Sanity check callback for iterating effects cache. More... | |
| static bool | rs_barbarian_units () |
| Sanity check barbarian unit types. More... | |
| static bool | rs_common_units () |
| Sanity check common unit types. More... | |
| static bool | rs_buildings () |
| Sanity check buildings. More... | |
| static bool | sanity_check_boolean_effects () |
| Check that boolean effect types have sensible effects. More... | |
| bool | sanity_check_ruleset_data (bool ignore_retired) |
| Some more sanity checking once all rulesets are loaded. More... | |
| bool | autoadjust_ruleset_data () |
| Apply some automatic defaults to already loaded rulesets. More... | |
| bool | autolock_settings () |
| Set and lock settings that must have certain value. More... | |
| bool autoadjust_ruleset_data | ( | ) |
Apply some automatic defaults to already loaded rulesets.
Returns TRUE iff everything ok.
Definition at line 1389 of file rssanity.cpp.
Referenced by load_rulesetdir(), rscompat_postprocess(), and tab_misc::save_now().
| bool autolock_settings | ( | ) |
Set and lock settings that must have certain value.
Definition at line 1481 of file rssanity.cpp.
Referenced by settings_ruleset().
|
static |
Sanity check callback for iterating effects cache.
Definition at line 454 of file rssanity.cpp.
Referenced by sanity_check_ruleset_data().
|
static |
Does nation have tech initially?
Definition at line 57 of file rssanity.cpp.
Referenced by sanity_check_ruleset_data().
|
static |
Sanity check barbarian unit types.
Definition at line 522 of file rssanity.cpp.
Referenced by sanity_check_ruleset_data().
|
static |
Sanity check buildings.
Definition at line 651 of file rssanity.cpp.
Referenced by sanity_check_ruleset_data().
|
static |
Sanity check common unit types.
Definition at line 599 of file rssanity.cpp.
Referenced by sanity_check_ruleset_data().
|
static |
Check that boolean effect types have sensible effects.
Definition at line 681 of file rssanity.cpp.
Referenced by sanity_check_ruleset_data().
|
static |
Is non-rule data in ruleset sane?
Definition at line 41 of file rssanity.cpp.
Referenced by sanity_check_ruleset_data().
|
static |
Sanity checks on a requirement in isolation.
This will generally be things that could only not be checked at ruleset load time because they would have referenced things not yet loaded from the ruleset.
Definition at line 149 of file rssanity.cpp.
Referenced by sanity_check_req_set().
|
static |
Helper function for sanity_check_req_list() and sanity_check_req_vec()
Definition at line 233 of file rssanity.cpp.
Referenced by sanity_check_req_vec().
|
static |
Sanity check requirement vector, including whether it's free of conflicting requirements.
'conjunctive' should be TRUE if the vector is an AND vector (all requirements must be active), FALSE if it's a disjunctive (OR) vector. max_tiles is number of tiles that can provide requirement. Value -1 disables checking based on number of tiles.
Returns TRUE iff everything ok.
TODO: This is based on current hardcoded range limitations.
Definition at line 419 of file rssanity.cpp.
Referenced by effect_list_sanity_cb(), and sanity_check_ruleset_data().
| bool sanity_check_ruleset_data | ( | bool | ignore_retired | ) |
Some more sanity checking once all rulesets are loaded.
These check for some cross-referencing which was impossible to do while only one party was loaded in load_ruleset_xxx()
Returns TRUE iff everything ok.
Definition at line 716 of file rssanity.cpp.
Referenced by load_rulesetdir(), and tab_misc::save_now().
| bool sanity_check_server_setting_value_in_req | ( | ssetv | ssetval | ) |
Returns TRUE iff the given server setting and value combination is allowed to appear in ServerSetting requirements.
Definition at line 122 of file rssanity.cpp.
Referenced by universal_kind_values().
|
static |
Returns TRUE iff the specified server setting is a game rule and therefore may appear in a requirement.
Definition at line 95 of file rssanity.cpp.
Referenced by sanity_check_req_individual(), and sanity_check_server_setting_value_in_req().
|
static |
Returns TRUE iff the given server setting is visible enough to be allowed to appear in ServerSetting requirements.
Definition at line 86 of file rssanity.cpp.
Referenced by sanity_check_req_individual(), and sanity_check_server_setting_value_in_req().