Project

General

Profile

Feature #361 » 0057-Unhardcode-wld.map-from-caravan_find_best_destinatio.patch

main - Marko Lindqvist, 03/25/2024 06:12 AM

View differences:

ai/default/daiunit.c
parameter.allow_foreign_trade = FTL_NATIONAL_ONLY;
parameter.ignore_transit_time = FALSE;
}
caravan_find_best_destination(punit, &parameter, &result, !has_handicap(pplayer, H_MAP));
caravan_find_best_destination(nmap, punit, &parameter, &result,
!has_handicap(pplayer, H_MAP));
if (result.dest != NULL) {
/* we did find a new destination for the unit */
/* We did find a new destination for the unit */
dest = result.dest;
help_wonder = result.help_wonder;
required_boat = uclass_need_trans_between(pclass, unit_tile(punit), dest->tile);
common/aicore/caravan.c
Store it in *destout (if destout is non-null); return the value of the
trade route.
****************************************************************************/
void caravan_find_best_destination(const struct unit *caravan,
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)
{
const struct civ_map *nmap = &(wld.map);
if (parameter->ignore_transit_time) {
caravan_find_best_destination_notransit(caravan, parameter, result);
} else {
common/aicore/caravan.h
int caravan_result_compare(const struct caravan_result *a,
const struct caravan_result *b);
void caravan_find_best_destination(const struct unit *caravan,
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);
(1-1/2)