Ported terrain gen to script