Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connections
Description
This adds a checkbox to the top bar to make the brushes use random tiles from the rectangle of selected tiles in the tilepicker, which makes it easier to create randomly distributed tiles. Holding down the Alt key on the keyboard inverts the setting.
There's also a density setting in the top bar that allows making the brush only draw on a percentage of randomly chosen tiles on the map instead of every tile. This is intended to make it easier to create heterogeneous sets of random tiles, like if someone wants to create a map consisting mostly of one set of random tiles but with a small number of a different set of random tiles here and there.
Testing
Needs to be verified that the random patterns created by the Randomize ID setting and the density setting in the top bar are deterministic when drawing over the same region of a map multiple times, including with different brushes. This is important because otherwise the random tiles may not be uniformly distributed when the density setting is less than 1. Other than that, I highly doubt anything else needs to be tested.
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown -Z build-std=std,panic_abort
cargo build --release
trunk build --release