src/industry_cmd.cpp
changeset 8955 8d6bb31af11b
parent 8932 989fe2280933
child 8967 0b56f973bcf0
equal deleted inserted replaced
8954:ca1d17502817 8955:8d6bb31af11b
   839 
   839 
   840 static bool IsBadFarmFieldTile(TileIndex tile)
   840 static bool IsBadFarmFieldTile(TileIndex tile)
   841 {
   841 {
   842 	switch (GetTileType(tile)) {
   842 	switch (GetTileType(tile)) {
   843 		case MP_CLEAR: return IsClearGround(tile, CLEAR_FIELDS) || IsClearGround(tile, CLEAR_SNOW) || IsClearGround(tile, CLEAR_DESERT);
   843 		case MP_CLEAR: return IsClearGround(tile, CLEAR_FIELDS) || IsClearGround(tile, CLEAR_SNOW) || IsClearGround(tile, CLEAR_DESERT);
   844 		case MP_TREES: return false;
   844 		case MP_TREES: return (GetTreeGround(tile) == TREE_GROUND_SHORE);
   845 		default:       return true;
   845 		default:       return true;
   846 	}
   846 	}
   847 }
   847 }
   848 
   848 
   849 static bool IsBadFarmFieldTile2(TileIndex tile)
   849 static bool IsBadFarmFieldTile2(TileIndex tile)
   850 {
   850 {
   851 	switch (GetTileType(tile)) {
   851 	switch (GetTileType(tile)) {
   852 		case MP_CLEAR: return IsClearGround(tile, CLEAR_SNOW) || IsClearGround(tile, CLEAR_DESERT);
   852 		case MP_CLEAR: return IsClearGround(tile, CLEAR_SNOW) || IsClearGround(tile, CLEAR_DESERT);
   853 		case MP_TREES: return false;
   853 		case MP_TREES: return (GetTreeGround(tile) == TREE_GROUND_SHORE);
   854 		default:       return true;
   854 		default:       return true;
   855 	}
   855 	}
   856 }
   856 }
   857 
   857 
   858 static void SetupFarmFieldFence(TileIndex tile, int size, byte type, Axis direction)
   858 static void SetupFarmFieldFence(TileIndex tile, int size, byte type, Axis direction)