selection.gradient has some pretty unintuitive behavior, in that it selects points that are NOT close to the defined center. I've used gradient selections several times and so far all of them have had to be negated, because I wanted to select points close to the center with a decreasing probability further out. This implements that behavior, and also fixes a bug in which the x,y coordinates of the gradient center(s) were not converted properly when used within a des.room or des.map. Also updated the lua documentation for gradient. I removed the "limited" argument, as it was previously used to control whether the rest of the map outside the max given distance would be included in the selection; now that the area beyond maxdist is naturally never in the selection, it doesn't have much use. (And I can't think of a reasonable use case for the inverse: wanting to select points close to the center, with decreasing chance towards maxdist, but then select the entire map beyond maxdist.) Currently this does not affect any special levels or themed rooms because none of them use selection.gradient.
33 KiB
33 KiB