33 #ifdef ADV_CHOICE_TRACK
34 choice->use =
nullptr;
35 choice->log_if_chosen = FALSE;
44 #ifdef ADV_CHOICE_TRACK
45 if (choice->use !=
nullptr) {
47 choice->use =
nullptr;
69 #ifdef ADV_CHOICE_TRACK
70 if (choice->use !=
nullptr) {
116 #ifdef ADV_CHOICE_TRACK
127 if (dest->use !=
nullptr) {
130 if (src->use !=
nullptr) {
135 dest->log_if_chosen = src->log_if_chosen;
144 if (choice->use !=
nullptr) {
159 if (choice->use !=
nullptr) {
173 if (loc2 !=
nullptr) {
175 "Choice at \"%s:%s\": %s, "
180 "Choice at \"%s\": %s, "
191 if (choice->use ==
nullptr) {
void adv_deinit_choice(struct adv_choice *choice)
Clear choice without freeing it itself.
void adv_init_choice(struct adv_choice *choice)
Sets the values of the choice to initial values.
struct adv_choice * adv_new_choice()
Dynamically allocate a new choice.
void adv_free_choice(struct adv_choice *choice)
Free dynamically allocated choice.
struct adv_choice * adv_better_choice(struct adv_choice *first, struct adv_choice *second)
Return better one of the choices given.
struct adv_choice * adv_better_choice_free(struct adv_choice *first, struct adv_choice *second)
Return better one of the choices given, and free the other.
bool is_unit_choice_type(enum choice_type type)
Does choice type refer to unit.
#define adv_choice_set_use(_choice, _use)
static void adv_choice_copy(struct adv_choice *dest, struct adv_choice *src)
static const char * adv_choice_get_use(const struct adv_choice *choice)
#define adv_choice_log_info(_choice, _loc1, _loc2)
const char * improvement_rule_name(const struct impr_type *pimprove)
Return the (untranslated) rule name of the improvement.
#define log_base(level, message,...)
const struct unit_type * utype
const struct impr_type * building
const char * utype_rule_name(const struct unit_type *punittype)
Return the (untranslated) rule name of the unit type.