Add TerrainGrid.drawn_level_at() (#46) #131
No reviewers
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder!131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "46-drawn-level-query"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
TerrainGrid.drawn_level_at(cell): the level a tile is drawn at, which for water is the datum rather than the seabed.Changes
drawn_level_at()goes through_kind_for(), so a preset withhas_wateroff draws low ground where it lies. Out-of-bounds cells return the datum, matchinglevel_at().height_at()and_paint_cells()now use it instead of repeating the datum check.BuildingSite's ghost height switch to it, as does the copied highlight code intools/screenshot_entrance_arrow.gd.level_at()is unchanged and still used byPlacementRules, slope and pathfinding.Verification
test/unit/test_terrain_drawn_level.gd: submerged tile, dry tile, low tile on a no-water preset, out-of-bounds cell. Red before the implementation (method missing), green after.Not done
cell_to_world()still useslevel_at(), so the entrance arrow sinks if a doorstep lands on water. Pawns also use it, and water is unwalkable, so it was left alone.Closes #46
🤖 Generated with Claude Code