chiark / gitweb /
dice: Introduce die-d6-blue library item and use it
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 13 May 2022 19:08:35 +0000 (20:08 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 14 May 2022 18:09:56 +0000 (19:09 +0100)
This moves the die spec into the library.  It works now!  Although
it's not cosmetically very nice.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
library/edited.toml
specs/demo.game.toml

index 9d92d9ee1d2bffa5442508b1ab2e0a2d88aa47c7..996d736692d44f9b4c8dbe3dcc70e38434cca8ce 100644 (file)
@@ -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]
index ea0deb477a4293d06c557866127fada1c3fb2b95..03e680b8896343754a83e79548899e78d16ab483 100644 (file)
@@ -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]