chiark / gitweb /
shapelib: Fix backward incompatible unnotched, stack_pos
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 May 2022 00:04:46 +0000 (01:04 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 May 2022 00:04:46 +0000 (01:04 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/deck.rs
src/hidden.rs

index 08137254503c3f59ffdcbd315ae8d04108f20cbf..c90a843bb2079285c1f0928b0fdee6323c856eeb 100644 (file)
@@ -14,6 +14,7 @@ pub const ENABLED_DESC : HtmlLit = Html::lit("a pickup deck (enabled)");
 struct Deck {
   shape: GenericSimpleShape<(), RectOutline>,
   label: Option<PieceLabelLoaded>,
+  #[serde(default="PosC::zero")]
   stack_pos: Pos,
 }
 
index 084e5dffca87492b6e8a4adbc00ea582ee606654..f1389081f55df8724f0ae3dc8932d79b1f5398d6 100644 (file)
@@ -52,6 +52,7 @@ pub struct Occultation {
   region: Region, // automatically affect pieces here
   occulter: PieceId, // kept in synch with PieceOccult::active
   notches: Notches, // kept in synch with PieceOccult::passive
+  #[serde(default)]
   unnotched: HashSet<PieceId>, // kept in synch with PieceOccult::passive
   ppiece_use_size: Pos, // taken from first piece
   #[serde(flatten)] views: OccultationViews,