chiark / gitweb /
dice: Use new templating arrangements to do away with d8 group
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 15 May 2022 13:44:47 +0000 (14:44 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 15 May 2022 22:38:57 +0000 (23:38 +0100)
Now we can have different dice all ni the smme group.

They all have to have the same size, so we adjust the d8 svg
accordingly.  (The d6 svg has to be the way it is because it's
extracted from the die cooldown etc. template.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
library/edited.toml
library/edited/die-image-d8-_c.svg

index 5dfa94681e646ae8bb945a9769ac59e8beb76451..4f4ee6b492866566983dcccaddbc43cc77b92385 100644 (file)
@@ -31,17 +31,19 @@ outline.shape = "Circle"
 outline.size = [14]
 item_prefix = "die-image-"
 files = """
-d6-_c  -       a ${colour} die image
+:xd
+d6-_c  -       6       a ${colour} die image
+d8-_c  -       8       a ${colour} die image
 """
 
 magic.item_prefix = "die-"
 magic.template = """
 image = ${image}
 type = "Die"
-labels = 6
+labels = ${xd}
 desc = "a ${colour} die"
 occult.label = "?"
-occult.ilk = "d6-${colour}"
+occult.ilk = "d${xd}-${colour}"
 """
 
 [group.dice.colours.blue]
@@ -49,20 +51,4 @@ abbrev = "blue"
 
 [group.dice.colours.red]
 abbrev = "red"
-map = { "#8fc6ff" = "#e64104", "#000000" = "#ffffff" }
-
-[group.dice-d8]
-inherit = "dice"
-size = [14]
-files = """
-d8-_c  -       a ${colour} die image
-"""
-magic.item_prefix = "die-"
-magic.template = """
-image = ${image}
-type = "Die"
-labels = 8
-desc = "a ${colour} die"
-occult.label = "?"
-occult.ilk = "d8-${colour}"
-"""
+map = { "#8fc6ff" = "#e64104", "#000000" = "#ffffff", "#ffffff" = "#000000" }
index 5d3fab5ce8568ce1ccabc94a014a17e91efe3e07..8a9470bd525639811d1fbe764adb80a7d27a64ee 100644 (file)
@@ -2,9 +2,9 @@
 <!-- Created with Inkscape (http://www.inkscape.org/) -->
 
 <svg
-   width="11.062973"
-   height="11.051731"
-   viewBox="-10 -10 11.062973 11.051731"
+   width="16.462973"
+   height="16.451731"
+   viewBox="-10 -10 16.462973 16.451731"
    version="1.1"
    id="svg5"
    sodipodi:docname="die-image-d8-_c.svg"
      width="100px"
      viewbox-width="20"
      viewbox-height="20"
-     inkscape:zoom="43.478367"
-     inkscape:cx="5.5314865"
-     inkscape:cy="5.5314865"
+     inkscape:zoom="30.0625"
+     inkscape:cx="9.962578"
+     inkscape:cy="5.970894"
      inkscape:window-width="1195"
      inkscape:window-height="969"
-     inkscape:window-x="303"
+     inkscape:window-x="614"
      inkscape:window-y="0"
      inkscape:window-maximized="1"
      inkscape:current-layer="layer1"
      lock-margins="true"
-     fit-margin-top="0"
-     fit-margin-left="0"
-     fit-margin-right="0"
-     fit-margin-bottom="0">
+     fit-margin-top="2.7"
+     fit-margin-left="2.7"
+     fit-margin-right="2.7"
+     fit-margin-bottom="2.7">
     <inkscape:grid
        type="xygrid"
        id="grid846"
@@ -53,8 +53,8 @@
        enabled="true"
        spacingx="0.052916667"
        spacingy="0.052916667"
-       originx="-4.5170593"
-       originy="-4.5283011" />
+       originx="-1.8170593"
+       originy="-1.8283011" />
   </sodipodi:namedview>
   <metadata
      id="metadata830">
      inkscape:label="Layer 1"
      inkscape:groupmode="layer"
      id="layer1"
-     transform="translate(-4.5170594,-4.5283011)">
+     transform="translate(-1.8170594,-1.8283011)">
     <path
        style="fill:#8fc6ff;fill-opacity:1;stroke:#000000;stroke-width:0.24;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
        d="m -5.0787506,0.74208276 4.42581055,4.42581054 a 1,1 9.8432253e-8 0 0 1.41421356,0 L 5.1678933,0.76127351 a 1,1 90.000001 0 0 0,-1.41421358 L 0.76127377,-5.0595598 a 1,1 1.2304033e-6 0 0 -1.41421357,0 l -4.4258108,4.42581052 a 0.97286015,0.97286015 90.000001 0 0 0,1.37583204 z"