From 8601d919250f47f343e33192fd5a3772422f367c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 13 May 2022 20:08:35 +0100 Subject: [PATCH] dice: Introduce die-d6-blue library item and use it This moves the die spec into the library. It works now! Although it's not cosmetically very nice. Signed-off-by: Ian Jackson --- library/edited.toml | 12 +++++++++++- specs/demo.game.toml | 11 +++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/library/edited.toml b/library/edited.toml index 9d92d9ee..996d7366 100644 --- a/library/edited.toml +++ b/library/edited.toml @@ -31,7 +31,17 @@ outline.shape = "Circle" outline.size = [10] item_prefix = "die-image-" files = """ -d6-_c - a _colour die +d6-_c - a _colour die image +""" + +magic.item_prefix = "die-" +magic.template = """ +image = ! +type = "Die" +labels = 6 +desc = "a _colour die" +occult.label = "?" +occult.ilk = "d6-_colour" """ [group.dice.colours.blue] diff --git a/specs/demo.game.toml b/specs/demo.game.toml index ea0deb47..03e680b8 100644 --- a/specs/demo.game.toml +++ b/specs/demo.game.toml @@ -74,14 +74,9 @@ image.faces = ["#ccccff", "#ccffcc"] [[pieces]] pos = [140, 15] -type = "Die" -labels = 6 -desc = "a blue die" -occult.ilk = "d6-blue" -occult.label = "?" -image.type = "Lib" -image.lib = "edited" -image.item = "die-image-d6-blue" +type = "Lib" +lib = "edited" +item = "die-d6-blue" [[pieces]] pos = [125, 15] -- 2.30.2