Autotiler cleanup and performance improvements #721
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.
Started out as optimisation, ended up with bugfixes and cleanup as well 😅
<set>
elements, as it can be unintuitive and makes it harder to create complex tilesets.TileHandler
now use the Everest version of autotiler code - improves performance, simplifies the code and makes it much easier to implement new optimizations.byte[] Masked.Mask
GetByteLookup
, used in<define>
elements - now throws an exception instead of potentially not working or overwriting other custom masks in hard to predict ways. This should be fine, as I honestly don't know if anybody used this feature at all ☃️TileHandler
being completely broken (it used to ignore theignores="..."
xml tag...CheckForSameLevel
potentially several times per tile, as it's O(n) complexity (n - number of rooms in the map). Instead, we calculate which room the currently checked tile comes from (still O(n), but only once per tile), and simply check if the surrounding tiles belong to the same room (O(1))