From e09b382019686bcbb60f62d66a1f312f1f5d7e5d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 23 May 2021 01:35:05 +0100 Subject: [PATCH] docs: wip document shapelibs, move from shapelib-toml Signed-off-by: Ian Jackson --- docs/shapelibs.rst | 6 ++++++ src/shapelib-toml.rs | 9 ++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/shapelibs.rst b/docs/shapelibs.rst index 422e36ee..47bad98b 100644 --- a/docs/shapelibs.rst +++ b/docs/shapelibs.rst @@ -159,6 +159,12 @@ Parameters the usual default value: the latter would override any inherited setting. + * ``size`` (mandatory; 1- or 2-element array of numbers: width and height). + The size at which the piece will show up in the game, in nominal + game coordinate units. For reference: the builtin library's chess + pieces are 9.5 units; the builtin playing cards are 9.65,17.125. + NB, this value can be affected by ``scale``. + * ``item_prefix``, ``item_suffix`` (strings, default ``""``). Prepaended and appended to ``ITEM-SPEC`` in ``files`` to produce the item name. diff --git a/src/shapelib-toml.rs b/src/shapelib-toml.rs index 33691703..123fd837 100644 --- a/src/shapelib-toml.rs +++ b/src/shapelib-toml.rs @@ -20,13 +20,8 @@ pub struct GroupDefn { #[derive(Debug,Deserialize)] pub struct GroupDetails { - #[cfg(doc)] // handled specially - inherit: String, - - /// Should be either a 1- or 2- element list, x and y, or just one - /// number for both. - // scaled when put into GroupData - pub size: Vec, + #[cfg(doc)]inherit: String, // handled specially + pub size: Vec, // scaled when put into GroupData #[serde(default)] /// If specified, the input is first scaled from `orig_size` to -- 2.30.2