Freeciv-3.3
|
Go to the source code of this file.
Data Structures | |
struct | caravan_result |
struct | caravan_parameter |
Macros | |
#define | caravan_parameter_log(parameter, loglevel) |
Enumerations | |
enum | foreign_trade_limit { FTL_NATIONAL_ONLY , FTL_ALLIED , FTL_PEACEFUL , FTL_NONWAR } |
Functions | |
void | caravan_parameter_init_default (struct caravan_parameter *parameter) |
void | caravan_parameter_init_from_unit (struct caravan_parameter *parameter, const struct unit *caravan) |
bool | caravan_parameter_is_legal (const struct caravan_parameter *parameter) |
void | caravan_parameter_log_real (const struct caravan_parameter *parameter, enum log_level level, const char *file, const char *function, int line) |
void | caravan_result_init_zero (struct caravan_result *result) |
int | caravan_result_compare (const struct caravan_result *a, const struct caravan_result *b) |
void | caravan_find_best_destination (const struct civ_map *nmap, const struct unit *caravan, const struct caravan_parameter *parameter, struct caravan_result *result, bool omniscient) |
#define caravan_parameter_log | ( | parameter, | |
loglevel | |||
) |
void caravan_find_best_destination | ( | const struct civ_map * | nmap, |
const struct unit * | caravan, | ||
const struct caravan_parameter * | parameter, | ||
struct caravan_result * | result, | ||
bool | omniscient | ||
) |
Find the best destination city for the caravan. Store it in *destout (if destout is non-null); return the value of the trade route.
Definition at line 682 of file caravan.c.
Referenced by dai_manage_caravan().
void caravan_parameter_init_default | ( | struct caravan_parameter * | parameter | ) |
Create a valid parameter with default values.
Definition at line 36 of file caravan.c.
Referenced by caravan_parameter_init_from_unit().
void caravan_parameter_init_from_unit | ( | struct caravan_parameter * | parameter, |
const struct unit * | caravan | ||
) |
Create a valid parameter with default values based on the caravan.
Definition at line 53 of file caravan.c.
Referenced by dai_manage_caravan().
bool caravan_parameter_is_legal | ( | const struct caravan_parameter * | parameter | ) |
int caravan_result_compare | ( | const struct caravan_result * | a, |
const struct caravan_result * | b | ||
) |
Compare the two results for sorting.
Definition at line 183 of file caravan.c.
Referenced by caravan_find_best_destination_notransit(), and cfbdw_callback().
void caravan_result_init_zero | ( | struct caravan_result * | result | ) |
Initialize the result to be worth zero and go from nowhere to nowhere.
Definition at line 144 of file caravan.c.
Referenced by get_discounted_reward().