Update mapgen_functions.cpp