By Dec. 31, a dozen “rapid transit” communities — mostly cities and towns with Green, Blue, Orange, Red or Silver line stations — will have to adopt zoning that complies with the MBTA Communities Act or face consequences that include the loss of some state funding and potentially a lawsuit from the attorney general.