test: add coverage for autochop, aquifer, burrow, dig-now, regrass (+ Burrows z-coordinate fix) - #5929
Open
Alistair-Afton wants to merge 2 commits into
Open
test: add coverage for autochop, aquifer, burrow, dig-now, regrass (+ Burrows z-coordinate fix)#5929Alistair-Afton wants to merge 2 commits into
Alistair-Afton wants to merge 2 commits into
Conversation
Alistair-Afton
force-pushed
the
test-plugin-coverage-2
branch
3 times, most recently
from
September 17, 2026 15:14
3579de3 to
71031af
Compare
block_x/y/z record map block positions in region-wide block coordinates, but map_pos.z is already a z-level, not a tile coordinate. Dividing it by 16 like x/y stored a wrong block_z, so clearTiles, listBlocks, and mask deletion looked up the wrong map block and orphaned the tile mask. This made `burrow tiles clear` and tile copying silently no-op.
Also fixes two issues the new tests exposed: aquifer --help ran a map-wide list instead of printing help (wrong `help` global checked), and autochop crashed when a burrow-based command named a burrow that doesn't exist.
Alistair-Afton
force-pushed
the
test-plugin-coverage-2
branch
from
September 18, 2026 06:45
71031af to
5a373ff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
autochop,aquifer,burrow,dig-now, andregrassgetBlockMask/deleteBlockMaskcomputedbase + map_pos/16, butmap_pos.zis already a z-level, not a tile coordinate. The storedblock_zwas wrong, soclearTiles,listBlocks, and mask deletion looked up the wrong map block and orphaned the mask:burrow tiles clearand tile copying silently did nothingaquifer: fix--help/-hrunning a map-widelistinstead of printing help (checked a nonexistenthelpglobal instead ofopts.help)autochop: fix crash when a burrow-based command names a burrow that doesn't exist (autochop_getBurrowConfigreturns nothing, and the result was indexed unconditionally)Test plan
burrow tiles box-add/clear/copy against live fort map state