Regulations adopted under authority of this act shall not apply to the existing use of any buildings or land and shall not prevent the restoration of a building damaged not more than 50% of its assessed valuation by fire, explosion, act of God or the public enemy, or prevent the continuance of the use of such building or part thereof as such use existed at the time of such damage, but shall apply to any alteration of a building to provide for a change in such use of any building or land after the effective date of any such zoning regulation. Except for flood plain regulations in areas designated as a flood plain, regulations adopted pursuant to this act shall not apply to the use of land for agricultural purposes, nor for the erection or maintenance of buildings thereon for such purposes so long as such land and buildings erected thereon are used for agricultural purposes and not otherwise.
K.S.A. 19-2921