Conversation
Propagate light, outside, and subterranean flags to tiles below a tile that changed between an open and a solid shape, matching how the game maintains sky exposure. Handles both directions: exposing tiles copies the changed tile's flags downward, while covering tiles clears the light/outside flags of the column below.
Implements the liquids improvements requested in DFHack#80: support painting into sky and fix covered tile flags - Allocate target map blocks when they don't exist, filling them with open space tiles like natural sky, so liquids and obsidian can be painted into unallocated sky blocks (point, range, block, and column brushes). - Update the light/outside flags of tiles covered by newly painted obsidian walls, obsidian floors, and river sources via the new ` MapCache::propagateVerticalFlags`, so stacked obsidian structures no longer leave tiles below reading "outside light". Tests cover the new behaviors: - painting water or obsidian into unallocated sky blocks, including a range brush that spans a map block boundary - obsidian walls, obsidian floors, and river sources clearing light/outside on the open tiles they cover The tests synthesize unallocated blocks by detaching a block's block_index slot (generated forts typically have no unallocated blocks to find), and the cursor test waits for transient screens above the map to go away so cursor_hotkey-guarded commands can run. Closes DFHack#80 (we are not going to implement undo).
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.
Implements the liquids improvements requested in #80: support painting into sky and fix covered tile flags
MapCache::propagateVerticalFlags, so stacked obsidian structures no longer leave tiles below reading "outside light".Tests cover the new behaviors:
The tests synthesize unallocated blocks by detaching a block's
block_indexslot (generated forts typically have no unallocated blocks to find), and the cursor test waits for transient screens above the map to go away socursor_hotkey-guarded commands can run.Depends on/incorporates #5970.
Closes #80 (we are not going to implement undo).