chiark / gitweb /
docs: wip document shapelibs, move from shapelib-toml
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 May 2021 00:52:36 +0000 (01:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 May 2021 00:52:36 +0000 (01:52 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
docs/shapelibs.rst
src/shapelib-toml.rs

index 390fe08139f3445d9af2e1be9f10f3b76582962d..3d4a9f507a2837c0ab964aa5c318a8d82fc49de3 100644 (file)
@@ -195,4 +195,11 @@ Parameters
    the other face is the same image, but flipped left-to-right.  It
    doesn't make sense to enable this for pieces with a symmetrical
    appearance.  (It is a bad idea to have the game contain state which
-   is not visible to the players.)
+   is not visible to the players.)  Not compatible with ``back``.
+
+ * ``back``: [_`Piece spec`].  The back of this piece looks like some
+   other piece (typically, another library item such as a card back).
+   If specified, the piece will have two faces: the one implied by its
+   ``files`` entry, and a 2nd face looking like ``back``.  If you want
+   to make the piece be occultable, you must also specify
+   ``occulted``.  ``back`` is not compatible with ``flip``.
index 7bea1e2838261f3cc88b22c45957541e25e8ae50..3759e972dec585c6118c8e60ac8852e1920e2867 100644 (file)
@@ -25,11 +25,7 @@ pub struct GroupDetails {
   #[serde(default)] pub orig_size: Vec<f64>,
   #[serde(default)] pub centre: Option<[f64; 2]>,
   #[serde(default)] pub flip: bool,
-
-  /// The back of this is some other item.  Doesn't make sense
-  /// with `flip`.
-  #[serde(default)]
-  pub back: Option<Box <dyn PieceSpec>>,
+  #[serde(default)] pub back: Option<Box <dyn PieceSpec>>,
 
   /// `size` and `centre` are in the SVG's own internal coordinate
   /// system, not the Otter scaled coordinates which result from