40 #define UTYF_LAST_USER_FLAG_3_0 UTYF_USER_FLAG_40
41 #define UCF_LAST_USER_FLAG_3_0 UCF_USER_FLAG_8
42 #define TER_LAST_USER_FLAG_3_0 TER_USER_8
54 const char *datafile_options =
59 if (!datafile_options) {
60 qCCritical(ruleset_category,
61 "\"%s\": ruleset capability problem:", filename);
80 qCCritical(ruleset_category,
81 "\"%s\": ruleset datafile appears incompatible:", filename);
82 qCCritical(ruleset_category,
" datafile options: %s",
84 qCCritical(ruleset_category,
" supported options: %s",
86 qCCritical(ruleset_category,
"Capability problem");
91 qCCritical(ruleset_category,
92 "\"%s\": ruleset datafile claims required option(s)"
93 " that we don't support:",
95 qCCritical(ruleset_category,
" datafile options: %s",
97 qCCritical(ruleset_category,
" supported options: %s",
99 qCCritical(ruleset_category,
"Capability problem");
106 qCritical(
"\"%s\": lacking legal format_version field", filename);
110 }
else if (format == 0) {
111 qCritical(
"\"%s\": Illegal format_version value", filename);
112 qCCritical(ruleset_category,
"Format version error");
132 bool needs_restart =
false;
142 qCritical(
"Dropping an action enabler for %s."
143 " Don't know how to fix: %s.",
163 qCritical(
"While adding hard obligatory reqs to action enabler"
164 " for %s: %s Dropping it.",
185 "Failed to apply solution %s for %s to action enabler"
186 " for %s. Dropping it.",
202 new_enabler =
nullptr;
208 needs_restart =
true;
220 return needs_restart;
231 bool restart_enablers_for_action;
233 restart_enablers_for_action =
false;
244 restart_enablers_for_action =
true;
249 }
while (restart_enablers_for_action);
285 unit_class_flag_id(flag + UCF_USER_FLAG_1))
332 const std::vector<new_flags> new_flags_31 = {
334 N_(
"Won't lose all movement when moving from"
335 " non-native terrain to native terrain.")},
346 const std::vector<new_flags> new_class_flags_31 = {
347 new_flags{
N_(
"Missile"),
N_(
"Unit is destroyed when it attacks")},
348 new_flags{
N_(
"CanPillage"),
N_(
"Can pillage tile improvements.")},
349 new_flags{
N_(
"CanFortify"),
N_(
"Gets a 50% defensive bonus while"
362 for (i = 0; i < new_flags_31.size(); i++) {
365 qCCritical(ruleset_category,
366 "Can't upgrade the ruleset. Not enough free unit type "
367 "user flags to add user flags for the unit type flags "
368 "that used to be hardcoded.");
374 != unit_type_flag_id_invalid()) {
375 qCCritical(ruleset_category,
376 "Ruleset had illegal user unit type flag '%s'",
377 new_flags_31[i].
name);
381 new_flags_31[i].
name,
382 new_flags_31[i].helptxt);
388 for (i = 0; i < new_class_flags_31.size(); i++) {
391 qCCritical(ruleset_category,
392 "Can't upgrade the ruleset. Not enough free unit "
393 "type class user flags to add user flags for the "
394 "unit type class flags that used to be hardcoded.");
399 if (unit_class_flag_id_by_name(new_class_flags_31[i].
name,
401 != unit_class_flag_id_invalid()) {
402 qCCritical(ruleset_category,
403 "Ruleset had illegal user unit class flag '%s'",
404 new_class_flags_31[i].
name);
408 new_class_flags_31[i].
name,
409 new_class_flags_31[i].helptxt);
418 const std::vector<new_flags> new_flags_31 = {
420 N_(
"No units can fortify on this terrain.")},
432 for (i = 0; i < new_flags_31.size(); i++) {
435 qCCritical(ruleset_category,
436 "Can't upgrade the ruleset. Not enough free terrain "
437 "user flags to add user flags for the terrain flags "
438 "that used to be hardcoded.");
444 != terrain_flag_id_invalid()) {
445 qCCritical(ruleset_category,
446 "Ruleset had illegal user terrain flag '%s'",
447 new_flags_31[i].
name);
451 new_flags_31[i].
name,
452 new_flags_31[i].helptxt);
516 ACTION_SPY_SABOTAGE_CITY_PRODUCTION));
520 ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC),
522 ACTION_SPY_SABOTAGE_CITY_PRODUCTION_ESC));
524 if (peffect->
type == EFT_ILLEGAL_ACTION_MOVE_COST) {
533 "Transport Embark"));
539 "Transport Disembark"));
542 "Transport Disembark 2"));
554 const char *sec_name,
563 struct requirement_vector *
reqs;
575 settler_req =
req_from_values(VUT_UTFLAG, REQ_RANGE_LOCAL,
false,
true,
576 false, UTYF_SETTLERS);
577 requirement_vector_append(&enabler->
actor_reqs, settler_req);
582 if (
compat->log_cb !=
nullptr) {
584 "Converted effect %s in %s to an action enabler. Make "
586 "are correctly divided to actor and target requirements.",
590 }
else if (value < 0) {
591 if (
compat->log_cb !=
nullptr) {
593 "%s effect with negative value in %s can't be "
594 "automatically converted "
595 "to an action enabler. Do that manually.",
607 const char *sec_name,
610 if (
compat->ver_effects < 20) {
675 true,
"Expel Unit"));
683 true,
"Capture Units"));
687 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST, 1,
nullptr);
691 true,
"Establish Embassy"));
695 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST, 1,
nullptr);
699 true,
"Investigate City"));
708 true,
"Expel Unit"));
720 if (putype->rscompat_cache.paratroopers_mr_sub == 0) {
728 putype->rscompat_cache.paratroopers_mr_sub,
nullptr);
732 false,
"Paradrop Unit"));
742 peffect =
effect_new(EFT_FORTIFY_DEFENSE_BONUS, 50,
nullptr);
748 false,
"Fortified"));
751 peffect =
effect_new(EFT_FORTIFY_DEFENSE_BONUS, 50,
nullptr);
758 false,
false,
"Fortified"));
761 true,
false,
"CanFortify"));
763 false,
false,
"Cant_Fortify"));
767 peffect =
effect_new(EFT_MAPS_STOLEN_PCT, -50,
nullptr);
771 peffect =
effect_new(EFT_UNIT_SHIELD_VALUE_PCT, -50,
nullptr);
773 false,
"Recycle Unit"));
777 peffect =
effect_new(EFT_UNIT_SHIELD_VALUE_PCT, -50,
nullptr);
779 false,
"Upgrade Unit"));
788 enabler->
action = ACTION_PILLAGE;
789 e_req =
req_from_str(
"UnitClassFlag",
"Local",
false,
true,
false,
791 requirement_vector_append(&enabler->
actor_reqs, e_req);
795 enabler->
action = ACTION_CLEAN_FALLOUT;
796 e_req =
req_from_values(VUT_UTFLAG, REQ_RANGE_LOCAL,
false,
true,
false,
798 requirement_vector_append(&enabler->
actor_reqs, e_req);
802 enabler->
action = ACTION_CLEAN_POLLUTION;
803 e_req =
req_from_values(VUT_UTFLAG, REQ_RANGE_LOCAL,
false,
true,
false,
805 requirement_vector_append(&enabler->
actor_reqs, e_req);
809 enabler->
action = ACTION_FORTIFY;
810 e_req =
req_from_str(
"UnitClassFlag",
"Local",
false,
true,
true,
812 requirement_vector_append(&enabler->
actor_reqs, e_req);
813 e_req =
req_from_str(
"UnitFlag",
"Local",
false,
false,
true,
815 requirement_vector_append(&enabler->
actor_reqs, e_req);
816 e_req =
req_from_str(
"TerrainFlag",
"Local",
false,
false,
true,
818 requirement_vector_append(&enabler->
actor_reqs, e_req);
822 enabler->
action = ACTION_FORTIFY;
823 e_req =
req_from_str(
"UnitClassFlag",
"Local",
false,
true,
true,
825 requirement_vector_append(&enabler->
actor_reqs, e_req);
826 e_req =
req_from_str(
"UnitFlag",
"Local",
false,
false,
true,
828 requirement_vector_append(&enabler->
actor_reqs, e_req);
829 e_req =
req_from_str(
"CityTile",
"Local",
false,
true,
true,
"Center");
830 requirement_vector_append(&enabler->
actor_reqs, e_req);
834 enabler->
action = ACTION_ROAD;
835 e_req =
req_from_values(VUT_UTFLAG, REQ_RANGE_LOCAL,
false,
true,
false,
837 requirement_vector_append(&enabler->
actor_reqs, e_req);
841 enabler->
action = ACTION_CONVERT;
845 enabler->
action = ACTION_BASE;
846 e_req =
req_from_values(VUT_UTFLAG, REQ_RANGE_LOCAL,
false,
true,
false,
848 requirement_vector_append(&enabler->
actor_reqs, e_req);
852 enabler->
action = ACTION_TRANSPORT_ALIGHT;
856 enabler->
action = ACTION_TRANSPORT_BOARD;
860 enabler->
action = ACTION_TRANSPORT_EMBARK;
864 enabler->
action = ACTION_TRANSPORT_UNLOAD;
873 if (ae->action == ACTION_ATTACK) {
878 requirement_vector_append(
879 &ae->actor_reqs,
req_from_str(
"UnitClassFlag",
"Local",
false,
880 false,
true,
"Missile"));
883 enabler->
action = ACTION_SUICIDE_ATTACK;
884 requirement_vector_append(&enabler->
actor_reqs,
895 if (ae->action == ACTION_NUKE) {
906 city->action = ACTION_NUKE_CITY;
910 units->
action = ACTION_NUKE_UNITS;
915 requirement_vector_append(
917 false,
true,
false, 1));
920 REQ_RANGE_LOCAL,
false,
927 requirement_vector_append(
929 false,
true,
false, DS_WAR));
930 requirement_vector_append(
932 false,
true,
false, DS_WAR));
935 requirement_vector_append(
938 false, CITYT_CENTER));
947 if (ae->action == ACTION_SPY_TARGETED_SABOTAGE_CITY) {
951 enabler->
action = ACTION_SPY_SABOTAGE_CITY_PRODUCTION;
959 if (ae->action == ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC) {
963 enabler->
action = ACTION_SPY_SABOTAGE_CITY_PRODUCTION_ESC;
974 bool generic_in_use =
false;
975 struct action_enabler_list *ae_custom = action_enabler_list_new();
983 &(ae->actor_reqs))) {
990 if (preq->source.kind == VUT_MINMOVES) {
991 if (!preq->present) {
994 if (preq->source.value.minmoves
995 < putype->rscompat_cache.paratroopers_mr_req) {
1004 if (putype->rscompat_cache.paratroopers_mr_req > 0) {
1012 requirement_vector_append(&enabler->
actor_reqs, e_req);
1016 VUT_MINMOVES, REQ_RANGE_LOCAL,
false,
true,
false,
1017 putype->rscompat_cache.paratroopers_mr_req);
1018 requirement_vector_append(&enabler->
actor_reqs, e_req);
1020 action_enabler_list_append(ae_custom, enabler);
1022 log_debug(
"paratroopers_mr_req upgrade: %s uses custom enabler",
1027 generic_in_use =
true;
1029 log_debug(
"paratroopers_mr_req upgrade: %s uses generic enabler",
1035 if (!generic_in_use) {
1049 action_enabler_list_destroy(ae_custom);
1056 for (i = 0; i < CLAUSE_COUNT; i++) {
1084 if (peffect->
type == EFT_UNIT_VISION_RADIUS_SQ
1085 || peffect->
type == EFT_CITY_VISION_RADIUS_SQ) {
1087 true,
false,
"Main"));
1099 for (
int i = 0; i < NI_COUNT; ++i) {
1100 switch (
static_cast<national_intelligence
>(i)) {
1111 false,
true,
false, i));
1120 false,
true,
false, i));
1123 true,
false, DRO_HAS_CONTACT));
1128 case NI_MULTIPLIERS:
1133 false,
true,
false, i));
1136 true,
false, DRO_HAS_EMBASSY));
1156 if (uclass->hp_loss_pct > 0) {
1167 false,
"Fortified"));
1180 if (uclass->hp_loss_pct > 0) {
1193 false,
"Fortified"));
1200 effect_new(EFT_BOMBARD_LIMIT_PCT, 1,
nullptr);
1203 if (putype->hp > 100) {
1204 qCWarning(ruleset_category,
1205 "Ruleset has units (such as '%s"
1206 "') for which bombard limit changed as hp > 100",
1218 true,
false,
"GreatWonder"));
1227 false,
false,
"Main"));
1242 enum unit_type_flag_id *protecor_flag)
1246 if (
compat->ver_game < 20) {
1248 requirement_vector_append(&auto_perf->
reqs,
1250 false,
true,
true, DS_WAR));
1253 requirement_vector_append(&auto_perf->
reqs,
1255 false,
true,
true, 1));
1257 for (i = 0; i < psize; i++) {
1259 requirement_vector_append(&auto_perf->
reqs,
1278 bool slow_invasions)
1280 if (
compat->ver_effects < 20 &&
compat->ver_game < 20) {
1288 enabler->
action = ACTION_TRANSPORT_DISEMBARK1;
1290 if (slow_invasions) {
1294 true, USP_NATIVE_TILE);
1295 requirement_vector_append(&enabler->
actor_reqs, e_req);
1300 if (slow_invasions) {
1306 struct action_enabler_list *to_upgrade;
1315 paction->
quiet =
true;
1325 paction->
quiet =
true;
1334 enabler->
action = ACTION_TRANSPORT_DISEMBARK1;
1336 true, CITYT_CENTER);
1337 requirement_vector_append(&enabler->
actor_reqs, e_req);
1342 enabler->
action = ACTION_TRANSPORT_DISEMBARK1;
1344 true, UCF_TERRAIN_SPEED);
1345 requirement_vector_append(&enabler->
actor_reqs, e_req);
1350 enabler->
action = ACTION_TRANSPORT_DISEMBARK1;
1351 e_req =
req_from_str(
"UnitFlag",
"Local",
false,
true,
true,
1353 requirement_vector_append(&enabler->
actor_reqs, e_req);
1358 enabler->
action = ACTION_TRANSPORT_DISEMBARK2;
1362 true, USP_NATIVE_TILE);
1363 requirement_vector_append(&enabler->
actor_reqs, e_req);
1367 true, CITYT_CENTER);
1368 requirement_vector_append(&enabler->
actor_reqs, e_req);
1371 e_req =
req_from_str(
"UnitFlag",
"Local",
false,
false,
true,
1373 requirement_vector_append(&enabler->
actor_reqs, e_req);
1376 e_req =
req_from_values(VUT_UCFLAG, REQ_RANGE_LOCAL,
false,
true,
true,
1378 requirement_vector_append(&enabler->
actor_reqs, e_req);
1392 "Transport Disembark 2"));
1397 false,
true,
true, USP_NATIVE_TILE));
1405 true,
"Conquer City 2"));
1410 false,
true,
true, USP_NATIVE_TILE));
1413 to_upgrade = action_enabler_list_copy(
1421 true, CITYT_CENTER);
1422 requirement_vector_append(&enabler->
actor_reqs, e_req);
1432 true, UCF_TERRAIN_SPEED);
1433 requirement_vector_append(&enabler->
actor_reqs, e_req);
1442 e_req =
req_from_str(
"UnitFlag",
"Local",
false,
true,
true,
1444 requirement_vector_append(&enabler->
actor_reqs, e_req);
1453 enabler->
action = ACTION_CONQUER_CITY2;
1457 true, USP_NATIVE_TILE);
1458 requirement_vector_append(&enabler->
actor_reqs, e_req);
1462 true, CITYT_CENTER);
1463 requirement_vector_append(&enabler->
actor_reqs, e_req);
1467 true, UCF_TERRAIN_SPEED);
1468 requirement_vector_append(&enabler->
actor_reqs, e_req);
1471 e_req =
req_from_str(
"UnitFlag",
"Local",
false,
false,
true,
1473 requirement_vector_append(&enabler->
actor_reqs, e_req);
1484 true, USP_NATIVE_TILE);
1485 requirement_vector_append(&conquer_city_enabler->actor_reqs, e_req);
1489 action_enabler_list_destroy(to_upgrade);
1516 const char *old_type)
1530 pextra->
rmcauses |= (1 << ERM_ENTER);
const char * action_rule_name(const struct action *action)
Get the rule name of the action.
struct action_enabler * action_enabler_copy(const struct action_enabler *original)
Create a new copy of an existing action enabler.
struct req_vec_problem * action_enabler_suggest_repair(const struct action_enabler *enabler)
Returns a suggestion to fix the specified action enabler or nullptr if no fix is found to be needed.
struct requirement_vector * action_enabler_vector_by_number(const void *enabler, req_vec_num_in_item number)
Returns a writable pointer to the specified requirement vector in the action enabler or nullptr if th...
struct action_enabler * action_enabler_new()
Create a new action enabler.
void action_enabler_add(struct action_enabler *enabler)
Add an action enabler to the current ruleset.
struct action * action_by_number(action_id act_id)
Return the action with the given id.
bool action_enabler_remove(struct action_enabler *enabler)
Remove an action enabler from the current ruleset.
const char * action_enabler_vector_by_number_name(req_vec_num_in_item vec)
Returns the name of the given requirement vector number n in an action enabler or nullptr if enablers...
struct action_enabler_list * action_enablers_for_action(action_id action)
Get all enablers for an action in the current ruleset.
#define action_enablers_iterate_end
#define action_enabler_list_iterate_end
#define action_iterate_end
#define action_enablers_iterate(_enabler_)
#define action_enabler_list_iterate(action_enabler_list, aenabler)
#define action_iterate(_act_)
bool has_capability(const char *cap, const char *capstr)
Wrapper for fc_has_capability() for nullptr terminated strings.
bool has_capabilities(const char *us, const char *them)
This routine returns true if all the mandatory capabilities in us appear in them.
struct clause_info * clause_info_get(enum clause_type type)
Free memory associated with clause infos.
bool iterate_effect_cache(iec_cb cb, void *data)
Iterate through all the effects in cache, and call callback for each.
struct effect * effect_copy(struct effect *old)
Return new copy of the effect.
struct effect * effect_new(enum effect_type type, int value, struct multiplier *pmul)
Add effect to ruleset cache.
void effect_req_append(struct effect *peffect, struct requirement req)
Append requirement to effect.
#define fc_assert_ret_val(condition, val)
#define log_debug(message,...)
const char * secfile_error()
Returns the last error which occurred in a string.
bool secfile_lookup_int(const struct section_file *secfile, int *ival, const char *path,...)
Lookup a integer value in the secfile.
const char * secfile_lookup_str(const struct section_file *secfile, const char *path,...)
Lookup a string value in the secfile.
int secfile_lookup_int_default(const struct section_file *secfile, int def, const char *path,...)
Lookup a integer value in the secfile.
bool req_vec_change_apply(const struct req_vec_change *modification, requirement_vector_by_number getter, const void *parent_item)
Returns TRUE iff the specified requirement vector modification was successfully applied to the specif...
struct requirement req_from_str(const char *type, const char *range, bool survives, bool present, bool quiet, const char *value)
Parse a requirement type and value string into a requirement structure.
struct requirement req_from_values(int type, int range, bool survives, bool present, bool quiet, int value)
Set the values of a req from serializable integers.
bool universal_replace_in_req_vec(struct requirement_vector *reqs, const struct universal *to_replace, const struct universal *replacement)
Replaces all instances of the universal to_replace with replacement in the requirement vector reqs an...
void req_vec_problem_free(struct req_vec_problem *issue)
De-allocates resources associated with the given requirement vector problem.
struct universal universal_by_number(const enum universals_n kind, const int value)
Combine values into a universal structure.
bool universal_is_mentioned_by_requirements(const struct requirement_vector *reqs, const struct universal *psource)
Returns TRUE iff the universal 'psource' is directly mentioned by any of the requirements in 'reqs'.
const char * req_vec_change_translation(const struct req_vec_change *change, const requirement_vector_namer namer)
Returns the specified requirement vector change as a translated string ready for use in the user inte...
#define requirement_fulfilled_by_unit_type(_ut_, _rqs_)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
#define UTYF_LAST_USER_FLAG_3_0
void rscompat_enablers_add_obligatory_hard_reqs()
Update existing action enablers for new hard obligatory requirements.
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 ...
#define TER_LAST_USER_FLAG_3_0
static int first_free_terrain_user_flag()
Find and return the first unused terrain user flag.
const char * rscompat_req_name_3_1(const char *type, const char *old_name)
Replace deprecated requirement type names with currently valid ones.
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.
static bool rscompat_enabler_add_obligatory_hard_reqs(struct action_enabler *ae)
Add all hard obligatory requirements to an action enabler or disable it.
static bool rscompat_vision_effect_cb(struct effect *peffect, void *data)
Adds VisionLayer, Main, Local, True req to all unit/city vision reqs, as compat for missing CAP_VUT_V...
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.
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.
bool rscompat_names(struct rscompat_info *info)
Do compatibility things with names before they are referred to.
const char * rscompat_utype_flag_name_3_1(struct rscompat_info *compat, const char *old_type)
Replace deprecated unit type flag names with currently valid ones.
bool rscompat_old_slow_invasions_3_1(struct rscompat_info *compat, bool slow_invasions)
Replace slow_invasions and friends.
void rscompat_postprocess(struct rscompat_info *info)
Do compatibility things after regular ruleset loading.
#define UCF_LAST_USER_FLAG_3_0
static void rscompat_optional_capabilities(rscompat_info *info)
Handles compatibility with older versions when the new behavior is tied to the presence of an optiona...
static bool effect_list_compat_cb(struct effect *peffect, void *data)
Adjust effects.
static int first_free_unit_type_user_flag()
Find and return the first unused unit type user flag.
static int first_free_unit_class_user_flag()
Find and return the first unused unit class user flag.
static void effect_to_enabler(action_id action, struct section_file *file, const char *sec_name, struct rscompat_info *compat, const char *type)
Turn old effect to an action enabler.
static void rscompat_migrate_eft_nation_intelligence()
Adds effects to reproduce the traditional visibility of intelligence depending on the diplomatic stat...
static bool effect_handle_split_universal(struct effect *peffect, struct universal original, struct universal separated)
Handle a universal being separated from an original universal.
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.
#define RULESET_COMPAT_CAP
#define CAP_EFT_WONDER_VISIBLE
#define CAP_EFT_NATION_INTELLIGENCE
#define CAP_VUT_VISIONLAYER
#define CAP_EFT_BOMBARD_LIMIT_PCT
#define RULESET_CAPABILITIES
#define CAP_EFT_HP_REGEN_MIN
static struct compatibility compat[]
struct requirement_vector reqs
action_id alternatives[MAX_NUM_ACTIONS]
struct requirement_vector actor_reqs
struct requirement_vector target_reqs
char ui_name[MAX_LEN_NAME]
struct requirement_vector reqs
enum req_vec_change_operation operation
int num_suggested_solutions
struct req_vec_change * suggested_solutions
int fc_snprintf(char *str, size_t n, const char *format,...)
See also fc_utf8_snprintf_trunc(), fc_utf8_snprintf_rep().
int fc_strcasecmp(const char *str0, const char *str1)
Compare strings like strcmp(), but ignoring case.
#define sz_strlcpy(dest, src)
const char * terrain_flag_id_name_cb(enum terrain_flag_id flag)
Terrain flag name callback, called from specenum code.
void set_user_terrain_flag_name(enum terrain_flag_id id, const char *name, const char *helptxt)
Sets user defined name for terrain flag.
#define MAX_NUM_USER_TER_FLAGS
const char * unit_type_flag_id_name_cb(enum unit_type_flag_id flag)
Unit type flag name callback, called from specenum code.
const char * utype_rule_name(const struct unit_type *punittype)
Return the (untranslated) rule name of the unit type.
const char * utype_name_translation(const struct unit_type *punittype)
Return the (translated) name of the unit type.
Unit_type_id utype_number(const struct unit_type *punittype)
Return the unit type index.
const char * unit_class_flag_id_name_cb(enum unit_class_flag_id flag)
Unit class flag name callback, called from specenum code.
void set_user_unit_class_flag_name(enum unit_class_flag_id id, const char *name, const char *helptxt)
Sets user defined name for unit class flag.
const char * uclass_rule_name(const struct unit_class *pclass)
Return the (untranslated) rule name of the unit class.
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
Return TRUE iff units of the given type can do the specified generalized (ruleset defined) action ena...
void set_user_unit_type_flag_name(enum unit_type_flag_id id, const char *name, const char *helptxt)
Sets user defined name for unit flag.
#define UCF_LAST_USER_FLAG
#define unit_class_iterate(_p)
#define MAX_NUM_USER_UNIT_FLAGS
#define UTYF_LAST_USER_FLAG
#define unit_type_iterate(_p)
#define unit_class_iterate_end
#define unit_type_iterate_end
#define MAX_NUM_USER_UCLASS_FLAGS