Skip to content

Editor palette dropdown bypasses the unlock gating #20

Description

@InauguralPhysicist

Appendage part-buttons check part_unlocked before equipping, but the palette dropdown doesn't. editor_apply_to_spec writes spec.palette is pal_w.selected unconditionally (src/editor.eigs:210-212), so all 5 palettes are always applicable regardless of game.unlocked_palettes (the bitmask at src/editor.eigs:196, grown by palette part-drops). Collecting palette drops is therefore meaningless.

Fix: gate palette selection against unlocked_palettes — either skip/disable locked entries in the ed_palette dropdown (src/editor.eigs:87), or in editor_apply_to_spec only accept pal_w.selected when that palette's bit is unlocked (else keep the current palette).

Acceptance: a locked palette can't be applied, unlocked ones can; make test green.

Self-contained editor logic. See CONTRIBUTING.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions