replace_textures (CWrp::File8WVR)

    # File ../lib/roller/CWRP.rb, line 663
      def replace_textures(replacements)
        replaced = 0

        reset_progress 'Resizing terrain grid', @textures.size
        @textures.each do |texture|
          # If replacement has been defined, replace it.
          replacement = replacements[texture.name]
          unless replacement.nil?
            texture.name = replacement[rand(replacement.size)]
            replaced += 1
          end

          increment_progress
        end

        replaced
      end