During this year’s legislative session, Texas lawmakers allocated part of the state’s historic $32.7 billion surplus toward better protecting the state against droughts and floods — an investment that followed one of the hottest summers on record and the worst drought in a decade.