mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-14 20:16:09 -05:00
* [Client] Expose custom zone management in the deck editor Wires the state layer into every editor surface that shows deck zones. - Deck dock: context menu on zones gains New/Rename/Delete/Change board actions, with per-zone submenus for adding cards. - Card database dock and visual database display gain an add-to-zone submenu listing custom zones per board plus a create-zone entry. - All prompt call sites pass validateNewZoneName so duplicates and reserved names are rejected inline before Ok unlocks. - Rename reuses the same dialog in name-only mode, keeping one validation contract for every zone-name entry point. - Change board marks the current board instead of offering a no-op, and the state layer refuses moves onto boards holding a same-named zone from imported decks. * [DeckEditor] Address custom-zone menu and export review feedback * [DeckLoader] Keep the sideboard marker and block ordering when exporting nested zones - saveToStream_DeckZone threads the owning board zone name down to the card writer, so cards in a custom zone under the sideboard keep their SB: prefix instead of being re-imported into the maindeck - nested sub-zones are collected during the loop and written after the parent zone's own header and cards, so they no longer read as part of the zone printed before them * [DeckEditor] Fix move-to-zone menu use-after-free and per-zone enabled state - resolve the card name/provider/collector number before createNewCustomZone rebuilds the model tree, then re-find the refreshed index via findCard and move it (mirrors the decrementCard re-find pattern) - the enabled test now compares the card's own zone (nearest custom-zone ancestor, else its board), matching moveCardToZone's lookup, so moving a card out of a custom zone back to the board root is offered and the card's own zone is disabled --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>