Section 29A. Any city or town which accepts the provisions of this section may appropriate money for the construction of structures for the protection of private property along shores within its boundaries. Money so appropriated shall be paid to the state treasurer and expended by the department for such purposes within the limits of such city or town; provided, however, that such city or town assumes liability for all damages to property by reason of any taking of land, or of any right, interest or easement therein, within the city or town by the department for such purpose.