All 172Ns came from the factory with 40 degrees of flap.
If the 180 hp conversion on the one you flew was done with the Air Plains STC, there are actually two different STCs for the 172N.
The first is the conversion to the 180-hp O-360 engine. That STC alone makes no changes to the airframe aft of the firewall, and does not change the gross weight from the original 2300 pounds. Thus the useful load is reduced by the added weight of the engine.
A second STC provides for installation of a physical limitation in the flap mechanism (photo below) to prevent extension greater than thirty degrees. When that is done, gross weight of the 180 hp 172N is increased by 250 lb, to 2550 lb. Reason being, the airplane would not be able to meet FAA climb guidelines for balked landing with full 40 degrees of flap at the heavier weight.
My '78 172N happens to be one of the very few with the 180 hp engine and 40 degrees of flap. It was my dad's airplane before he passed away, and when he did the 180 hp conversion in 1997 he bought both of the STCs but never had the flap limit installed. So it still has the 2300 lb gross weight. That doesn't bother me much, because I like flying into short fields, and I have no friends.
I have the parts for the flap limit, and can have it done any time. But for now I like it the way it is.
The 1981-86 Model 172P, the 172Q, 172RG, and all "restart-era" 172s are limited to 30 degrees of flap from the factory, as well. The flap limit in the 172P allowed the gross weight to be increased to 2400 lb without an increase in power.