Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #877755 ยป 0021-redundant.patch

Sveinung Kvilhaugsvik, 2020-06-15 10:29 PM

View differences:

server/advisors/autosettlers.c
struct extra_type *target,
const struct tile *ptile)
{
struct terrain *pterrain = tile_terrain(ptile);
switch (activity) {
case ACTIVITY_MINE:
if (pterrain->mining_result == pterrain) {
return action_prob_possible(action_speculate_unit_on_tile(
ACTION_MINE,
punit, unit_home(punit), ptile,
omniscient_cheat,
ptile, target));
} else {
return FALSE;
}
return action_prob_possible(action_speculate_unit_on_tile(
ACTION_MINE,
punit, unit_home(punit), ptile,
omniscient_cheat,
ptile, target));
case ACTIVITY_PLANT:
if (pterrain->mining_result != pterrain
&& pterrain->mining_result != T_NONE) {
return action_prob_possible(action_speculate_unit_on_tile(
ACTION_PLANT,
punit, unit_home(punit), ptile,
omniscient_cheat,
ptile, target));
} else {
return FALSE;
}
return action_prob_possible(action_speculate_unit_on_tile(
ACTION_PLANT,
punit, unit_home(punit), ptile,
omniscient_cheat,
ptile, target));
case ACTIVITY_IRRIGATE:
if (pterrain->irrigation_result == pterrain) {
return action_prob_possible(action_speculate_unit_on_tile(
ACTION_IRRIGATE,
punit, unit_home(punit), ptile,
omniscient_cheat,
ptile, target));
} else {
return FALSE;
}
return action_prob_possible(action_speculate_unit_on_tile(
ACTION_IRRIGATE,
punit, unit_home(punit), ptile,
omniscient_cheat,
ptile, target));
case ACTIVITY_CULTIVATE:
if (pterrain->irrigation_result != pterrain
&& pterrain->irrigation_result != T_NONE) {
return action_prob_possible(action_speculate_unit_on_tile(
ACTION_CULTIVATE,
punit, unit_home(punit), ptile,
omniscient_cheat,
ptile, target));
} else {
return FALSE;
}
return action_prob_possible(action_speculate_unit_on_tile(
ACTION_CULTIVATE,
punit, unit_home(punit), ptile,
omniscient_cheat,
ptile, target));
case ACTIVITY_FORTIFYING:
return action_prob_possible(action_speculate_unit_on_self(
    (1-1/1)