From: Ian Jackson Date: Sun, 15 May 2022 13:44:47 +0000 (+0100) Subject: dice: Use new templating arrangements to do away with d8 group X-Git-Tag: otter-1.1.0~97 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=df98c09a1fef7f141638fb55177ee61b04561e21;p=otter.git dice: Use new templating arrangements to do away with d8 group 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 --- diff --git a/library/edited.toml b/library/edited.toml index 5dfa9468..4f4ee6b4 100644 --- a/library/edited.toml +++ b/library/edited.toml @@ -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" } diff --git a/library/edited/die-image-d8-_c.svg b/library/edited/die-image-d8-_c.svg index 5d3fab5c..8a9470bd 100644 --- a/library/edited/die-image-d8-_c.svg +++ b/library/edited/die-image-d8-_c.svg @@ -2,9 +2,9 @@ + fit-margin-top="2.7" + fit-margin-left="2.7" + fit-margin-right="2.7" + fit-margin-bottom="2.7"> + originx="-1.8170593" + originy="-1.8283011" /> @@ -106,7 +106,7 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" - transform="translate(-4.5170594,-4.5283011)"> + transform="translate(-1.8170594,-1.8283011)">