Configurable water level, with water decided per tile #164
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#164
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Milestone 2, item 5 ("Make the water level configurable so that the
has_waterflag is more flexible").Problem
Water is a single global rule in
_kind_for():has_water and level <= _datum_index. So:Proposal
Two changes. The first is the configurable level asked for; the second is the seam the follow-on tickets need, and is cheap to put in now.
water_levelonTerrainPreset, in world units likedatum_level, decoupled from the datum.has_waterstays as the on/off switch, or is replaced by a sentinel level; decide which reads better in the inspector.is_water(cell)query. The global water level becomes the first thing that fills the mask; later tickets add rivers and lakes as other fillers._kind_for(),is_walkable(),drawn_level_at()and_paint_cells()all askis_water(cell)instead of re-deriving it from height.drawn_level_at()lifts a submerged tile to its water surface, not to_datum_index.Decision needed
Is the mask a bool plus one global surface level, or a per-tile surface level? A crater lake (#166) sits at a different height from any sea, and a terraced river (#165) steps down in falls. Per-tile surface is the general answer; a bool is enough only if every water body shares one level. Recommend per-tile, since #165 and #166 both need it.
Acceptance criteria
water_levelon the preset; changing it in the.tresmoves the shoreline without changing the land shape.is_water(cell)is the only place water is decided. Grep forKind.WATERcomparisons outside it as part of review.water_levelset to their current datum. Pin with a fixed-seed test of the water cells.PlacementRules→ WATER); navigation still excludes it (test_terrain_navigation.gdgreen).drawn_level_at(). It may get fixed or changed for free; note which in the PR.Related
#30 (distance-to-water query for clay deposits) reads water. Building it on
is_water()once this lands saves rewriting it.