Skip to content

Exiting heightmap editor resets manually-set lake types (e.g. lava) #36

Description

@barrulus

Found while answering a Discord question about hand-placing lava lakes (research spec: docs/superpowers/specs/2026-08-24-discord-cultures-ice-goods-answer.md).

Symptom

Set a lake's type by hand in the Lakes editor (e.g. freshwater → lava via the type dropdown, src/controllers/lakes-editor.ts:227-243), then open and exit the heightmap editor: the lake snaps back to its computed type.

Cause

The heightmap-editor exit pass reruns Features.defineGroups() (src/controllers/heightmap-editor.ts:645), which recomputes every lake's group from geography (src/generators/features.ts:343,364-391) and overwrites feature.group/feature.subtype. Auto-assignment almost never picks lava (requires height > 60, < 10 cells, firstCell % 10 === 0, features.ts:364-376), so manual lava/frozen/etc. choices are effectively always lost.

This is upstream behavior, not a fork regression. The same wipe-on-regenerate pattern exists for hand-placed ice (Tools → Regenerate ice and heightmap exit both call Ice.generate from scratch — src/components/tools.ts:197-201, heightmap-editor.ts:530,789).

Options

  • Document as a known workflow constraint: finish heightmap edits first, retype lakes (and place ice) last.
  • Or preserve manual choices: mark a feature as user-typed (e.g. a lock-style flag, as burgs/labels have) and have defineGroups() skip flagged features. Would be upstream-worthy if built.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions