Freeciv-3.2: caravan_result Struct Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Data Fields
caravan_result Struct Reference

`#include <caravan.h>`

## Data Fields

const struct city * | src
const struct city * | dest
int | arrival_time
double | value
bool | help_wonder
bool | required_boat

## Detailed Description

An advisor for using caravans optimally. The parameter gives what we're optimizing for; use init_default if you don't have anything better to set it to. The optimization does not take into account other caravans in transit. It also knows nothing about moving caravans except what pathfinding will tell it – ferries, for instance, aren't handled here. Set ignore_transit_time to work around this. The result of one trade route, accoring to the parameter below. A null destination implies that this is not a real result.

Definition at line 51 of file caravan.h.

## Field Documentation

## ◆ arrival_time

int caravan_result::arrival_time

Definition at line 54 of file caravan.h.

Referenced by caravan_result_compare(), caravan_result_init(), caravan_result_init_zero(), cewt_callback(), cfbdw_callback(), and get_discounted_reward().

## ◆ dest

const struct city* caravan_result::dest

Definition at line 53 of file caravan.h.

Referenced by caravan_optimize_callback(), caravan_optimize_notransit(), caravan_result_init(), caravan_result_init_zero(), cewt_callback(), cfbdw_callback(), dai_manage_caravan(), and get_discounted_reward().

## ◆ help_wonder

bool caravan_result::help_wonder

Definition at line 57 of file caravan.h.

Referenced by caravan_optimize_callback(), caravan_result_init(), caravan_result_init_zero(), dai_manage_caravan(), and get_discounted_reward().

## ◆ required_boat

bool caravan_result::required_boat

Definition at line 58 of file caravan.h.

Referenced by caravan_result_init(), and caravan_result_init_zero().

## ◆ src

const struct city* caravan_result::src

Definition at line 52 of file caravan.h.

Referenced by caravan_optimize_callback(), caravan_optimize_notransit(), caravan_result_init(), caravan_result_init_zero(), cfbdw_callback(), and get_discounted_reward().

## ◆ value

double caravan_result::value

Definition at line 56 of file caravan.h.

Referenced by caravan_optimize_callback(), caravan_result_compare(), caravan_result_init(), caravan_result_init_zero(), and get_discounted_reward().