40 requirement_vector_init(&p->
reqs);
54 requirement_vector_free(&p->
reqs);
94 if (id < 0 || id >=
game.
control.num_specialist_types) {
172 static char buf[5 *
SP_MAX];
178 const char *separator = (buf[0] ==
'\0') ?
"" :
"/";
181 buf,
sizeof(buf),
"%s%s", separator,
200 static char buf[5 *
SP_MAX];
206 const char *separator = (buf[0] ==
'\0') ?
"" :
"/";
208 cat_snprintf(buf,
sizeof(buf),
"%s%d", separator, specialist_list[sp]);
225 EFT_SPECIALIST_OUTPUT);
struct output_type * get_output_type(Output_type_id output)
Return the output type for this index.
int get_city_specialist_output_bonus(const struct city *pcity, const struct specialist *pspecialist, const struct output_type *poutput, enum effect_type effect_type)
Returns the effect bonus of a specialist in a city.
enum output_type_id Output_type_id
#define fc_assert_ret_val(condition, val)
static const char * rule_name_get(const struct name_translation *ptrans)
static const char * name_translation_get(const struct name_translation *ptrans)
struct specialist specialists[SP_MAX]
struct specialist * specialist_by_rule_name(const char *name)
Return the specialist type with the given (untranslated!) rule name.
void specialists_free()
Free data for specialists.
const char * specialists_string(const citizens *specialist_list)
Return a string showing the number of specialists in the array.
const char * specialist_rule_name(const struct specialist *sp)
Return the (untranslated) rule name of the specialist type.
struct specialist * specialist_by_translated_name(const char *name)
Return the specialist type with the given (translated, plural) name.
void specialists_init()
Initialize data for specialists.
Specialist_type_id specialist_index(const struct specialist *sp)
Return the specialist index.
Specialist_type_id specialist_number(const struct specialist *sp)
Return the specialist item_number.
const char * specialist_abbreviation_translation(const struct specialist *sp)
Return the (translated) abbreviation of the specialist type.
const char * specialists_abbreviation_string()
Return a string containing all the specialist abbreviations, for instance "E/S/T".
struct specialist * specialist_by_number(const Specialist_type_id id)
Return the specialist pointer for the given number.
Specialist_type_id specialist_count()
Return the number of specialist_types.
const char * specialist_plural_translation(const struct specialist *sp)
Return the (translated, plural) name of the specialist type.
int get_specialist_output(const struct city *pcity, Specialist_type_id sp, Output_type_id otype)
Return the output for the specialist type with this output type.
#define specialist_type_iterate_end
#define specialist_type_iterate(sp)
struct packet_ruleset_control control
struct requirement_vector reqs
struct name_translation name
QVector< QString > * helptext
struct name_translation abbreviation
int fc_strcasecmp(const char *str0, const char *str1)
Compare strings like strcmp(), but ignoring case.
int cat_snprintf(char *str, size_t n, const char *format,...)
cat_snprintf is like a combination of fc_snprintf and fc_strlcat; it does snprintf to the end of an e...