415a416,420 > if(unit_flag(punit->type, F_SETTLERS)) { > /* Cancel irrigation when boat moves. Otherwise could start irrigating > * legal square then move to offshore square. ~Cameron */ > punit->activity = ACTIVITY_IDLE; > } 919a925,948 > This function returns true if three or more adjacent tiles are not ocean, > ie the tile can potentially be reclaimed. May fail around map x=0 > point. ~Cameron > **************************************************************************/ > int can_reclaim_ocean(int x, int y) > { > signed int i,j; > int landtiles = 0; > > for(i = -1; i <= 1; i++) { > for(j = -1; j <= 1; j++) { > if(i || j) { > if(map_get_tile(x+i,y+j)->terrain != T_OCEAN) { > landtiles++; > } > if(landtiles >= 3) > return 1; > } > } > } > return 0; > } > > /************************************************************************** 967a997,1000 > /* Check if the ocean can be filled in. ~Cameron */ > (ptile->terrain!=T_OCEAN || > (player_knows_techs_with_flag(pplayer,TF_BRIDGE) && > can_reclaim_ocean(punit->x, punit->y))) &&