99 case VUT_TERRAINCLASS:
108 case VUT_TERRAINALTER:
126 case VUT_NATIONALITY:
147 case VUT_ACHIEVEMENT:
156 case VUT_MAXTILEUNITS:
168 case VUT_MINFOREIGNPCT:
189 case VUT_NATIONGROUP:
198 case VUT_SERVERSETTING:
214 case VUT_VISIONLAYER:
236 switch (univ->
kind) {
248 if (!pgov.ruledit_disabled) {
255 case VUT_IMPROVEMENT:
302 case VUT_NATIONALITY:
322 for (i = 0; i < AI_LEVEL_COUNT; i++) {
323 cb(ai_level_name(ai_level(i)), univ->
value.
ai_level == i, data);
333 case VUT_TERRAINCLASS:
334 for (i = 0; i < TC_COUNT; i++) {
341 cb(unit_type_flag_id_name(unit_type_flag_id(i)),
346 for (i = 0; i < UCF_COUNT; i++) {
347 cb(unit_class_flag_id_name(unit_class_flag_id(i)),
352 for (i = 0; i < TER_USER_LAST; i++) {
353 cb(terrain_flag_id_name(terrain_flag_id(i)),
358 for (i = 0; i < BF_COUNT; i++) {
359 cb(base_flag_id_name(base_flag_id(i)), univ->
value.
baseflag == i,
364 for (i = 0; i < RF_COUNT; i++) {
365 cb(road_flag_id_name(road_flag_id(i)), univ->
value.
roadflag == i,
370 for (i = 0; i < TF_COUNT; i++) {
371 cb(tech_flag_id_name(tech_flag_id(i)), univ->
value.
techflag == i,
376 for (i = 0; i < EF_COUNT; i++) {
377 cb(extra_flag_id_name(extra_flag_id(i)), univ->
value.
extraflag == i,
381 case VUT_TERRAINALTER:
382 for (i = 0; i < TA_COUNT; i++) {
383 cb(terrain_alteration_name(terrain_alteration(i)),
388 for (i = 0; i < CITYT_LAST; i++) {
389 cb(citytile_type_name(citytile_type(i)), univ->
value.
citytile == i,
394 for (i = 0; i < CITYS_LAST; i++) {
395 cb(citystatus_type_name(citystatus_type(i)),
399 case VUT_ACHIEVEMENT:
407 for (i = 0; i < DS_LAST; i++) {
408 cb(diplstate_type_name(diplstate_type(i)), univ->
value.
diplrel == i,
411 for (; i < DRO_LAST; i++) {
412 cb(diplrel_other_name(diplrel_other(i)), univ->
value.
diplrel == i,
417 for (i = 0; i < USP_COUNT; i++) {
425 cb(unit_activity_name(act), univ->
value.
activity == act, data);
429 case VUT_NATIONGROUP:
439 cb(topo_flag_name(topo_flag(1 << i)),
443 case VUT_SERVERSETTING:
455 for (i = 0; i < IG_COUNT; i++) {
469 case VUT_VISIONLAYER:
470 for (i = 0; i < V_COUNT; i++) {
471 cb(vision_layer_name(vision_layer(i)), univ->
value.
vlayer == i, data);
475 for (i = 0; i < NI_COUNT; i++) {
476 cb(national_intelligence_name(
static_cast<national_intelligence
>(i)),
483 case VUT_MAXTILEUNITS:
485 case VUT_MINFOREIGNPCT:
492 cb(
nullptr,
false, data);
const char * achievement_rule_name(struct achievement *pach)
Return untranslated name of this achievement type.
struct achievement * achievement_by_number(int id)
Return achievements of given id.
#define achievements_re_active_iterate(_p)
#define achievements_re_active_iterate_end
const char * action_rule_name(const struct action *action)
Get the rule name of the action.
struct action * action_by_number(action_id act_id)
Return the action with the given id.
#define action_iterate_end
#define action_iterate(_act_)
const char * get_output_name(Output_type_id output)
Return a translated name for the output type.
#define output_type_iterate(output)
#define output_type_iterate_end
const char * government_rule_name(const struct government *pgovern)
Return the (untranslated) rule name of the government.
std::vector< government > governments
const char * improvement_rule_name(const struct impr_type *pimprove)
Return the (untranslated) rule name of the improvement.
struct impr_type * improvement_by_number(const Impr_type_id id)
Returns the improvement type for the given index/ID.
#define improvement_re_active_iterate_end
#define improvement_re_active_iterate(_p)
#define fc_assert(condition)
struct nation_type * nation_by_number(const Nation_type_id nation)
Return the nation with the given index.
const char * nation_rule_name(const struct nation_type *pnation)
Return the (untranslated) rule name of the nation (adjective form).
std::vector< nation_type > nations
int nation_group_count()
Return the number of nation groups.
struct nation_group * nation_group_by_number(int id)
Return the nation group with the given index.
const char * nation_group_rule_name(const struct nation_group *pgroup)
Return the (untranslated) rule name of a nation group.
#define nation_groups_iterate(NAME_pgroup)
#define nation_groups_iterate_end
server_setting_id server_setting_by_name(const char *name)
Returns the server setting with the specified name.
const char * ssetv_rule_name(ssetv val)
Returns the server setting - value pair encoded as a string.
ssetv ssetv_from_values(server_setting_id setting, int value)
Returns a server setting - value pair from its setting and value;.
int settings_number()
Returns the total number of settings.
const char * specialist_rule_name(const struct specialist *sp)
Return the (untranslated) rule name of the specialist type.
struct specialist * specialist_by_number(const Specialist_type_id id)
Return the specialist pointer for the given number.
#define specialist_type_re_active_iterate_end
#define specialist_type_re_active_iterate(_p)
struct packet_ruleset_control control
struct government * government_during_revolution
const char * style_rule_name(const struct nation_style *pstyle)
Return the (untranslated) rule name of the style.
struct nation_style * style_by_number(int id)
Return style of given id.
#define styles_re_active_iterate_end
#define styles_re_active_iterate(_p)
const char * advance_rule_name(const struct advance *padvance)
Return the (untranslated) rule name of the advance/technology.
struct advance * advance_by_number(const Tech_type_id atype)
Return the advance for the given advance index.
#define advance_re_active_iterate(_p)
#define advance_re_active_iterate_end
struct terrain * terrain_by_number(const Terrain_type_id type)
Return the terrain for the given terrain index.
const char * terrain_rule_name(const struct terrain *pterrain)
Return the (untranslated) rule name of the terrain.
#define terrain_re_active_iterate_end
#define terrain_re_active_iterate(_p)
struct goods_type * goods_by_number(Goods_type_id id)
Return goods type of given id.
const char * goods_rule_name(struct goods_type *pgood)
Return untranslated name of this goods type.
#define goods_type_re_active_iterate_end
#define goods_type_re_active_iterate(_p)
const struct unit_type * utype
struct nation_style * style
struct specialist * specialist
enum impr_genus_id impr_genus
enum citytile_type citytile
struct nation_group * nationgroup
struct extra_type * extra
struct nation_type * nation
struct government * govern
enum citystatus_type citystatus
const struct impr_type * building
struct achievement * achievement
enum unit_activity activity
enum national_intelligence nintel
enum ustate_prop unit_state
Output_type_id outputtype
enum topo_flag topo_property
struct unit_class * uclass
struct nation_type * nationality
#define activity_type_iterate(_act_)
#define activity_type_iterate_end
struct unit_type * utype_by_number(const Unit_type_id id)
Return a pointer for the unit type struct for the given unit type id.
const char * utype_rule_name(const struct unit_type *punittype)
Return the (untranslated) rule name of the unit type.
struct unit_class * uclass_by_number(const Unit_Class_id id)
Returns unit class pointer for an ID value.
const char * uclass_rule_name(const struct unit_class *pclass)
Return the (untranslated) rule name of the unit class.
#define unit_type_re_active_iterate(_p)
#define unit_class_re_active_iterate_end
#define UTYF_LAST_USER_FLAG
#define unit_class_re_active_iterate(_p)
#define unit_type_re_active_iterate_end
bool universal_value_initial(struct universal *src)
Initialize universal value with a value suitable for the kind.
void universal_kind_values(struct universal *univ, univ_kind_values_cb cb, void *data)
Call cb for each value possible for the universal kind.
void(* univ_kind_values_cb)(const char *value, bool current, void *data)