[Freeciv-Dev] Settlers can mine and irrigate a tile at the same time.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
1: You can put two settlers on a tile then set one mining and the other
irrigating. Both processes run to completion, so whichever finishes
last has the final effect. A patch to prevent one order when another
is being carried out follows, but it gives no explanation to the
user.
2: If you let a settler work on a terrain tile for some turns, then stop
and restart it, its activity count is reset to zero and it must start
again. Is this desirable? After irrigating a jungle four 14 turns it
would be a wrist-slitting event to accidentally click on your
settler.
Similarly, it would be handy to half-irrigate a tile, pop off for a
spot of road building or to avoid an enemy navy, then recommence the
irrigation. Does Civ ("PayCiv"?) allow this?
--- freeciv/common/unit.c Thu Feb 25 11:11:53 1999
+++ freeciv.ard/common/unit.c Fri Mar 5 08:28:45 1999
@@ -682,16 +682,32 @@
get_invention(pplayer, A_BRIDGE)==TECH_KNOWN);
case ACTIVITY_MINE:
- return unit_flag(punit->type, F_SETTLERS) && punit->moves_left &&
- type->mining_result!=T_LAST && !(ptile->special&S_MINE);
+ /* Don't allow it if someone else is irrigating this tile.
+ *Do* allow it if they're transforming - the mine may survive */
+ if (unit_flag(punit->type, F_SETTLERS) && punit->moves_left &&
+ type->mining_result!=T_LAST && !(ptile->special&S_MINE)) {
+ unit_list_iterate(ptile->units, tunit) {
+ if(tunit->activity==ACTIVITY_IRRIGATE) return 0;
+ unit_list_iterate_end;
+ }
+ return 1;
+ } else return 0;
case ACTIVITY_IRRIGATE:
- return unit_flag(punit->type, F_SETTLERS) && punit->moves_left &&
+ /* Don't allow it if someone else is mining this tile.
+ *Do* allow it if they're transforming - the irrigation may survive */
+ if (unit_flag(punit->type, F_SETTLERS) && punit->moves_left &&
!(ptile->special&S_IRRIGATION) &&
( (ptile->terrain==type->irrigation_result &&
is_water_adjacent_to_tile(punit->x, punit->y)) ||
(ptile->terrain!=type->irrigation_result &&
- type->irrigation_result!=T_LAST));
+ type->irrigation_result!=T_LAST))) {
+ unit_list_iterate(ptile->units, tunit) {
+ if(tunit->activity==ACTIVITY_MINE) return 0;
+ unit_list_iterate_end;
+ }
+ return 1;
+ } else return 0;
case ACTIVITY_FORTIFY:
return is_ground_unit(punit) && punit->moves_left &&
- [Freeciv-Dev] Settlers can mine and irrigate a tile at the same time.,
Andrew Donkin <=
|
|