diff -ruN freeciv.orig/common/map.c freeciv/common/map.c --- freeciv.orig/common/map.c Wed Jun 14 13:17:52 2000 +++ freeciv/common/map.c Sat Jun 17 20:04:32 2000 @@ -547,6 +547,25 @@ } /*************************************************************** +Check if terrain is ok for land units to be, +infrastructure (transporters etc.) doesn't count + +currently always : ((is_land(x,y) && is_ocean(x,y)) == 0) +but may change in future (T_ARCHIPELAGO, T_FJORD etc.) +***************************************************************/ +int is_land (int x, int y) { + return (map_get_terrain(x,y) != T_OCEAN); +} + +/*************************************************************** +Check if terrain is ok for sea units to be, +infrastructure (cities etc.) doesn't count +***************************************************************/ +int is_ocean (int x, int y) { + return (map_get_terrain(x,y) == T_OCEAN); +} + +/*************************************************************** ... ***************************************************************/ int get_tile_food_base(struct tile * ptile) diff -ruN freeciv.orig/common/map.h freeciv/common/map.h --- freeciv.orig/common/map.h Wed Jun 14 13:17:53 2000 +++ freeciv/common/map.h Sat Jun 17 19:58:57 2000 @@ -217,6 +217,8 @@ int is_special_close(int x, int y); int is_special_type_close(int x, int y, enum tile_special_type spe); int is_sea_usable(int x, int y); +int is_land (int x, int y); +int is_ocean (int x, int y); int get_tile_food_base(struct tile * ptile); int get_tile_shield_base(struct tile * ptile); int get_tile_trade_base(struct tile * ptile);