86#define RULES_SUFFIX "ruleset"
87#define SCRIPT_SUFFIX "lua"
89#define ADVANCE_SECTION_PREFIX "advance_"
90#define TECH_CLASS_SECTION_PREFIX "techclass_"
91#define BUILDING_SECTION_PREFIX "building_"
92#define CITYSTYLE_SECTION_PREFIX "citystyle_"
93#define MUSICSTYLE_SECTION_PREFIX "musicstyle_"
94#define UEFF_SECTION_PREFIX "ueff_"
95#define EFFECT_SECTION_PREFIX "effect_"
96#define GOVERNMENT_SECTION_PREFIX "government_"
97#define NATION_SET_SECTION_PREFIX "nset"
98#define NATION_GROUP_SECTION_PREFIX "ngroup"
99#define NATION_SECTION_PREFIX "nation"
100#define STYLE_SECTION_PREFIX "style_"
101#define CLAUSE_SECTION_PREFIX "clause_"
102#define EXTRA_SECTION_PREFIX "extra_"
103#define BASE_SECTION_PREFIX "base_"
104#define ROAD_SECTION_PREFIX "road_"
105#define RESOURCE_SECTION_PREFIX "resource_"
106#define TILEDEF_SECTION_PREFIX "tiledef_"
107#define GOODS_SECTION_PREFIX "goods_"
108#define SPECIALIST_SECTION_PREFIX "specialist_"
109#define SUPER_SPECIALIST_SECTION_PREFIX "super_specialist_"
110#define TERRAIN_SECTION_PREFIX "terrain_"
111#define UNIT_CLASS_SECTION_PREFIX "unitclass_"
112#define UNIT_SECTION_PREFIX "unit_"
113#define DISASTER_SECTION_PREFIX "disaster_"
114#define ACHIEVEMENT_SECTION_PREFIX "achievement_"
115#define ENABLER_SECTION_PREFIX "enabler_"
116#define ACTION_SECTION_PREFIX "action_"
117#define MULTIPLIER_SECTION_PREFIX "multiplier_"
118#define COUNTER_SECTION_PREFIX "counter_"
120#define check_name(name) (check_strlen(name, MAX_LEN_NAME, nullptr))
121#define check_cityname(name) (check_strlen(name, MAX_LEN_CITYNAME, nullptr))
125#define MAX_SECTION_LABEL 64
126#define section_strlcpy(dst, src) \
127 (void) loud_strlcpy(dst, src, MAX_SECTION_LABEL, name_too_long)
165 const char **allowed_terrains,
218 int def,
int min,
int max,
219 const char *path, ...)
232 const char *format, ...)
242 if (logger !=
nullptr) {
276 ae->rulesave.ruledit_disabled =
TRUE;
280 log_normal(
"Purged all action enablers for %s",
287 if (!
ae->rulesave.ruledit_disabled
290 ae->rulesave.ruledit_disabled =
TRUE;
292 log_normal(
"Purged unused action enabler for %s",
307 enum effect_type
type;
313 eft->rulesave.do_not_save =
TRUE;
355 if (
problem->num_suggested_solutions == 0) {
361 if (
problem->num_suggested_solutions == 1
395 if (
problem->num_suggested_solutions == 0) {
401 if (
problem->num_suggested_solutions == 2
405 &
problem->suggested_solutions[1].req)) {
448 "Purged redundant requirement in"
449 " %s in action enabler for %s",
452 "Purged redundant requirement in"
453 " %s in action enabler for %s",
459 while (!
ae->rulesave.ruledit_disabled
478 enum effect_type
type;
486 "Purged redundant requirement in effect of type %s",
542 log_verbose(
"Trying \"%s\": default ruleset directory.", filename);
548 fc_snprintf(filename,
sizeof(filename),
"%s_%s.%s",
550 log_verbose(
"Trying \"%s\": alternative ruleset filename syntax.",
558 _(
"Could not find a readable \"%s.%s\" ruleset file."),
602 if (secfile ==
nullptr) {
623 if (buffer ==
nullptr) {
626 "\"%s\": could not load ruleset script.",
657 if (secfile ==
nullptr) {
676 const char *filename;
683 sec, sub, j)); j++) {
686 bool survives, present, quiet;
724 "\"%s\": trying to have an floating point entry as a requirement name in '%s.%s%d'.",
725 filename, sec, sub, j);
737 if (
name ==
nullptr) {
739 "\"%s\": error in handling requirement name for '%s.%s%d'.",
740 filename, sec, sub, j);
755 "\"%s\": invalid boolean value for survives for "
756 "'%s.%s%d'.", filename, sec, sub, j);
764 "\"%s\": invalid boolean value for present for "
765 "'%s.%s%d'.", filename, sec, sub, j);
772 "\"%s\": invalid boolean value for quiet for "
773 "'%s.%s%d'.", filename, sec, sub, j);
779 "\"%s\" [%s] has invalid or unknown req: "
802 const char *filename;
808 sec, sub, j)); j++) {
814 log_error(
"\"%s\": unknown flag name \"%s\" in '%s.%s'.",
815 filename,
flag, sec, sub);
823 log_error(
"\"%s\": unknown bonus type \"%s\" in '%s.%s'.",
824 filename,
type, sec, sub);
831 log_error(
"\"%s\": failed to get value from '%s.%s%d'.",
832 filename, sec, sub, j);
856 const char *prefix,
const char *
entry,
857 const char *filename,
858 const char *description)
870 "\"%s\" %s %s: couldn't match \"%s\".",
871 filename, (description ? description : prefix),
entry,
sval);
889 const char *filename)
903 if (
slist !=
nullptr) {
910 "\"%s\": string vector %s.%s too long (%d, max %d)",
924 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
947 const char *
entry,
int *output,
948 const char *filename)
964 "\"%s\": string vector %s.%s too long (%d, max %d)",
974 for (
i = 0;
i <
nval && ok;
i++) {
980 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
986 "\"%s\" %s.%s (%d): \"%s\" is removed.",
1011 const char *prefix,
const char *
entry,
1012 int *output,
const char *filename)
1026 "\"%s\": string vector %s.%s too long (%d, max %d)",
1030 if (
slist !=
nullptr) {
1040 if (pimprove ==
nullptr) {
1042 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
1066 const char *filename,
1067 const char *description)
1077 if (*result ==
nullptr) {
1079 "\"%s\" %s %s: couldn't match \"%s\".",
1080 filename, (description ? description : prefix),
entry,
sval);
1095 const char *filename,
1109 "\"%s\" %s: couldn't match \"%s\".",
1123 if (
sval !=
nullptr) {
1140 const char *prefix,
const char *
suffix)
1144 "%s.%s", prefix,
suffix);
1146 if (
vec !=
nullptr) {
1168 if (
pres ==
nullptr) {
1170 "\"%s\" [%s] has unknown \"%s\".",
1183 const char *filename,
1214 if (
pterr ==
nullptr) {
1216 "\"%s\" [%s] has unknown \"%s\".",
1233 const char *filename,
const char *
item_name,
1243 if (*turns > max_turns) {
1245 "\"%s\": \"%s\": \"%s\" value %d too large (max %d)",
1267 "\"%s\" [%s]: no \"name\" specified.",
1344 "\"%s\": Too many achievement types (%d, max %d)",
1357 "\"%s\": Cannot load achievement names",
1375 "\"%s\": Too many goods types (%d, max %d)",
1379 }
else if (
nval < 1) {
1381 "\"%s\": At least one goods type needed",
1396 "\"%s\": Cannot load goods names",
1433 "\"%s\": Cannot load counters names",
1498 "\"%s\": Duplicate tech flag name '%s'",
1505 "\"%s\": Too many user tech flags!",
1529 "\"%s\": Too many tech classes (%d, max %d)",
1544 "\"%s\": Cannot load tech class names",
1558 "\"%s\": No Advances?!?", filename);
1564 "\"%s\": Too many advances (%d, max %d)",
1637 "\"%s\" [%s] \"%s\": \"Never\" with non-\"Never\".",
1644 "\"%s\" [%s] \"%s\": should have \"None\" second.",
1651 a->tclass =
nullptr;
1659 if (a->tclass ==
nullptr) {
1661 "\"%s\" [%s] \"%s\": Unknown tech class \"%s\".",
1667 a->tclass =
nullptr;
1673 if (research_reqs ==
nullptr) {
1683 for (j = 0; j <
nval; j++) {
1691 "\"%s\" [%s] \"%s\": bad flag name \"%s\".",
1740 && (a == b->require[
AR_ONE] || a == b->require[
AR_TWO])) {
1742 b->inherited_root_req =
TRUE;
1775 "\"%s\" tech \"%s\": req1 leads to removed tech.",
1782 "\"%s\" tech \"%s\": req2 leads to removed tech.",
1831 "\"%s\": Duplicate unit flag name '%s'",
1838 "\"%s\": Too many user unit type flags!",
1858 "control.class_flags%d.name",
1862 "control.class_flags%d.helptxt",
i);
1867 "\"%s\": Duplicate unit class flag name '%s'",
1874 "\"%s\": Too many user unit class flags!",
1896 "\"%s\": No unit classes?!?", filename);
1902 "\"%s\": Too many unit classes (%d, max %d)",
1930 "\"%s\": No unit types?!?", filename);
1936 "\"%s\": Too many unit types (%d, max %d)",
1983 "%s.veteran_names", path);
1985 "%s.veteran_power_fact", path);
1987 "%s.veteran_base_raise_chance", path);
1989 "%s.veteran_work_raise_chance",
1992 "%s.veteran_move_bonus", path);
2014#define rs_sanity_veteran(_path, _entry, _i, _condition, _action) \
2016 log_error("Invalid veteran definition '%s.%s[%d]'!", \
2017 _path, _entry, _i); \
2018 log_debug("Failed check: '%s'. Update value: '%s'.", \
2019 #_condition, #_action); \
2060#undef rs_sanity_veteran
2100 "Error loading the default veteran system: %s",
2131 "%s.non_native_def_pct",
2136 for (j = 0; j <
nval; j++) {
2148 "\"%s\" unit_class \"%s\": unit_type flag \"%s\"!",
2152 "\"%s\" unit_class \"%s\": bad flag name \"%s\".",
2181 if (
reqs ==
nullptr) {
2189 msg,
sizeof(msg))) {
2191 "Error loading the veteran system: %s",
2198 &u->obsoleted_by, filename,
2201 &u->converted_to, filename,
2206 u->convert_time = 1;
2224 "\"%s\" unit_type \"%s\": bad class \"%s\".",
2291 if (u->firepower <= 0) {
2293 "\"%s\" unit_type \"%s\":"
2295 " but must be at least 1. "
2296 " If you want no attack ability,"
2297 " set the unit's attack strength to 0.",
2314 for (j = 0; j <
nval; j++) {
2319 "\"%s\" unit_type \"%s\":"
2320 "has unknown unit class %s as cargo.",
2336 for (j = 0; j <
nval; j++) {
2341 "\"%s\" unit_type \"%s\":"
2342 "has unknown unit class %s as target.",
2358 for (j = 0; j <
nval; j++) {
2363 "\"%s\" unit_type \"%s\":"
2364 "has unknown unit class %s as embarkable.",
2380 for (j = 0; j <
nval; j++) {
2385 "\"%s\" unit_type \"%s\":"
2386 "has unknown unit class %s as disembarkable.",
2415 "\"%s\" unit_type \"%s\":"
2416 "has unknown vision layer %s.",
2425 0,
"%s.paratroopers_range",
sec_name);
2437 "\"%s\" unit_type \"%s\":"
2438 " bad specialist \"%s\".",
2455 "\"%s\" unit_type \"%s\":"
2456 " bad tp_defense \"%s\".",
2474 for (j = 0; j <
nval; j++) {
2485 "\"%s\" unit_type \"%s\": unit_class flag!",
2489 "\"%s\" unit_type \"%s\": bad flag name \"%s\".",
2514 for (j = 0; j <
nval; j++) {
2522 "\"%s\" unit_type \"%s\": bad role name \"%s\".",
2541 "\"%s\" unit_type \"%s\": depends on removed tech \"%s\".",
2589 "\"%s\": No improvements?!?", filename);
2592 log_verbose(
"%d improvement types (including possibly unused)",
nval);
2595 "\"%s\": Too many improvements (%d, max %d)",
2618 "control.building_flags%d.name",
2623 "control.building_flags%d.helptxt",
i);
2628 "\"%s\": Duplicate building flag name '%s'",
2635 "\"%s\": Too many user building flags!",
2664 for (
i = 0;
i <
nval && ok;
i++) {
2671 if (
reqs ==
nullptr) {
2683 "\"%s\" improvement \"%s\": couldn't match "
2684 "genus \"%s\".", filename,
2693 for (j = 0; j <
nflags; j++) {
2701 "\"%s\" improvement \"%s\": bad flag name \"%s\".",
2722 if (obs_reqs ==
nullptr) {
2804 "\"%s\": Duplicate terrain flag name '%s'",
2811 "\"%s\": Too many user terrain flags!",
2830 "control.extra_flags%d.name",
2834 "control.extra_flags%d.helptxt",
i);
2839 "\"%s\": Duplicate extra flag name '%s'",
2846 "\"%s\": Too many user extra flags!",
2866 "\"%s\": ruleset doesn't have any terrains.",
2872 "\"%s\": Too many terrains (%d, max %d)",
2911 "\"%s\": Too many extra types (%d, max %d)",
2928 for (idx = 0; idx <
nval; idx++) {
2951 "\"%s\": Too many base types (%d, max %d)",
2969 for (idx = 0; idx <
nval; idx++) {
2976 if (pextra !=
nullptr) {
2981 "No extra definition matching base definition \"%s\"",
2987 "Base section \"%s\" does not associate base with any extra",
3004 "\"%s\": Too many road types (%d, max %d)",
3022 for (idx = 0; idx <
nval; idx++) {
3029 if (pextra !=
nullptr) {
3034 "No extra definition matching road definition \"%s\"",
3040 "Road section \"%s\" does not associate road with any extra",
3056 "\"%s\": Too many resource types (%d, max %d)",
3074 for (idx = 0; idx <
nval; idx++) {
3085 if (pextra !=
nullptr) {
3090 "No extra definition matching resource definition \"%s\"",
3096 "Resource section %s does not list extra this resource belongs to.",
3113 "\"%s\": Too many tiledefs (%d, max %d)",
3130 for (idx = 0; idx <
nval; idx++) {
3169 "parameters.ocean_reclaim_requirement");
3172 "parameters.land_channel_requirement");
3175 "parameters.thaw_requirement");
3178 "parameters.freeze_requirement");
3181 "parameters.lake_max_size");
3184 "parameters.min_start_native_area");
3187 "parameters.move_fragments");
3190 "\"%s\": move_fragments must be at least 1",
3197 "parameters.igter_cost");
3200 "\"%s\": igter_cost must be at least 1",
3209 "parameters.pythagorean_diagonal");
3213 "parameters.ocean_resources");
3216 N_(
"?gui_type:Build Type A Base"),
3217 "extraui.ui_name_base_fortress");
3221 N_(
"?gui_type:Build Type B Base"),
3222 "extraui.ui_name_base_airbase");
3244 pterrain->identifier
3246 if (
'\0' == pterrain->identifier) {
3248 "\"%s\" [%s] identifier missing value.",
3255 "\"%s\" [%s] cannot use '%c' as an identifier;"
3256 " it is reserved for unknown terrain.",
3257 filename,
tsection, pterrain->identifier);
3264 "\"%s\" [%s] has the same identifier as [%s].",
3280 "\"%s\": [%s] unknown class \"%s\"",
3306 "\"%s\": [%s] Different lengths for resources "
3307 "and resource frequencies",
3311 pterrain->resources =
fc_calloc(
nval + 1,
sizeof(*pterrain->resources));
3313 sizeof(*pterrain->resource_freq));
3314 for (j = 0; j <
nval; j++) {
3316 if (pterrain->resources[j] ==
nullptr) {
3320 pterrain->resource_freq[j] = j <
nval2
3326 "\"%s\": [%s] Resource frequency '%d' "
3327 "outside allowed range",
3329 pterrain->resource_freq[j]);
3334 pterrain->resources[
nval] =
nullptr;
3336 pterrain->resource_freq[
nval] = 0;
3347 pterrain->road_output_incr_pct[
o]
3353 filename,
nullptr, &ok)
3355 filename,
nullptr, &ok)) {
3361 if (!
lookup_terrain(file,
"cultivate_result", filename, pterrain,
3362 &pterrain->cultivate_result,
FALSE)) {
3367 if (pterrain->cultivate_result == pterrain) {
3369 "%s: Cultivating result in terrain itself.",
3375 "%s.irrigation_food_incr",
tsection)
3377 tsection,
"irrigation_time", filename,
nullptr, &ok)) {
3384 &pterrain->plant_result,
FALSE)) {
3389 if (pterrain->plant_result == pterrain) {
3391 "%s: Planting result in terrain itself.",
3399 tsection,
"mining_time", filename,
nullptr, &ok)) {
3406 tsection,
"cultivate_time", filename,
nullptr, &ok)) {
3408 "%s: Missing cultivate_time",
tsection);
3412 if ((pterrain->cultivate_result !=
nullptr
3413 && pterrain->cultivate_time <= 0)
3414 || (pterrain->cultivate_result ==
nullptr
3415 && pterrain->cultivate_time > 0)) {
3417 "%s: cultivate_result and cultivate_time disagree "
3418 "whether cultivating is enabled",
tsection);
3424 tsection,
"plant_time", filename,
nullptr, &ok)) {
3426 "%s: Missing plant_time",
tsection);
3430 if ((pterrain->plant_result !=
nullptr
3431 && pterrain->plant_time <= 0)
3432 || (pterrain->plant_result ==
nullptr
3433 && pterrain->plant_time > 0)) {
3435 "%s: plant_result and plant_time disagree "
3436 "whether planting is enabled",
tsection);
3442 pterrain->num_animals =
nval;
3443 if (pterrain->num_animals == 0) {
3444 pterrain->animals =
nullptr;
3446 pterrain->animals =
fc_calloc(pterrain->num_animals,
3447 sizeof(*pterrain->animals));
3448 for (j = 0; j < pterrain->num_animals; j++) {
3450 if (pterrain->animals[j] ==
nullptr) {
3462 if (!
lookup_terrain(file,
"transform_result", filename, pterrain,
3463 &pterrain->transform_result,
TRUE)) {
3468 tsection,
"transform_time", filename,
nullptr, &ok)) {
3473 if ((pterrain->transform_result !=
nullptr
3474 && pterrain->transform_time <= 0)
3475 || (pterrain->transform_result ==
nullptr
3476 && pterrain->transform_time > 0)) {
3478 "%s: transform_result and transform_time disagree "
3479 "whether transforming is enabled",
tsection);
3484 pterrain->placing_time = 1;
3486 tsection,
"placing_time", filename,
nullptr, &ok);
3488 pterrain->pillage_time = 1;
3490 tsection,
"pillage_time", filename,
nullptr, &ok);
3492 if (!
lookup_terrain(file,
"warmer_wetter_result", filename, pterrain,
3493 &pterrain->warmer_wetter_result,
TRUE)
3494 || !
lookup_terrain(file,
"warmer_drier_result", filename, pterrain,
3495 &pterrain->warmer_drier_result,
TRUE)
3496 || !
lookup_terrain(file,
"cooler_wetter_result", filename, pterrain,
3497 &pterrain->cooler_wetter_result,
TRUE)
3498 || !
lookup_terrain(file,
"cooler_drier_result", filename, pterrain,
3499 &pterrain->cooler_drier_result,
TRUE)) {
3506 pterrain->extra_removal_times[
extra_index(pextra)] = 0;
3510 "%s.extra_settings%d.extra",
3514 if (pextra !=
nullptr) {
3518 "%s.extra_settings%d",
tsection, j);
3524 "\"%s\" [%s] has settings for unknown extra \"%s\".",
3534 for (j = 0; j <
nval; j++) {
3541 "\"%s\" [%s] has unknown flag \"%s\".",
3546 BV_SET(pterrain->flags, flag);
3563 pterrain->property[
mtp]
3571 for (j = 0; j <
nval; j++) {
3576 "\"%s\" [%s] is native to unknown unit class \"%s\".",
3596 "Missing terrain color definition: %s",
3629 "\"%s\" extra \"%s\" has no category.",
3637 "\"%s\" extra \"%s\" has invalid category \"%s\".",
3651 "\"%s\" extra \"%s\": unknown cause \"%s\".",
3656 pextra->causes |= (1 << cause);
3661 if (pextra->causes == 0) {
3677 pextra->rmcauses = 0;
3678 for (j = 0; j <
nval; j++) {
3685 "\"%s\" extra \"%s\": unknown rmcause \"%s\".",
3690 pextra->rmcauses |= (1 <<
rmcause);
3711 "%s.rmact_gfx_alt",
section));
3714 "%s.rmact_gfx_alt2",
section));
3722 if (
reqs ==
nullptr) {
3729 if (
reqs ==
nullptr) {
3736 if (
reqs ==
nullptr) {
3743 if (
reqs ==
nullptr) {
3755 pextra->build_time = 0;
3759 "%s.build_time_factor",
section);
3760 pextra->removal_time = 0;
3764 "%s.removal_time_factor",
section);
3767 if (pextra->infracost > 0) {
3774 if (pextra->defense_bonus != 0) {
3786 "\"%s\" extra \"%s\" has illegal unit_seen value \"%s\".",
3796 "%s.appearance_chance",
3800 "%s.disappearance_chance",
3804 "%s.no_aggr_near_city",
3809 for (j = 0; j <
nval; j++) {
3812 if (uclass ==
nullptr) {
3814 "\"%s\" extra \"%s\" is native to unknown unit class \"%s\".",
3830 for (j = 0; j <
nval; j++) {
3838 "\"%s\" extra \"%s\": unknown flag \"%s\".",
3843 BV_SET(pextra->flags, flag);
3848 if (pextra->no_aggr_near_city >= 0) {
3861 for (j = 0; j <
nval; j++) {
3867 "\"%s\" extra \"%s\": unknown conflict extra \"%s\".",
3885 for (j = 0; j <
nval; j++) {
3889 if (top ==
nullptr) {
3891 "\"%s\" extra \"%s\" hidden by unknown extra \"%s\".",
3907 for (j = 0; j <
nval; j++) {
3911 if (top ==
nullptr) {
3913 "\"%s\" extra \"%s\" bridged over unknown extra \"%s\".",
3928 "%s.visibility_req",
section);
3933 "\"%s\" %s: unknown visibility_req %s.",
3954 if (!presource->data.resource) {
3956 "\"%s\" extra \"%s\" has \"Resource\" cause but no "
3957 "corresponding [resource_*] section",
3964 presource->data.resource->output[
o]
3971 if (
id ==
nullptr) {
3972 presource->data.resource->id_old_save =
'\0';
3976 presource->data.resource->id_old_save = identifier[0];
3979 "\"%s\" [%s] identifier missing value.",
3986 "\"%s\" [%s] cannot use '%c' as an identifier;"
3988 filename,
rsection, presource->data.resource->id_old_save);
4008 "\"%s\" resource section [%s]: extra \"%s\" does not "
4009 "have \"Resource\" in its causes",
4021 if (
pres->data.resource->id_old_save !=
'\0') {
4023 if (
pres->data.resource->id_old_save ==
pres2->data.resource->id_old_save
4026 "\"%s\" [%s] has the same identifier as [%s].",
4051 "\"%s\" extra \"%s\" has \"Base\" cause but no "
4052 "corresponding [base_*] section",
4063 "\"%s\" base \"%s\": unknown gui_type \"%s\".",
4072 "%s.vision_main_sq",
4075 "%s.vision_invis_sq",
4078 "%s.vision_subs_sq",
4112 "\"%s\" base section [%s]: extra \"%s\" does not have "
4113 "\"Base\" in its causes",
4125 const char *special;
4132 "\"%s\" extra \"%s\" has \"Road\" cause but no "
4133 "corresponding [road_*] section",
4144 "\"%s\" road \"%s\": unknown gui_type \"%s\".",
4151 if (
reqs ==
nullptr) {
4169 "Illegal move_mode \"%s\" for road \"%s\"",
4176 proad->tile_incr_const[
o] =
4191 "Multiple roads marked as compatibility \"Road\"");
4199 "Multiple roads marked as compatibility \"Railroad\"");
4207 "Multiple roads marked as compatibility \"River\"");
4216 "Illegal compatibility special \"%s\" for road %s",
4227 for (j = 0; j <
nval; j++) {
4236 if (top ==
nullptr) {
4238 "\"%s\" road \"%s\" integrates with unknown road \"%s\".",
4254 for (j = 0; j <
nval; j++) {
4260 "\"%s\" road \"%s\": unknown flag \"%s\".",
4282 "\"%s\" road section [%s]: extra \"%s\" does not have "
4283 "\"Road\" in its causes",
4320 "%s: Invalid terrain flag %s.",
4332 if (pextra !=
nullptr) {
4336 "%s: Duplicate extra %s.",
4348 "%s: Unknown extra name \"%s\".",
4399 "\"%s\": Too many governments (%d, max %d)",
4428 "\"%s\": Too many multipliers (%d, max %d)",
4443 "\"%s\": Cannot load multiplier names",
4455 "control.flags%d.name",
4459 "control.flags%d.helptxt",
i);
4464 "\"%s\": Duplicate government flag name '%s'",
4471 "\"%s\": Too many user government flags!",
4518 if (
reqs ==
nullptr) {
4528 if (g->ai.better ==
nullptr) {
4533 g->ai.better =
nullptr;
4550 for (j = 0; j <
nval; j++) {
4557 "\"%s\" government \"%s\": unknown flag \"%s\".",
4577 const char *male, *female;
4583 "Lack of default ruler titles for "
4584 "government \"%s\" (nb %d): %s",
4591 "Lack of default ruler titles for "
4592 "government \"%s\" (nb %d).",
4619 if (pmul->stop <= pmul->start) {
4621 "Multiplier \"%s\" stop (%d) must be greater "
4623 pmul->stop, pmul->start);
4632 if (((pmul->stop - pmul->start) % pmul->step) != 0) {
4634 "Multiplier \"%s\" step (%d) does not fit "
4635 "exactly into interval start-stop (%d to %d)",
4637 pmul->start, pmul->stop);
4646 if (pmul->def < pmul->start || pmul->def > pmul->stop) {
4648 "Multiplier \"%s\" default (%d) not within "
4650 pmul->def, pmul->start, pmul->stop);
4654 if (((pmul->def - pmul->start) % pmul->step) != 0) {
4656 "Multiplier \"%s\" default (%d) not legal "
4657 "with respect to step size %d",
4666 if (pmul->factor == 0) {
4668 "Multiplier \"%s\" scaling factor must "
4680 if (
reqs ==
nullptr) {
4784 if (sec ==
nullptr) {
4786 "No available nations in this ruleset!");
4790 "Too many nations (max %d, we have %d)!",
4801 "%s.translation_domain",
sec_name);
4807 domain =
"freeciv-nations";
4811 pl->translation_domain =
nullptr;
4816 "Unsupported translation domain \"%s\" for %s",
4826 name_set(&
pl->noun_plural,
pl->translation_domain, noun_plural);
4829 for (j = 0; j <
i && ok; j++) {
4838 "Two nations defined with the same adjective \"%s\": "
4839 "in section \'%s\' and section \'%s\'",
4848 "Two nations defined with the same rule_name \"%s\": "
4849 "in section \'%s\' and section \'%s\'",
4857 "Two nations defined with the same plural name \"%s\": "
4858 "in section \'%s\' and section \'%s\'",
4874 if (sec !=
nullptr) {
4882 if (
name ==
nullptr) {
4908 for (
i = 0;
i <
len;
i++) {
4924 const char **allowed_terrains,
4937 for (j = 0; j <
dim; j++) {
4952 if (!(end =
strchr(p,
')'))) {
4954 "\"%s\" [%s] %s: city name \"%s\" "
4959 for (*end++ =
'\0';
'\0' != *end; end++) {
4962 "\"%s\" [%s] %s: city name \"%s\" "
4963 "contains characters after last parenthesis.",
4979 "\"%s\" [%s] %s: city name \"%s\" is too long.",
4992 if ((next =
strchr(p,
','))) {
5012 "\"%s\" [%s] %s: city \"%s\" "
5013 "has terrain hint \"%s\" not in allowed_terrains.",
5023 if (pterrain ==
nullptr) {
5032 if (pterrain ==
nullptr) {
5044 if (pterrain !=
nullptr
5050 "\"%s\" [%s] %s: city \"%s\" "
5051 "has terrain hint \"%s\" not in allowed_terrains.",
5057 }
else if (!pterrain) {
5063 "\"%s\" [%s] %s: city \"%s\" "
5064 "has unknown terrain hint \"%s\".",
5071 if (pterrain !=
nullptr) {
5076 p = next ? next + 1 :
nullptr;
5077 }
while (p !=
nullptr &&
'\0' != *p);
5108 if (
name !=
nullptr) {
5112 "ruledit.embedded_nations");
5114 if (vec !=
nullptr) {
5144 "Default values for trait %s not sane.",
5153 "compatibility.allowed_govs");
5154 if (vec !=
nullptr) {
5169 "compatibility.allowed_terrains");
5170 if (vec !=
nullptr) {
5185 "compatibility.allowed_styles");
5186 if (vec !=
nullptr) {
5201 "compatibility.default_government");
5205 if (
sval !=
nullptr) {
5209 "Tried to set unknown government type \"%s\" as default_government!",
5221 if (sec !=
nullptr) {
5247 "must be defined.");
5255 "compatibility.default_nationset");
5256 if (
sval !=
nullptr) {
5259 if (
pset !=
nullptr) {
5263 "Unknown default_nationset \"%s\".",
sval);
5312 char tmp[200] =
"\0";
5323 for (j = 0; j <
dim; j++) {
5329 if (
pset !=
nullptr) {
5331 }
else if (
pgroup !=
nullptr) {
5338 log_verbose(
"Nation %s: Unknown set/group \"%s\".",
5342 if (vec !=
nullptr) {
5347 "Nation %s is not a member of any nation set",
5355 for (j = 0; j <
dim; j++) {
5360 "Nation %s conflicts with itself",
5371 log_verbose(
"Nation %s: conflicts_with nation \"%s\" is unknown.",
5375 if (vec !=
nullptr) {
5386 bool is_male =
FALSE;
5389 if (
name ==
nullptr) {
5399 "Nation %s: leader name \"%s\" is too long.",
5408 "Nation %s: leader \"%s\": %s.",
5425 "Nation %s: leader \"%s\" has unsupported "
5426 "sex variant \"%s\".",
5448 "Nation %s: Too many leaders; max is %d",
5452 }
else if (j == 0) {
5454 "Nation %s: no leaders; at least one is required.",
5463 "Nation %s: leader \"%s\" defined more than once.",
5478 if (pnation->server.traits[
tr].min < 0) {
5483 if (pnation->server.traits[
tr].max < 0) {
5488 if (pnation->server.traits[
tr].fixed < 0) {
5492 int diff = pnation->server.traits[
tr].max - pnation->server.traits[
tr].min;
5495 pnation->server.traits[
tr].fixed = diff / 2 + pnation->server.traits[
tr].min;
5498 if (pnation->server.traits[
tr].max < pnation->server.traits[
tr].min) {
5500 "%s values for trait %s not sane.",
5511 pnation->is_playable =
5520 "Nation %s, barbarian_type is invalid (\"%s\")",
5527 && pnation->is_playable) {
5531 "Nation %s marked both barbarian and playable.",
5546 const char *male, *female;
5549 "%s.ruler_titles%d.government",
5551 if (
name ==
nullptr) {
5576 "Nation %s: government \"%s\" not in allowed_govs.",
5588 "Nation %s: government \"%s\" not found.",
5594 if (male !=
nullptr && female !=
nullptr) {
5616 if (pnation->style ==
nullptr) {
5622 "Nation %s: Illegal style \"%s\"",
5627 log_verbose(
"Nation %s: style \"%s\" not supported in this "
5628 "ruleset; using default.",
5637 for (j = 0; j <
dim; j++) {
5645 "Nation %s is its own civil war nation",
5657 log_verbose(
"Nation %s: civil war nation \"%s\" is unknown.",
5661 if (vec !=
nullptr) {
5670 pnation->init_techs, filename)) {
5675 pnation->init_buildings, filename)) {
5680 pnation->init_units, filename)) {
5691 if (pnation->init_government ==
nullptr) {
5702 "Nation %s: init_government \"%s\" not allowed.",
5722 "Nation %s: legend \"%s\" is too long.",
5729 pnation->player =
nullptr;
5736 if (sec !=
nullptr) {
5780 "Nation set \"%s\" has no playable nations. "
5787 "No land barbarian nation defined in set \"%s\". "
5794 "No sea barbarian nation defined in set \"%s\". "
5824 if (sec ==
nullptr) {
5826 "No available nation styles in this ruleset!");
5848 if (sec !=
nullptr) {
5896 if (
reqs ==
nullptr) {
5908 if (sec !=
nullptr) {
5928 if (
reqs ==
nullptr) {
5952 const char *filename)
5968 "\"%s\": %s: bad unit type flag list.",
5995 const char *filename)
6009 "\"%s\": %s: bad action list",
6031 const char *filename)
6037 "missing_unit_upkeep.%s_protected",
item);
6039 "missing_unit_upkeep.%s_unit_act",
item);
6057 const char *
item, *tag;
6068 if (
nullptr == tag) {
6070 "\"%s\": No graphic tag for specialist at %s.",
6080 if (
nullptr ==
reqs) {
6125 "\"%s\": Too many specialists (%d, max %d).",
6154 "\"%s\": must have zero reqs for at least one "
6155 "specialist type.", filename);
6188 "parameters.celebrate_size_limit");
6193 "parameters.angry_citizens");
6206 "\"%s\": Forced taxes do not add up in ruleset!",
6216 "parameters.vision_reveal_tiles");
6224 "citizen.nationality");
6227 "citizen.ubuilder_nationality");
6230 "citizen.convert_speed");
6258 "missing_unit_upkeep.food_wipe");
6277 "missing_unit_upkeep.gold_wipe");
6296 "missing_unit_upkeep.shield_wipe");
6313 const char *filename;
6327 if (sec !=
nullptr) {
6335 if (
type ==
nullptr) {
6337 "\"%s\" [%s] missing effect type.",
6345 "\"%s\" [%s] lists unknown effect type \"%s\".",
6352 "\"%s\" [%s] type \"%s\" is not an user effect.",
6359 if (
type ==
nullptr) {
6361 "\"%s\" [%s] missing ai_valued_as.",
6369 "\"%s\" [%s] lists unknown ai_valued_as \"%s\".",
6376 "\"%s\" [%s] ai_valued_as \"%s\" is an user effect.",
6385 "\"%s\" [%s] Duplicate \"%s\" entry.",
6400 enum effect_type
eff;
6407 const char *comment;
6411 if (
type ==
nullptr) {
6413 "\"%s\" [%s] missing effect type.",
6426 "\"%s\" [%s] lists unknown effect type \"%s\".",
6442 "\"%s\" [%s] has unknown multiplier \"%s\".",
6455 if (
reqs ==
nullptr) {
6466 if (comment !=
nullptr) {
6484 int def,
int min,
int max,
6485 const char *path, ...)
6501 "\"%s\" should be in the interval [%d, %d] "
6502 "but is %d; using the minimal value.",
6509 "\"%s\" should be in the interval [%d, %d] "
6510 "but is %d; using the maximal value.",
6526 if (
vname !=
nullptr) {
6572 if (
vname !=
nullptr) {
6628 const char *filename,
6651 "\"%s\": %s: bad action list",
6657 for (j = 0; j <
asize; j++) {
6673 const char *filename,
6710 const char *filename,
6730 for (j = 0; j <
asize; j++) {
6747 const char *filename;
6758 if (file ==
nullptr) {
6764 if (
name !=
nullptr) {
6886 "options.popup_tech_help");
6891 "civstyle.base_pollution");
6896 for (j = 0; j <
nval; j++) {
6897 enum gameloss_style style;
6906 "\"%s\": bad value \"%s\" for gameloss_style.",
6923 "civstyle.happy_cost");
6929 "civstyle.food_cost");
6935 "civstyle.base_bribe_cost");
6941 "civstyle.ransom_gold");
6944 "civstyle.pillage_select");
6948 "civstyle.tech_steal_allow_holes");
6951 "civstyle.tech_trade_allow_holes");
6954 "civstyle.tech_trade_loss_allow_holes");
6957 "civstyle.tech_parasite_allow_holes");
6960 "civstyle.tech_loss_allow_holes");
6967 "civstyle.upgrade_veteran_loss");
6973 "civstyle.autoupgrade_veteran_loss");
6980 "research.base_tech_cost");
6987 "research.min_tech_cost");
6990 "civstyle.granary_food_ini");
6995 "Too many granary_food_ini entries (%d, max %d)",
6999 log_error(
"No values for granary_food_ini. Using default "
7014 log_error(
"Bad value for granary_food_ini[%i]. Using %i.",
7029 "civstyle.granary_food_inc");
7037 "civstyle.min_city_center_%s",
7050 "civstyle.init_vis_radius_sq");
7057 "civstyle.init_city_radius_sq");
7060 "civstyle.gold_upkeep_style");
7065 "Unknown gold upkeep style \"%s\"",
7078 "Cannot have homeless_gold_upkeep while gold_upkeep_style \"City\".");
7086 "civstyle.output_granularity");
7100 "wonder_visibility.small_wonders");
7106 "Unknown wonder visibility type \"%s\"",
7115 "illness.illness_on");
7121 "illness.illness_base_factor");
7127 "illness.illness_min_size");
7133 "illness.illness_trade_infection");
7139 "illness.illness_pollution_factor");
7147 "incite_cost.base_incite_cost");
7153 "incite_cost.improvement_factor");
7159 "incite_cost.unit_factor");
7165 "incite_cost.total_factor");
7174 "combat_rules.tired_attack");
7178 "combat_rules.only_killing_makes_veteran");
7182 "combat_rules.only_real_fight_makes_veteran");
7186 "combat_rules.combat_odds_scaled_veterancy");
7190 "combat_rules.damage_reduces_bombard_rate");
7194 "combat_rules.low_firepower_badwallattacker");
7197 "combat_rules.low_firepower_pearl_harbor");
7201 "combat_rules.low_firepower_combat_bonus");
7204 "combat_rules.low_firepower_nonnat_bombard");
7210 "combat_rules.nuke_pop_loss_pct");
7216 "combat_rules.nuke_defender_survival_chance_pct");
7224 "borders.radius_sq_city");
7230 "borders.size_effect");
7237 "borders.radius_sq_city_permanent");
7241 "research.tech_cost_style");
7246 "Unknown tech cost style \"%s\"",
7252 "research.tech_leakage");
7257 "Unknown tech leakage \"%s\"",
7263 log_error(
"Only tech_leakage \"%s\" supported with "
7264 "tech_cost_style \"%s\". ",
7267 log_error(
"Switching to tech_leakage \"%s\".",
7276 "research.base_tech_cost");
7279 "research.tech_upkeep_style");
7285 "Unknown tech upkeep style \"%s\"",
7297 "research.tech_upkeep_divider");
7300 if (
sval ==
nullptr) {
7302 "No free_tech_method given");
7308 "Bad value %s for free_tech_method.",
sval);
7320 "culture.victory_min_points");
7323 "culture.victory_lead_pct");
7326 "culture.migration_pml");
7329 "culture.history_interest_pml");
7334 "world_peace.victory_turns");
7339 "calendar.skip_year_0");
7342 "calendar.start_year");
7348 "Too many calendar fragments. Max is %d",
7356 "calendar.positive_label"));
7360 "calendar.negative_label"));
7366 "calendar.fragment_name%d",
cf);
7367 if (
fname !=
nullptr) {
7405 "No background player color defined! (%s)",
7431 "\"%s\": Too many disaster types (%d, max %d)",
7450 "\"%s\": Cannot load disaster names",
7457 if (
reqs ==
nullptr) {
7477 "\"%s\" disaster \"%s\": unknown effect \"%s\".",
7501 const char *
typename;
7509 "Achievement has unknown type \"%s\".",
7510 typename !=
nullptr ?
typename :
"(nullptr)");
7524 if (msg ==
nullptr) {
7526 "Achievement %s has no first msg!",
sec_name);
7535 if (msg ==
nullptr) {
7536 if (!
pach->unique) {
7538 "Achievement %s has no msg for consecutive gainers!",
7556 "trade.settings%d.type",
7562 "\"%s\" unknown trade route type \"%s\".",
7571 "trade.settings%d.pct",
i);
7573 "trade.settings%d.cancelling",
i);
7577 "\"%s\" unknown trade route cancelling type \"%s\".",
7588 "\"%s\" unknown trade route bonus type \"%s\".",
7604 "trade.reveal_trade_partner");
7608 "trade.goods_selection");
7614 "\"%s\" goods selection method \"%s\" unknown.",
7631 if (
reqs ==
nullptr) {
7650 for (j = 0; j <
nval; j++) {
7657 "\"%s\" good \"%s\": unknown flag \"%s\".",
7674 "aarea.access_unit");
7675 const struct unit_type *access_unit =
nullptr;
7682 if (access_unit ==
nullptr) {
7697 if (sec !=
nullptr) {
7700 for (
i = 0;
i < num;
i++) {
7710 "\"%s\" unknown clause type \"%s\".",
7720 "\"%s\" duplicate clause type \"%s\" definition.",
7727 if (
reqs ==
nullptr) {
7734 if (
reqs ==
nullptr) {
7741 if (
reqs ==
nullptr) {
7756 if (sec !=
nullptr) {
7772 "\"%s\" unknown counter type \"%s\".",
7780 "\"%s\": Cannot load counter names",
7792 "\"%s\": No checkpoint value",
7848 "auto_attack",
"if_attacker",
7850 if (
reqs ==
nullptr) {
7856 "auto_attack.attack_actions",
7860 "\"%s\": %s: failed load %s.",
7861 filename,
"auto_attack",
"attack_actions");
7880 "actions.diplchance_initial_odds")) {
7893 "actions.poison_empties_food_stock");
7900 "actions.steal_maps_reveals_all_cities");
7930 "actions.quiet_actions");
7935 "\"%s\": actions.quiet_actions: bad action list",
7940 for (j = 0; j <
asize; j++) {
7984 "civstyle.paradrop_to_transport")
8051 "actions.escape_city", filename)) {
8067 "actions.unit_stack_death", filename)) {
8074 if (sec !=
nullptr) {
8085 "\"%s\" [%s] missing action to configure.",
8094 "\"%s\" [%s] lists unknown action type \"%s\".",
8102 "\"%s\" [%s] duplicate configuration for action \"%s\".",
8133 if (sec !=
nullptr) {
8141 const char *comment;
8149 "\"%s\" [%s] missing action to enable.",
8158 "\"%s\" [%s] lists unknown action type \"%s\".",
8167 if (actor_reqs ==
nullptr) {
8175 if (target_reqs ==
nullptr) {
8183 if (comment !=
nullptr) {
8237 packet.
flags = c->flags;
8314 packet.
fuel = u->fuel;
8315 packet.
flags = u->flags;
8316 packet.
roles = u->roles;
8326 packet.
cargo = u->cargo;
8330 packet.
vlayer = u->vlayer;
8332 if (u->veteran ==
nullptr) {
8351 packet.
worker = u->adv.worker;
8466 if (a->tclass ==
nullptr) {
8469 packet.
tclass = a->tclass->idx;
8511 packet.
flags = a->flags;
8512 packet.
cost = a->cost;
8578 packet.
genus = b->genus;
8586 packet.
reqs = b->reqs;
8590 packet.
upkeep = b->upkeep;
8592 packet.
flags = b->flags;
8639 packet.
tclass = pterrain->tclass;
8652 packet.
output[
o] = pterrain->output[
o];
8703 packet.
flags = pterrain->flags;
8726 packet.
output[
o] = presource->data.resource->output[
o];
8799 packet.
reqs = e->reqs;
8800 packet.
rmreqs = e->rmreqs;
8819 packet.
eus = e->eus;
8824 packet.
flags = e->flags;
8935 packet.
reqs = g->reqs;
8938 packet.
to_pct = g->to_pct;
8942 packet.
flags = g->flags;
8965 packet.
reqs = d->reqs;
8989 packet.
type = a->type;
8990 packet.
unique = a->unique;
8991 packet.
value = a->value;
9140 gov.
flags = g->flags;
9201 if (
n->translation_domain ==
nullptr) {
9262 if (
n->init_buildings[
i] !=
B_LAST) {
9328 packet.
start = pmul->start;
9329 packet.
stop = pmul->stop;
9330 packet.
step = pmul->step;
9331 packet.
def = pmul->def;
9332 packet.
offset = pmul->offset;
9333 packet.
factor = pmul->factor;
9340 packet.
reqs = pmul->reqs;
9408 for (
i = 0;
i <
misc_p.veteran_levels;
i++) {
9429 misc_p.global_init_techs_count =
i;
9436 misc_p.global_init_buildings[
i] =
9442 misc_p.global_init_buildings_count =
i;
9466 if (
name ==
nullptr) {
9501 if (alt !=
nullptr) {
9546 log_normal(
_(
"Cannot load any ruleset. Freeciv-web ruleset is available from "
9547 "https://github.com/freeciv/freeciv-web"));
9561 if (file !=
nullptr) {
9613 server.playable_nations = 0;
9782 "-- This file is for lua-functionality for parsing luadata.txt\n-- of this ruleset.");
9826 if (file ==
nullptr) {
9828 "Could not load game.ruleset:\n%s",
void access_info_init(const struct unit_type *aunit)
void access_info_close(void)
int achievement_index(const struct achievement *pach)
int achievement_number(const struct achievement *pach)
#define achievements_iterate_end
#define achievements_iterate(_ach_)
struct action_auto_perf * action_auto_perf_slot_number(const int num)
void actions_rs_pre_san_gen(void)
const char * action_min_range_ruleset_var_name(int act)
const char * action_blocked_by_ruleset_var_name(const struct action *act)
bool action_is_in_use(struct action *paction)
const char * action_post_success_forced_ruleset_var_name(const struct action *act)
struct action * action_by_rule_name(const char *name)
const char * action_rule_name(const struct action *action)
const char * action_actor_consuming_always_ruleset_var_name(action_id act)
const char * action_max_range_ruleset_var_name(int act)
const char * action_target_kind_ruleset_var_name(int act)
void action_enabler_add(struct action_enabler *enabler)
const char * action_ui_name_default(int act)
struct action_enabler * action_enabler_new(void)
bool action_enabler_possible_actor(const struct action_enabler *ae)
struct action_enabler_list * action_enablers_for_action(action_id action)
#define action_by_result_iterate(_paction_, _result_)
#define action_auto_perf_iterate_end
#define action_enablers_iterate_end
#define ACTION_AUTO_MOVED_ADJ
#define ACTION_AUTO_POST_BRIBE_UNIT
#define action_id_get_sub_target_kind(act_id)
#define ACTION_AUTO_UPKEEP_GOLD
#define enabler_get_action_id(_enabler_)
static struct action * action_by_number(action_id act_id)
#define ACTION_AUTO_ESCAPE_STACK
#define action_has_result(_act_, _res_)
#define ACTION_AUTO_ESCAPE_CITY
#define action_enabler_list_iterate_end
#define ACTION_DISTANCE_UNLIMITED
#define action_by_result_iterate_end
#define ACTION_AUTO_POST_WIPE_UNITS
#define ACTION_AUTO_UPKEEP_SHIELD
#define action_iterate_end
#define ACTION_AUTO_POST_BRIBE_STACK
#define action_enablers_iterate(_enabler_)
#define ACTION_AUTO_POST_ATTACK2
#define action_enabler_list_iterate(action_enabler_list, aenabler)
#define action_iterate(_act_)
#define action_auto_perf_iterate(_act_perf_)
#define ACTION_AUTO_UPKEEP_FOOD
#define ACTION_AUTO_POST_ATTACK
#define ACTION_AUTO_POST_COLLECT_RANSOM
int actres_min_range_default(enum action_result result)
int actres_max_range_default(enum action_result result)
enum action_target_kind actres_target_kind_default(enum action_result result)
void adv_units_ruleset_init(void)
#define CALL_FUNC_EACH_AI(_func,...)
Base_type_id base_number(const struct base_type *pbase)
void base_type_init(struct extra_type *pextra, int idx)
bool territory_claiming_base(const struct base_type *pbase)
#define BV_ISSET(bv, bit)
void city_styles_alloc(int num)
void city_production_caravan_shields_init(void)
const char * city_style_rule_name(const int style)
const char * get_output_identifier(Output_type_id output)
static const struct city struct citystyle * city_styles
#define output_type_iterate(output)
#define output_type_iterate_end
static struct fc_sockaddr_list * list
void conn_list_compression_thaw(const struct conn_list *pconn_list)
void conn_list_compression_freeze(const struct conn_list *pconn_list)
struct counter * counter_by_id(int id)
void attach_city_counter(struct counter *counter)
#define city_counters_iterate_end
#define city_counters_iterate(pcount)
struct clause_info * clause_info_get(enum clause_type type)
const char * disaster_rule_name(struct disaster_type *pdis)
Disaster_type_id disaster_number(const struct disaster_type *pdis)
Disaster_type_id disaster_index(const struct disaster_type *pdis)
#define disaster_type_iterate(_p)
#define disaster_type_iterate_end
void send_ruleset_cache(struct conn_list *dest)
struct effect * effect_new(enum effect_type type, int value, struct multiplier *pmul)
void user_effect_ai_valued_set(enum effect_type tgt, enum effect_type valued_as)
struct effect_list * get_effects(enum effect_type effect_type)
enum effect_type user_effect_ai_valued_as(enum effect_type real)
void effect_req_append(struct effect *peffect, struct requirement req)
bool is_user_effect(enum effect_type eff)
#define effect_list_iterate_end
#define effect_list_iterate(effect_list, peffect)
#define MAX_NUM_USER_BUILDING_FLAGS
#define MAX_DISASTER_TYPES
#define MAX_NUM_BUILDING_LIST
#define EC_NATURAL_DEFENSIVE
#define EC_NOT_AGGRESSIVE
#define MAX_CALENDAR_FRAGMENTS
#define MAX_NUM_TECH_CLASSES
#define MAX_NUM_MULTIPLIERS
#define MAX_NUM_UNIT_LIST
#define MAX_ACHIEVEMENT_TYPES
#define MAX_NUM_TECH_LIST
const struct ft_color ftc_warning
void game_ruleset_init(void)
void game_ruleset_free(void)
#define RS_DEFAULT_RANSOM_GOLD
#define RS_DEFAULT_GRANARY_FOOD_INI
#define RS_DEFAULT_NUKE_DEFENDER_SURVIVAL_CHANCE_PCT
#define RS_MIN_BORDER_RADIUS_SQ_CITY_PERMANENT
#define RS_MAX_TECH_UPKEEP_DIVIDER
#define RS_MIN_ILLNESS_POLLUTION_PCT
#define RS_DEFAULT_NUKE_POP_LOSS_PCT
#define RS_MAX_BORDER_RADIUS_SQ_CITY
#define RS_DEFAULT_BASE_POLLUTION
#define RS_MIN_ILLNESS_TRADE_INFECTION_PCT
#define RS_MAX_ILLNESS_BASE_FACTOR
#define RS_DEFAULT_INCITE_TOTAL_FCT
#define RS_DEFAULT_ILLNESS_BASE_FACTOR
#define RS_DEFAULT_NEG_YEAR_LABEL
#define RS_MIN_NUKE_POP_LOSS_PCT
#define RS_MIN_INCITE_IMPROVEMENT_FCT
#define RS_MIN_BASE_BRIBE_COST
#define RS_MAX_NUKE_POP_LOSS_PCT
#define RS_DEFAULT_INCITE_IMPROVEMENT_FCT
#define RS_MAX_INCITE_IMPROVEMENT_FCT
#define RS_MIN_RANSOM_GOLD
#define RS_ACTION_NO_MAX_DISTANCE
#define RS_DEFAULT_BASE_BRIBE_COST
#define RS_MAX_INCITE_BASE_COST
#define RS_DEFAULT_TECH_UPKEEP_DIVIDER
#define RS_DEFAULT_HAPPY_COST
#define RS_MIN_UPGRADE_VETERAN_LOSS
#define RS_MIN_ILLNESS_MIN_SIZE
#define RS_DEFAULT_POISON_EMPTIES_FOOD_STOCK
#define RS_DEFAULT_GRANARY_FOOD_INC
#define RS_DEFAULT_ILLNESS_ON
#define RS_MAX_HAPPY_COST
#define GAME_DEFAULT_CELEBRATESIZE
#define RS_MIN_ILLNESS_BASE_FACTOR
#define RS_DEFAULT_STEAL_MAP_REVEALS_CITIES
#define RS_MIN_TECH_UPKEEP_DIVIDER
#define RS_MAX_RANSOM_GOLD
#define RS_MIN_HAPPY_COST
#define RS_MIN_BORDER_RADIUS_SQ_CITY
#define GAME_DEFAULT_RULESETDIR
#define RS_MIN_NUKE_DEFENDER_SURVIVAL_CHANCE_PCT
#define RS_MAX_BORDER_RADIUS_SQ_CITY_PERMANENT
#define RS_DEFAULT_UPGRADE_VETERAN_LOSS
#define RS_MAX_NUKE_DEFENDER_SURVIVAL_CHANCE_PCT
#define RS_MAX_INCITE_UNIT_FCT
#define RS_MIN_VIS_RADIUS_SQ
#define RS_DEFAULT_CALENDAR_SKIP_0
#define RS_MAX_ILLNESS_MIN_SIZE
#define RS_DEFAULT_CITY_RADIUS_SQ
#define GAME_DEFAULT_START_YEAR
#define RS_MAX_BORDER_SIZE_EFFECT
#define RS_DEFAULT_BORDER_SIZE_EFFECT
#define RS_MAX_BASE_BRIBE_COST
#define RS_MIN_INCITE_BASE_COST
#define RS_DEFAULT_PILLAGE_SELECT
#define RS_MIN_CITY_RADIUS_SQ
#define RS_MIN_CITY_CENTER_OUTPUT
#define RS_MAX_GRANARY_FOOD_INC
#define RS_MAX_CITY_CENTER_OUTPUT
#define RS_MAX_CITY_RADIUS_SQ
#define RS_DEFAULT_POS_YEAR_LABEL
#define RS_MIN_INCITE_UNIT_FCT
#define RS_MIN_BORDER_SIZE_EFFECT
#define RS_DEFAULT_VIS_RADIUS_SQ
#define RS_DEFAULT_BORDER_RADIUS_SQ_CITY_PERMANENT
#define RS_DEFAULT_TIRED_ATTACK
#define RS_DEFAULT_ACTION_ACTOR_CONSUMING_ALWAYS
#define RS_MAX_ILLNESS_POLLUTION_PCT
#define RS_DEFAULT_ILLNESS_TRADE_INFECTION_PCT
#define RS_DEFAULT_FOOD_COST
#define RS_DEFAULT_INCITE_UNIT_FCT
#define RS_MAX_INCITE_TOTAL_FCT
#define RS_DEFAULT_INCITE_BASE_COST
#define GAME_DEFAULT_ANGRYCITIZEN
#define RS_DEFAULT_CITY_CENTER_OUTPUT
#define RS_MIN_INCITE_TOTAL_FCT
#define RS_DEFAULT_ILLNESS_POLLUTION_PCT
#define RS_MAX_UPGRADE_VETERAN_LOSS
static void set_ruleset_compat_mode(bool active)
#define RS_MAX_VIS_RADIUS_SQ
#define RS_MIN_GRANARY_FOOD_INC
#define RS_MAX_ILLNESS_TRADE_INFECTION_PCT
#define RS_DEFAULT_ILLNESS_MIN_SIZE
#define RS_DEFAULT_BORDER_RADIUS_SQ_CITY
const struct nation_type * ruler_title_nation(const struct ruler_title *pruler_title)
struct ruler_title * government_ruler_title_new(struct government *pgovern, const struct nation_type *pnation, const char *ruler_male_title, const char *ruler_female_title)
const char * ruler_title_female_untranslated_name(const struct ruler_title *pruler_title)
Government_type_id government_count(void)
const char * ruler_title_male_untranslated_name(const struct ruler_title *pruler_title)
const char * gov_flag_helptxt(enum gov_flag_id id)
void governments_alloc(int num)
Government_type_id government_number(const struct government *pgovern)
const struct ruler_title_hash * government_ruler_titles(const struct government *pgovern)
Government_type_id government_index(const struct government *pgovern)
const char * government_rule_name(const struct government *pgovern)
struct government * government_by_rule_name(const char *name)
void set_user_gov_flag_name(enum gov_flag_id id, const char *name, const char *helptxt)
#define governments_iterate(NAME_pgov)
#define ruler_titles_iterate(ARG_hash, NAME_rule_title)
#define ruler_titles_iterate_end
#define governments_iterate_end
#define MAX_NUM_USER_GOVERNMENT_FLAGS
struct impr_type * improvement_by_number(const Impr_type_id id)
Impr_type_id improvement_number(const struct impr_type *pimprove)
const char * improvement_rule_name(const struct impr_type *pimprove)
void improvement_feature_cache_init(void)
struct impr_type * improvement_by_rule_name(const char *name)
void set_user_impr_flag_name(enum impr_flag_id id, const char *name, const char *helptxt)
const char * impr_flag_helptxt(enum impr_flag_id id)
#define improvement_iterate_end
#define improvement_iterate(_p)
void vdo_log(const char *file, const char *function, int line, bool print_from_where, enum log_level level, char *buf, int buflen, const char *message, va_list args)
#define fc_assert_ret(condition)
#define log_verbose(message,...)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_do_output_for_level(level)
#define fc_assert_action(condition, action)
#define log_debug(message,...)
#define log_normal(message,...)
#define log_error(message,...)
void lsend_packet_ruleset_summary(struct conn_list *dest, const struct packet_ruleset_summary *packet)
void lsend_packet_ruleset_building(struct conn_list *dest, const struct packet_ruleset_building *packet)
void lsend_packet_ruleset_unit_class_flag(struct conn_list *dest, const struct packet_ruleset_unit_class_flag *packet)
void lsend_packet_ruleset_achievement(struct conn_list *dest, const struct packet_ruleset_achievement *packet)
void lsend_packet_ruleset_nation_sets(struct conn_list *dest, const struct packet_ruleset_nation_sets *packet)
void lsend_packet_ruleset_multiplier(struct conn_list *dest, const struct packet_ruleset_multiplier *packet)
void lsend_packet_ruleset_city(struct conn_list *dest, const struct packet_ruleset_city *packet)
void lsend_packet_ruleset_unit(struct conn_list *dest, const struct packet_ruleset_unit *packet)
void lsend_packet_ruleset_clause(struct conn_list *dest, const struct packet_ruleset_clause *packet)
void lsend_packet_ruleset_unit_flag(struct conn_list *dest, const struct packet_ruleset_unit_flag *packet)
void lsend_packet_ruleset_action(struct conn_list *dest, const struct packet_ruleset_action *packet)
void lsend_packet_ruleset_extra(struct conn_list *dest, const struct packet_ruleset_extra *packet)
void lsend_packet_ruleset_nation_groups(struct conn_list *dest, const struct packet_ruleset_nation_groups *packet)
void lsend_packet_ruleset_terrain_control(struct conn_list *dest, const struct packet_ruleset_terrain_control *packet)
void lsend_packet_ruleset_government_ruler_title(struct conn_list *dest, const struct packet_ruleset_government_ruler_title *packet)
void lsend_packet_ruleset_music(struct conn_list *dest, const struct packet_ruleset_music *packet)
void lsend_packet_ruleset_control(struct conn_list *dest, const struct packet_ruleset_control *packet)
void lsend_packet_team_name_info(struct conn_list *dest, const struct packet_team_name_info *packet)
void lsend_packet_ruleset_terrain_flag(struct conn_list *dest, const struct packet_ruleset_terrain_flag *packet)
void lsend_packet_ruleset_unit_class(struct conn_list *dest, const struct packet_ruleset_unit_class *packet)
void lsend_packet_ruleset_disaster(struct conn_list *dest, const struct packet_ruleset_disaster *packet)
void lsend_packet_ruleset_tiledef(struct conn_list *dest, const struct packet_ruleset_tiledef *packet)
void lsend_packet_ruleset_description_part(struct conn_list *dest, const struct packet_ruleset_description_part *packet)
void lsend_packet_ruleset_government(struct conn_list *dest, const struct packet_ruleset_government *packet)
void lsend_packet_ruleset_unit_bonus(struct conn_list *dest, const struct packet_ruleset_unit_bonus *packet)
void lsend_packet_ruleset_base(struct conn_list *dest, const struct packet_ruleset_base *packet)
void lsend_packet_ruleset_resource(struct conn_list *dest, const struct packet_ruleset_resource *packet)
void lsend_packet_ruleset_specialist(struct conn_list *dest, const struct packet_ruleset_specialist *packet)
void lsend_packet_ruleset_tech(struct conn_list *dest, const struct packet_ruleset_tech *packet)
void lsend_packet_ruleset_trade(struct conn_list *dest, const struct packet_ruleset_trade *packet)
void lsend_packet_ruleset_action_enabler(struct conn_list *dest, const struct packet_ruleset_action_enabler *packet)
void lsend_packet_ruleset_gov_flag(struct conn_list *dest, const struct packet_ruleset_gov_flag *packet)
void lsend_packet_ruleset_style(struct conn_list *dest, const struct packet_ruleset_style *packet)
void lsend_packet_ruleset_tech_flag(struct conn_list *dest, const struct packet_ruleset_tech_flag *packet)
void lsend_packet_ruleset_tech_class(struct conn_list *dest, const struct packet_ruleset_tech_class *packet)
void lsend_packet_ruleset_goods(struct conn_list *dest, const struct packet_ruleset_goods *packet)
void lsend_packet_ruleset_game(struct conn_list *dest, const struct packet_ruleset_game *packet)
void lsend_packet_ruleset_nation(struct conn_list *dest, const struct packet_ruleset_nation *packet)
void lsend_packet_ruleset_counter(struct conn_list *dest, const struct packet_ruleset_counter *packet)
void lsend_packet_rulesets_ready(struct conn_list *dest)
void lsend_packet_ruleset_impr_flag(struct conn_list *dest, const struct packet_ruleset_impr_flag *packet)
void lsend_packet_ruleset_extra_flag(struct conn_list *dest, const struct packet_ruleset_extra_flag *packet)
void lsend_packet_ruleset_road(struct conn_list *dest, const struct packet_ruleset_road *packet)
void lsend_packet_ruleset_terrain(struct conn_list *dest, const struct packet_ruleset_terrain *packet)
void lsend_packet_ruleset_action_auto(struct conn_list *dest, const struct packet_ruleset_action_auto *packet)
struct terrain_misc terrain_control
#define fc_calloc(n, esz)
int utype_unknown_move_cost(const struct unit_type *utype)
void init_move_fragments(void)
const char * multiplier_rule_name(const struct multiplier *pmul)
Multiplier_type_id multiplier_number(const struct multiplier *pmul)
struct multiplier * multiplier_by_rule_name(const char *name)
Multiplier_type_id multiplier_index(const struct multiplier *pmul)
#define multipliers_iterate(_mul_)
#define multipliers_iterate_end
static void name_set(struct name_translation *ptrans, const char *domain, const char *vernacular_name)
static const char * rule_name_get(const struct name_translation *ptrans)
static const char * untranslated_name(const struct name_translation *ptrans)
static void names_set(struct name_translation *ptrans, const char *domain, const char *vernacular_name, const char *rule_name)
void nation_group_set_match(struct nation_group *pgroup, int match)
const char * nation_group_untranslated_name(const struct nation_group *pgroup)
struct nation_group * nation_group_by_rule_name(const char *name)
const char * nation_rule_name(const struct nation_type *pnation)
Nation_type_id nation_count(void)
Nation_type_id nation_number(const struct nation_type *pnation)
struct nation_group * nation_group_new(const char *name)
bool nation_leader_is_male(const struct nation_leader *pleader)
struct nation_set * nation_set_new(const char *set_name, const char *set_rule_name, const char *set_description)
struct nation_type * nation_by_number(const Nation_type_id nation)
struct nation_city * nation_city_new(struct nation_type *pnation, const char *name)
const struct nation_leader_list * nation_leaders(const struct nation_type *pnation)
const char * nation_set_untranslated_name(const struct nation_set *pset)
bool is_nation_playable(const struct nation_type *nation)
int nation_set_number(const struct nation_set *pset)
void nation_city_set_terrain_preference(struct nation_city *pncity, const struct terrain *pterrain, enum nation_city_preference prefer)
void nation_city_set_river_preference(struct nation_city *pncity, enum nation_city_preference prefer)
bool nation_is_in_set(const struct nation_type *pnation, const struct nation_set *pset)
const char * nation_set_description(const struct nation_set *pset)
int nation_set_count(void)
struct nation_set * nation_set_by_number(int id)
struct nation_type * nation_by_rule_name(const char *name)
struct nation_set * nation_set_by_rule_name(const char *name)
Nation_type_id nation_index(const struct nation_type *pnation)
const char * nation_leader_name(const struct nation_leader *pleader)
int nation_group_count(void)
const char * nation_set_rule_name(const struct nation_set *pset)
struct nation_leader * nation_leader_new(struct nation_type *pnation, const char *name, bool is_male)
void nation_group_set_hidden(struct nation_group *pgroup, bool hidden)
void nations_alloc(int num)
enum barbarian_type nation_barbarian_type(const struct nation_type *nation)
int nation_group_number(const struct nation_group *pgroup)
#define nation_leader_list_iterate(leaderlist, pleader)
#define nation_sets_iterate_end
#define nation_set_list_iterate_end
#define nation_group_list_iterate(grouplist, pgroup)
#define nation_sets_iterate(NAME_pset)
#define nations_iterate_end
#define nations_iterate(NAME_pnation)
#define nation_leader_list_iterate_end
#define nation_group_list_iterate_end
#define nation_set_list_iterate(setlist, pset)
#define nation_groups_iterate(NAME_pgroup)
#define nation_groups_iterate_end
void notify_conn(struct conn_list *dest, const struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
#define web_lsend_packet(packetname,...)
#define PACKET_STRVEC_INSERT(dest, src)
struct city_list * cities
void send_nation_availability(struct conn_list *dest, bool nationset_change)
void playercolor_free(void)
void playercolor_init(void)
int playercolor_count(void)
void playercolor_add(struct rgbcolor *prgbcolor)
void count_playable_nations(void)
struct section_file * secfile_load(const char *filename, bool allow_duplicates)
const char * secfile_error(void)
const char * section_name(const struct section *psection)
void secfile_destroy(struct section_file *secfile)
bool entry_bool_get(const struct entry *pentry, bool *value)
void secfile_check_unused(const struct section_file *secfile)
bool secfile_lookup_int(const struct section_file *secfile, int *ival, const char *path,...)
struct section_list * secfile_sections_by_name_prefix(const struct section_file *secfile, const char *prefix)
const char ** secfile_lookup_str_vec(const struct section_file *secfile, size_t *dim, const char *path,...)
struct entry * secfile_entry_lookup(const struct section_file *secfile, const char *path,...)
bool entry_str_get(const struct entry *pentry, const char **value)
const char * secfile_lookup_str(const struct section_file *secfile, const char *path,...)
int * secfile_lookup_int_vec(const struct section_file *secfile, size_t *dim, const char *path,...)
bool secfile_lookup_bool_default(const struct section_file *secfile, bool def, const char *path,...)
int secfile_lookup_int_default(const struct section_file *secfile, int def, const char *path,...)
bool entry_int_get(const struct entry *pentry, int *value)
const char * secfile_name(const struct section_file *secfile)
struct entry * secfile_entry_by_path(const struct section_file *secfile, const char *path)
const char * secfile_lookup_str_default(const struct section_file *secfile, const char *def, const char *path,...)
int secfile_lookup_int_def_min_max(const struct section_file *secfile, int defval, int minval, int maxval, const char *path,...)
enum entry_type entry_type_get(const struct entry *pentry)
#define secfile_lookup_enum_vec(secfile, dim, specenum_type, path,...)
#define secfile_lookup_enum_default(secfile, defval, specenum_type, path,...)
#define section_list_iterate(seclist, psection)
#define section_list_iterate_end
#define secfile_entry_ignore_by_path(_sfile_, _path_)
req_vec_num_in_item req_vec_vector_number(const void *parent_item, const struct requirement_vector *vec)
struct requirement_vector * req_vec_by_number(const void *parent_item, req_vec_num_in_item number)
bool req_vec_change_apply(const struct req_vec_change *modification, requirement_vector_by_number getter, const void *parent_item)
bool are_requirements_equal(const struct requirement *req1, const struct requirement *req2)
struct requirement req_from_str(const char *type, const char *range, bool survives, bool present, bool quiet, const char *value)
struct requirement req_from_values(int type, int range, bool survives, bool present, bool quiet, int value)
void req_vec_problem_free(struct req_vec_problem *issue)
struct req_vec_problem * req_vec_get_first_missing_univ(const struct requirement_vector *vec, requirement_vector_number get_num, const void *parent_item)
struct req_vec_problem * req_vec_get_first_redundant_req(const struct requirement_vector *vec, requirement_vector_number get_num, const void *parent_item)
bool req_vec_is_impossible_to_fulfill(const struct requirement_vector *reqs)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
bool rgbcolor_load(struct section_file *file, struct rgbcolor **prgbcolor, char *path,...)
Road_type_id road_number(const struct road_type *proad)
void road_integrators_cache_init(void)
void road_type_init(struct extra_type *pextra, int idx)
bool rscompat_names(struct rscompat_info *info)
void rscompat_postprocess(struct rscompat_info *info)
const char * rscompat_effect_name_3_4(const char *old_name)
int rscompat_check_capabilities(struct section_file *file, const char *filename, const struct rscompat_info *info)
void rscompat_enablers_add_obligatory_hard_reqs(void)
void rscompat_init_info(struct rscompat_info *info)
bool rscompat_check_cap_and_version(struct section_file *file, const char *filename, const struct rscompat_info *info)
#define ENABLER_SECTION_PREFIX
#define check_cityname(name)
static int ruleset_purge_redundant_reqs_enablers(void)
static void ruleset_load_traits(struct trait_limits *out, struct section_file *file, const char *secname, const char *field_prefix)
static bool load_rulesetdir(const char *rsdir, bool compat_mode, rs_conversion_logger logger, bool act, bool buffer_script, bool load_luadata)
#define STYLE_SECTION_PREFIX
static bool lookup_terrain(struct section_file *file, const char *entry, const char *filename, struct terrain *pthis, struct terrain **result, bool null_acceptable)
static bool load_ruleset_veteran(struct section_file *file, const char *path, struct veteran_system **vsystem, char *err, size_t err_len)
static bool load_terrain_names(struct section_file *file, struct rscompat_info *compat)
static bool load_style_names(struct section_file *file, struct rscompat_info *compat)
int ruleset_purge_unused_entities(void)
#define MUSICSTYLE_SECTION_PREFIX
static char * road_sections
static bool load_ruleset_governments(struct section_file *file, struct rscompat_info *compat)
#define MULTIPLIER_SECTION_PREFIX
static struct requirement_vector reqs_list
static void send_ruleset_techs(struct conn_list *dest)
#define section_strlcpy(dst, src)
static bool load_action_range(struct section_file *file, action_id act)
static bool load_specialist(const struct section *psection, struct specialist *s, struct section_file *file)
static void send_ruleset_units(struct conn_list *dest)
static void send_ruleset_governments(struct conn_list *dest)
static bool load_action_names(struct section_file *file, struct rscompat_info *compat)
static struct extra_type * lookup_resource(const char *filename, const char *name, const char *jsection)
static struct section_file * openload_luadata_file(const char *rsdir)
#define TILEDEF_SECTION_PREFIX
static bool load_ruleset_techs(struct section_file *file, struct rscompat_info *compat)
static bool purge_unused_req_vec(const struct requirement_vector *reqs, const char *msg)
void rulesets_deinit(void)
static void send_ruleset_resources(struct conn_list *dest)
static bool load_ruleset_buildings(struct section_file *file, struct rscompat_info *compat)
static char * terrain_sections
static bool lookup_building_list(struct section_file *file, const char *prefix, const char *entry, int *output, const char *filename)
static void nullcheck_secfile_destroy(struct section_file *file)
static int secfile_lookup_int_default_min_max(struct section_file *file, int def, int min, int max, const char *path,...) fc__attribute((__format__(__printf__
static void send_ruleset_clauses(struct conn_list *dest)
static void send_ruleset_game(struct conn_list *dest)
#define NATION_SECTION_PREFIX
static bool load_ruleset_effects(struct section_file *file, struct rscompat_info *compat)
static bool lookup_cbonus_list(struct combat_bonus_list *list, struct section_file *file, const char *sec, const char *sub)
static void send_ruleset_nations(struct conn_list *dest)
static void send_ruleset_roads(struct conn_list *dest)
static int ruleset_purge_unused_enablers(void)
#define UEFF_SECTION_PREFIX
static char * tiledef_sections
static bool is_on_allowed_list(const char *name, const char **list, size_t len)
static void send_ruleset_tech_classes(struct conn_list *dest)
static void send_ruleset_action_enablers(struct conn_list *dest)
static void send_ruleset_control(struct conn_list *dest)
bool load_rulesets(const char *restore, const char *alt, bool compat_mode, rs_conversion_logger logger, bool act, bool buffer_script, bool load_luadata)
static void send_ruleset_tiledefs(struct conn_list *dest)
#define GOODS_SECTION_PREFIX
void ruleset_error_real(rs_conversion_logger logger, const char *file, const char *function, int line, enum log_level level, const char *format,...)
#define TERRAIN_SECTION_PREFIX
static struct section_file * openload_ruleset_file(const char *whichset, const char *rsdir)
struct requirement_vector * lookup_req_list(struct section_file *file, const char *sec, const char *sub, const char *rfor)
static void send_ruleset_musics(struct conn_list *dest)
int ruleset_purge_redundant_reqs(void)
static char * base_sections
#define DISASTER_SECTION_PREFIX
static void send_ruleset_goods(struct conn_list *dest)
static const char name_too_long[]
bool reload_rulesets_settings(void)
static struct strvec * lookup_strvec(struct section_file *file, const char *prefix, const char *suffix)
#define CITYSTYLE_SECTION_PREFIX
static bool lookup_tech(struct section_file *file, struct advance **result, const char *prefix, const char *entry, const char *filename, const char *description)
static bool load_game_names(struct section_file *file, struct rscompat_info *compat)
static void send_ruleset_counters(struct conn_list *dest)
static void send_ruleset_specialists(struct conn_list *dest)
#define ADVANCE_SECTION_PREFIX
#define EFFECT_SECTION_PREFIX
static void send_ruleset_action_auto_performers(struct conn_list *dest)
static bool load_government_names(struct section_file *file, struct rscompat_info *compat)
static int char * script_buffer
static bool load_action_blocked_by_list(struct section_file *file, const char *filename, struct action *paction, struct rscompat_info *compat)
static void send_ruleset_team_names(struct conn_list *dest)
static void send_ruleset_cities(struct conn_list *dest)
static bool purge_redundant_req_vec(const struct requirement_vector *reqs, const char *msg)
static char * lookup_string(struct section_file *file, const char *prefix, const char *suffix)
static const char * check_leader_names(struct nation_type *pnation)
#define BASE_SECTION_PREFIX
static int ruleset_purge_redundant_reqs_effects(void)
static enum fc_tristate openload_script_file(const char *whichset, const char *rsdir, char **buffer, bool optional)
char * get_parser_buffer(void)
#define ACTION_SECTION_PREFIX
static bool load_building_names(struct section_file *file, struct rscompat_info *compat)
#define EXTRA_SECTION_PREFIX
void send_rulesets(struct conn_list *dest)
#define CLAUSE_SECTION_PREFIX
static bool lookup_unit_list(struct section_file *file, const char *prefix, const char *entry, struct unit_type **output, const char *filename)
static char * resource_sections
#define UNIT_SECTION_PREFIX
#define ACHIEVEMENT_SECTION_PREFIX
static bool load_ruleset_cities(struct section_file *file, struct rscompat_info *compat)
static bool load_ruleset_styles(struct section_file *file, struct rscompat_info *compat)
static struct government * lookup_government(struct section_file *file, const char *entry, const char *filename, struct government *fallback)
#define SUPER_SPECIALIST_SECTION_PREFIX
static bool load_ruleset_units(struct section_file *file, struct rscompat_info *compat)
static bool lookup_time(const struct section_file *secfile, int *turns, const char *sec_name, const char *property_name, const char *filename, const char *item_name, bool *ok)
static void send_ruleset_styles(struct conn_list *dest)
#define NATION_GROUP_SECTION_PREFIX
static char * extra_sections
static void send_ruleset_disasters(struct conn_list *dest)
static bool purge_duplicate_req_vec(const struct requirement_vector *reqs, const char *msg)
static bool lookup_tech_list(struct section_file *file, const char *prefix, const char *entry, int *output, const char *filename)
#define MAX_SECTION_LABEL
#define BUILDING_SECTION_PREFIX
static bool load_ruleset_game(struct section_file *file, bool act, struct rscompat_info *compat)
static bool load_nation_names(struct section_file *file, struct rscompat_info *compat)
static void send_ruleset_achievements(struct conn_list *dest)
static void send_ruleset_bases(struct conn_list *dest)
static bool load_ruleset_terrain(struct section_file *file, struct rscompat_info *compat)
static int ruleset_purge_unused_effects(void)
static bool load_action_actor_consuming_always(struct section_file *file, action_id act)
static bool load_action_post_success_force(struct section_file *file, const char *filename, int performer_slot, struct action *paction)
static bool load_tech_names(struct section_file *file, struct rscompat_info *compat)
#define SPECIALIST_SECTION_PREFIX
#define COUNTER_SECTION_PREFIX
static bool load_action_kind(struct section_file *file, action_id act)
static void send_ruleset_multipliers(struct conn_list *dest)
char * get_script_buffer(void)
static void send_ruleset_actions(struct conn_list *dest)
static bool load_city_name_list(struct section_file *file, struct nation_type *pnation, const char *secfile_str1, const char *secfile_str2, const char **allowed_terrains, size_t atcount)
static bool load_action_auto_uflag_block(struct section_file *file, struct action_auto_perf *auto_perf, const char *uflags_path, const char *filename)
static bool load_ruleset_nations(struct section_file *file, struct rscompat_info *compat)
static bool load_action_auto_actions(struct section_file *file, struct action_auto_perf *auto_perf, const char *actions_path, const char *filename)
static void send_ruleset_unit_classes(struct conn_list *dest)
#define TECH_CLASS_SECTION_PREFIX
#define RESOURCE_SECTION_PREFIX
static bool lookup_unit_type(struct section_file *file, const char *prefix, const char *entry, const struct unit_type **result, const char *filename, const char *description)
static void send_ruleset_extras(struct conn_list *dest)
#define rs_sanity_veteran(_path, _entry, _i, _condition, _action)
static void send_ruleset_terrain(struct conn_list *dest)
#define GOVERNMENT_SECTION_PREFIX
static bool load_unit_names(struct section_file *file, struct rscompat_info *compat)
static void send_ruleset_trade_routes(struct conn_list *dest)
static bool load_ruleset_actions(struct section_file *file, struct section_file *gamefile, struct rscompat_info *compat)
static void notify_ruleset_fallback(const char *msg)
static bool lookup_bv_actions(struct section_file *file, const char *filename, bv_actions *target, const char *path)
static void send_ruleset_buildings(struct conn_list *dest)
#define UNIT_CLASS_SECTION_PREFIX
static bool ruleset_load_names(struct name_translation *pname, const char *domain, struct section_file *file, const char *sec_name)
#define ROAD_SECTION_PREFIX
static const char * valid_ruleset_filename(const char *subdir, const char *name, const char *extension, bool optional)
static bool load_action_range_max(struct section_file *file, action_id act)
static bool load_muuk_as_action_auto(struct section_file *file, struct action_auto_perf *auto_perf, const char *item, const char *filename)
#define NATION_SET_SECTION_PREFIX
#define RS_DEFAULT_CONVERT_SPEED
#define RS_DEFAULT_DAMAGE_REDUCES_BOMBARD_RATE
#define RS_DEFAULT_WORLD_PEACE_TURNS
#define RS_DEFAULT_TECH_TRADE_LOSS_HOLES
#define RS_DEFAULT_TECH_COST_STYLE
#define RS_DEFAULT_EXTRA_APPEARANCE
#define RS_DEFAULT_TECH_PARASITE_HOLES
#define GAME_DEFAULT_ACH_VALUE
#define RS_DEFAULT_TECH_TRADE_HOLES
#define RS_DEFAULT_CULTURE_VIC_POINTS
#define RS_DEFAULT_CULTURE_MIGRATION_PML
void(* rs_conversion_logger)(const char *msg)
#define RS_DEFAULT_SMALL_WONDER_VISIBILITY
#define ruleset_error(logger, level, format,...)
#define RS_DEFAULT_ONLY_KILLING_VETERAN
#define RS_DEFAULT_TECH_LOSS_HOLES
#define RS_DEFAULT_HISTORY_INTEREST_PML
#define RS_DEFAULT_TECH_UPKEEP_STYLE
#define RS_DEFAULT_GOODS_SELECTION
#define RS_DEFAULT_PYTHAGOREAN_DIAGONAL
#define RS_DEFAULT_TECH_STEAL_HOLES
#define RS_MIN_MIN_TECH_COST
#define GAME_DEFAULT_ACH_UNIQUE
#define RS_MAX_BASE_TECH_COST
#define RS_DEFAULT_COMBAT_ODDS_SCALED_VETERANCY
#define RS_DEFAULT_MUUK_FOOD_WIPE
#define RS_DEFAULT_MUUK_GOLD_WIPE
#define RS_DEFAULT_BASE_TECH_COST
#define RS_DEFAULT_NATIONALITY
#define GAME_DEFAULT_CHANGABLE_TAX
#define RS_DEFAULT_MUUK_SHIELD_WIPE
#define RS_DEFAULT_GOLD_UPKEEP_STYLE
#define GAME_DEFAULT_ADDTOSIZE
#define RS_DEFAULT_ONLY_REAL_FIGHT_VETERAN
#define RS_DEFAULT_EXTRA_DISAPPEARANCE
#define RS_MAX_MIN_TECH_COST
#define RS_DEFAULT_MIN_TECH_COST
#define GAME_DEFAULT_VISION_REVEAL_TILES
#define RS_DEFAULT_CULTURE_VIC_LEAD
#define RS_DEFAULT_TECH_LEAKAGE
#define GAME_DEFAULT_DISASTER_FREQ
#define RS_MIN_BASE_TECH_COST
static struct compatibility compat[]
bool script_server_init(void)
bool script_server_load_file(const char *filename, char **buf)
void script_server_free(void)
bool script_server_do_file(struct connection *caller, const char *filename)
struct setting_list * level[OLEVELS_NUM]
bool settings_ruleset(struct section_file *file, const char *section, bool act, bool compat)
sex_t sex_by_name(const char *name)
bool check_strlen(const char *str, size_t len, const char *errmsg)
const char * fileinfoname(const struct strvec *dirs, const char *filename)
void remove_leading_trailing_spaces(char *s)
const struct strvec * get_data_dirs(void)
struct specialist * specialist_by_rule_name(const char *name)
struct specialist * specialist_by_number(const Specialist_type_id id)
Specialist_type_id specialist_index(const struct specialist *sp)
const char * specialist_rule_name(const struct specialist *sp)
#define specialist_type_iterate_end
#define specialist_type_iterate(sp)
#define DEFAULT_SPECIALIST
const char * aifill(int amount)
void update_nations_with_startpos(void)
void strvec_store(struct strvec *psv, const char *const *vec, size_t size)
struct strvec * strvec_new(void)
bool actor_consuming_always
char ui_name[MAX_LEN_NAME]
bv_action_sub_results sub_results
enum action_actor_kind actor_kind
enum action_target_kind target_kind
struct advance * require[AR_SIZE]
enum base_gui_type gui_type
struct civ_game::@32::@36::@42 ruledit
const char ** allowed_govs
struct rgbcolor * plr_bg_color
struct packet_ruleset_control control
int global_init_techs[MAX_NUM_TECH_LIST]
struct packet_game_info info
int autoupgrade_veteran_loss
char rulesetdir[MAX_LEN_NAME]
int incite_improvement_factor
struct section_file * luadata
int global_init_buildings[MAX_NUM_BUILDING_LIST]
struct trait_limits default_traits[TRAIT_COUNT]
const char ** allowed_terrains
char * ruleset_description
const char ** allowed_styles
struct civ_game::@31 rgame
size_t embedded_nations_count
char * ruleset_capabilities
struct civ_game::@32::@36 server
struct veteran_system * veteran
bool homeless_gold_upkeep
struct packet_calendar_info calendar
struct government * default_government
struct civ_game::@32::@36::@37 deprecated
struct government * government_during_revolution
struct civ_map::@44::@46 server
struct requirement_vector receiver_reqs
struct requirement_vector giver_reqs
struct requirement_vector either_reqs
enum unit_type_flag_id flag
enum combat_bonus_type type
char graphic_str[MAX_LEN_NAME]
char graphic_alt2[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct requirement_vector obsolete_by
char soundtag_alt[MAX_LEN_NAME]
char soundtag_alt2[MAX_LEN_NAME]
struct requirement_vector reqs
struct name_translation name
char soundtag[MAX_LEN_NAME]
enum barbarian_type barb_type
char calendar_fragment_name[MAX_CALENDAR_FRAGMENTS][MAX_LEN_NAME]
char negative_year_label[MAX_LEN_NAME]
char positive_year_label[MAX_LEN_NAME]
bool tech_steal_allow_holes
int illness_trade_infection
enum gameloss_style gameloss_style
int citizen_partisans_pct
int granary_food_ini[MAX_GRANARY_INIS]
enum goods_selection_method goods_selection
Government_type_id government_during_revolution_id
enum gold_upkeep_style gold_upkeep_style
int low_firepower_pearl_harbor
bool damage_reduces_bombard_rate
int nuke_defender_survival_chance_pct
enum tech_upkeep_style tech_upkeep_style
bool tech_trade_loss_allow_holes
enum free_tech_method free_tech_method
bool steal_maps_reveals_all_cities
bool only_real_fight_makes_veteran
int citizen_convert_speed
int illness_pollution_factor
enum tech_leakage_style tech_leakage
bool reveal_trade_partner
int min_city_center_output[O_LAST]
bool airlift_from_always_enabled
bool only_killing_makes_veteran
bool poison_empties_food_stock
bool tech_loss_allow_holes
bv_actions diplchance_initial_odds
bool tech_trade_allow_holes
int low_firepower_nonnat_bombard
bool tech_parasite_allow_holes
int low_firepower_combat_bonus
int culture_migration_pml
int border_city_permanent_radius_sq
int low_firepower_badwallattacker
bool airlift_to_always_enabled
enum wonder_visib_type small_wonder_visibility
enum tech_cost_style tech_cost_style
bool combat_odds_scaled_veterancy
bool unit_builders_nationality
int border_city_radius_sq
Government_type_id default_government_id
char rule_name[MAX_LEN_NAME]
enum achievement_type type
action_id alternatives[MAX_NUM_ACTIONS]
struct requirement_vector reqs
enum action_auto_perf_cause cause
struct requirement_vector actor_reqs
struct requirement_vector target_reqs
char ui_name[MAX_LEN_NAME]
enum action_sub_target_kind sub_tgt_kind
enum action_actor_kind act_kind
bool actor_consuming_always
bv_action_sub_results sub_results
enum action_target_kind tgt_kind
enum action_result result
enum base_gui_type gui_type
char graphic_alt2[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
struct requirement_vector reqs
struct requirement_vector obs_reqs
char soundtag_alt2[MAX_LEN_NAME]
char soundtag[MAX_LEN_NAME]
char soundtag_alt[MAX_LEN_NAME]
struct requirement_vector giver_reqs
struct requirement_vector receiver_reqs
struct requirement_vector either_reqs
char alt_dir[MAX_LEN_NAME]
char version[MAX_LEN_NAME]
int num_achievement_types
char preferred_musicset[MAX_LEN_NAME]
char preferred_tileset[MAX_LEN_NAME]
int num_normal_specialists
char preferred_soundset[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
enum counter_behavior behavior
char rule_name[MAX_LEN_NAME]
struct requirement_vector reqs
bv_disaster_effects effects
struct requirement_vector reqs
char rule_name[MAX_LEN_NAME]
char helptxt[MAX_LEN_PACKET]
char sound_alt2[MAX_LEN_NAME]
char sound_str[MAX_LEN_NAME]
struct requirement_vector reqs
char graphic_alt[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char sound_alt[MAX_LEN_NAME]
char helptxt[MAX_LEN_PACKET]
struct requirement_vector reqs
char rule_name[MAX_LEN_NAME]
struct requirement_vector reqs
char music_peaceful[MAX_LEN_NAME]
char music_combat[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
bool leader_is_male[MAX_NUM_LEADERS]
int sets[MAX_NUM_NATION_SETS]
Impr_type_id init_buildings[MAX_NUM_BUILDING_LIST]
char adjective[MAX_LEN_NAME]
char translation_domain[MAX_LEN_NAME]
char leader_name[MAX_NUM_LEADERS][MAX_LEN_NAME]
int init_techs[MAX_NUM_TECH_LIST]
Unit_type_id init_units[MAX_NUM_UNIT_LIST]
int groups[MAX_NUM_NATION_GROUPS]
Government_type_id init_government_id
enum barbarian_type barbarian_type
char noun_plural[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
enum road_gui_type gui_type
int tile_incr_const[O_LAST]
enum road_move_mode move_mode
struct requirement_vector first_reqs
char plural_name[MAX_LEN_NAME]
struct requirement_vector reqs
char rule_name[MAX_LEN_NAME]
char short_name[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char text[MAX_LEN_CONTENT]
char rule_name[MAX_LEN_NAME]
char helptxt[MAX_LEN_PACKET]
char graphic_str[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct requirement_vector research_reqs
char helptxt[MAX_LEN_PACKET]
Terrain_type_id transform_result
int animals[MAX_NUM_ANIMALS]
int resource_freq[MAX_EXTRA_TYPES]
Resource_type_id resources[MAX_EXTRA_TYPES]
char graphic_alt[MAX_LEN_NAME]
bv_unit_classes native_to
int road_output_incr_pct[O_LAST]
char graphic_alt2[MAX_LEN_NAME]
Terrain_type_id cultivate_result
int extra_removal_times[MAX_EXTRA_TYPES]
Terrain_type_id plant_result
char rule_name[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
enum trade_route_illegal_cancelling cancelling
enum trade_route_bonus_type bonus_type
char helptxt[MAX_LEN_PACKET]
bv_unit_class_flags flags
char rule_name[MAX_LEN_NAME]
char helptxt[MAX_LEN_PACKET]
enum transp_def_type tp_defense
char rule_name[MAX_LEN_NAME]
int base_raise_chance[MAX_VET_LEVELS]
int move_bonus[MAX_VET_LEVELS]
int work_raise_chance[MAX_VET_LEVELS]
char sound_move[MAX_LEN_NAME]
bv_unit_classes disembarks
char sound_fight_alt[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
struct requirement_vector build_reqs
int power_fact[MAX_VET_LEVELS]
char veteran_name[MAX_VET_LEVELS][MAX_LEN_NAME]
char sound_fight[MAX_LEN_NAME]
char sound_move_alt[MAX_LEN_NAME]
char graphic_alt2[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
enum road_gui_type gui_type
struct requirement_vector first_reqs
enum road_move_mode move_mode
int tile_incr_const[O_LAST]
struct requirement_vector reqs
char graphic_alt[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
struct name_translation name
struct name_translation abbreviation
enum trade_route_bonus_type bonus_type
enum trade_route_illegal_cancelling cancelling
struct veteran_level * definitions
struct nation_style * style_by_rule_name(const char *name)
struct nation_style * style_by_number(int id)
void styles_alloc(int count)
struct music_style * music_style_by_number(int id)
int style_number(const struct nation_style *pstyle)
void music_styles_alloc(int count)
int style_index(const struct nation_style *pstyle)
#define music_styles_iterate(_p)
#define music_styles_iterate_end
#define styles_iterate(_p)
#define styles_iterate_end
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
int fc_strcasecmp(const char *str0, const char *str1)
size_t fc_strlcat(char *dest, const char *src, size_t n)
int fc_vsnprintf(char *str, size_t n, const char *format, va_list ap)
#define sz_strlcpy(dest, src)
#define RETURN_VALUE_AFTER_EXIT(_val_)
struct team_slot * team_slot_by_number(int team_id)
const char * team_slot_defined_name(const struct team_slot *tslot)
int team_slot_index(const struct team_slot *tslot)
int team_slot_count(void)
void team_slot_set_defined_name(struct team_slot *tslot, const char *team_name)
#define team_slots_iterate_end
#define team_slots_iterate(_tslot)
struct advance * advance_by_number(const Tech_type_id atype)
const char * tech_flag_id_name_cb(enum tech_flag_id flag)
void set_user_tech_flag_name(enum tech_flag_id id, const char *name, const char *helptxt)
struct advance * valid_advance(struct advance *padvance)
void techs_precalc_data(void)
const char * advance_rule_name(const struct advance *padvance)
const char * tech_flag_helptxt(enum tech_flag_id id)
struct advance * advance_by_rule_name(const char *name)
struct tech_class * tech_class_by_rule_name(const char *name)
Tech_type_id advance_number(const struct advance *padvance)
#define tech_class_index(_ptclass_)
#define tech_class_iterate_end
#define MAX_NUM_USER_TECH_FLAGS
#define advance_iterate_all_end
#define advance_iterate_all(_p)
static Tech_type_id advance_count(void)
#define advance_iterate(_p)
#define tech_class_iterate(_p)
#define advance_iterate_end
struct terrain * terrain_by_rule_name(const char *name)
Terrain_type_id terrain_count(void)
const char * terrain_flag_id_name_cb(enum terrain_flag_id flag)
Terrain_type_id terrain_index(const struct terrain *pterrain)
struct terrain * terrain_by_number(const Terrain_type_id type)
const char * terrain_flag_helptxt(enum terrain_flag_id id)
struct resource_type * resource_type_init(struct extra_type *pextra)
void set_user_terrain_flag_name(enum terrain_flag_id id, const char *name, const char *helptxt)
Terrain_type_id terrain_number(const struct terrain *pterrain)
#define RESOURCE_FREQUENCY_MAXIMUM
#define terrain_type_iterate(_p)
#define terrain_animals_iterate(pterrain, _animal)
#define TERRAIN_UNKNOWN_IDENTIFIER
#define terrain_type_iterate_end
#define RESOURCE_NONE_IDENTIFIER
#define RESOURCE_NULL_IDENTIFIER
#define RESOURCE_FREQUENCY_MINIMUM
#define MAX_NUM_USER_TER_FLAGS
#define terrain_resources_iterate_end
#define terrain_resources_iterate(pterrain, _res, _freq)
#define terrain_animals_iterate_end
#define RESOURCE_FREQUENCY_DEFAULT
int tiledef_number(const struct tiledef *td)
struct tiledef * tiledef_by_number(int id)
#define tiledef_index(_td_)
#define tiledef_iterate_end
#define tiledef_iterate(_p)
Goods_type_id goods_number(const struct goods_type *pgood)
enum trade_route_illegal_cancelling trade_route_cancelling_type_by_name(const char *name)
struct trade_route_settings * trade_route_settings_by_type(enum trade_route_type type)
const char * goods_rule_name(struct goods_type *pgood)
Goods_type_id goods_index(const struct goods_type *pgood)
enum trade_route_type trade_route_type_by_name(const char *name)
#define goods_type_iterate_end
#define goods_type_iterate(_p)
#define TRAIT_DEFAULT_VALUE
void set_unit_class_caches(struct unit_class *pclass)
const char * unit_class_flag_helptxt(enum unit_class_flag_id id)
struct unit_type * unit_type_by_rule_name(const char *name)
bool utype_has_role(const struct unit_type *punittype, int role)
void unit_type_action_cache_init(void)
void set_unit_type_caches(struct unit_type *ptype)
void role_unit_precalcs(void)
void veteran_system_definition(struct veteran_system *vsystem, int level, const char *vlist_name, int vlist_power, int vlist_move, int vlist_raise, int vlist_wraise)
Unit_type_id utype_count(void)
int utype_veteran_levels(const struct unit_type *punittype)
const char * utype_rule_name(const struct unit_type *punittype)
const struct veteran_level * utype_veteran_level(const struct unit_type *punittype, int level)
const char * uclass_rule_name(const struct unit_class *pclass)
Unit_type_id utype_number(const struct unit_type *punittype)
struct unit_class * unit_class_by_rule_name(const char *s)
const char * unit_type_flag_helptxt(enum unit_type_flag_id id)
Unit_type_id utype_index(const struct unit_type *punittype)
void set_user_unit_class_flag_name(enum unit_class_flag_id id, const char *name, const char *helptxt)
struct veteran_system * veteran_system_new(int count)
Unit_Class_id uclass_number(const struct unit_class *pclass)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
void set_user_unit_type_flag_name(enum unit_type_flag_id id, const char *name, const char *helptxt)
static bool uclass_has_flag(const struct unit_class *punitclass, enum unit_class_flag_id flag)
#define combat_bonus_list_iterate_end
#define combat_bonus_list_iterate(bonuslist, pbonus)
#define unit_tech_reqs_iterate_end
#define unit_class_iterate(_p)
#define unit_tech_reqs_iterate(_utype_, _p)
#define MAX_NUM_USER_UNIT_FLAGS
static bool utype_has_flag(const struct unit_type *punittype, int flag)
#define UTYF_LAST_USER_FLAG
#define unit_type_iterate(_p)
#define uclass_index(_c_)
#define unit_class_iterate_end
#define unit_type_iterate_end
#define MAX_NUM_USER_UCLASS_FLAGS