industry_cmd.c
changeset 5056 8fabd0020af7
parent 4976 2e3d5e8ec510
child 5118 9640617e1abb
equal deleted inserted replaced
5055:2c5af9a3b79f 5056:8fabd0020af7
    22 #include "variables.h"
    22 #include "variables.h"
    23 #include "table/industry_land.h"
    23 #include "table/industry_land.h"
    24 #include "table/build_industry.h"
    24 #include "table/build_industry.h"
    25 #include "genworld.h"
    25 #include "genworld.h"
    26 #include "date.h"
    26 #include "date.h"
       
    27 #include "water_map.h"
    27 
    28 
    28 void ShowIndustryViewWindow(int industry);
    29 void ShowIndustryViewWindow(int industry);
    29 void BuildOilRig(TileIndex tile);
    30 void BuildOilRig(TileIndex tile);
    30 void DeleteOilRig(TileIndex tile);
    31 void DeleteOilRig(TileIndex tile);
    31 
    32 
  1156 			}
  1157 			}
  1157 		} else {
  1158 		} else {
  1158 			if (!EnsureNoVehicle(cur_tile)) return false;
  1159 			if (!EnsureNoVehicle(cur_tile)) return false;
  1159 
  1160 
  1160 			if (type == IT_OIL_RIG)  {
  1161 			if (type == IT_OIL_RIG)  {
  1161 				if (!IsTileType(cur_tile, MP_WATER) || _m[cur_tile].m5 != 0) return false;
  1162 				if (!IsClearWaterTile(cur_tile)) return false;
  1162 			} else {
  1163 			} else {
  1163 				Slope tileh;
  1164 				Slope tileh;
  1164 
  1165 
  1165 				if (IsTileType(cur_tile, MP_WATER) && _m[cur_tile].m5 == 0) return false;
  1166 				if (IsClearWaterTile(cur_tile)) return false;
  1166 
  1167 
  1167 				tileh = GetTileSlope(cur_tile, NULL);
  1168 				tileh = GetTileSlope(cur_tile, NULL);
  1168 				if (IsSteepSlope(tileh)) return false;
  1169 				if (IsSteepSlope(tileh)) return false;
  1169 
  1170 
  1170 				if (_patches.land_generator != LG_TERRAGENESIS || !_generating_world) {
  1171 				if (_patches.land_generator != LG_TERRAGENESIS || !_generating_world) {