emitter: Move patch growing code to a function.
emitter: Move patch growing code to a function.

This was in a couple of places, and was the same thing. Might as well make it
a function so everything stays in one place.

FascinatedBox/lily,jesserayadkins/lily,FascinatedBox/lily,FascinatedBox/lily,FascinatedBox/lily,jesserayadkins/lily,jesserayadkins/lily