reduce excess code for n/e/s/w_fac stuff in mapgen

Not extensive, but it will have to do for now.

(10,000 lines of code, wtf)