chiark / gitweb /
otter.git
2 years agodocs: Document library magic items
Ian Jackson [Wed, 25 May 2022 00:26:25 +0000 (01:26 +0100)]
docs: Document library magic items

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodocs: Fix formatting in mformat section
Ian Jackson [Wed, 25 May 2022 00:26:11 +0000 (01:26 +0100)]
docs: Fix formatting in mformat section

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodocs: Clarify where extra fields go
Ian Jackson [Wed, 25 May 2022 00:24:54 +0000 (01:24 +0100)]
docs: Clarify where extra fields go

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodocs: Provide xref for piece specs
Ian Jackson [Wed, 25 May 2022 00:24:29 +0000 (01:24 +0100)]
docs: Provide xref for piece specs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodocs: Document new substitution syntax
Ian Jackson [Sun, 15 May 2022 21:23:40 +0000 (22:23 +0100)]
docs: Document new substitution syntax

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoangles: Reinstate compatibility with mf1 format
Ian Jackson [Mon, 23 May 2022 18:07:33 +0000 (19:07 +0100)]
angles: Reinstate compatibility with mf1 format

We don't need to check the mformat, since the old syntax is disjoint
from the new one.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoSupport stack_pos on PickupDeck
Ian Jackson [Sun, 22 May 2022 22:43:49 +0000 (23:43 +0100)]
Support stack_pos on PickupDeck

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoAdd more missing font options
Ian Jackson [Sun, 22 May 2022 19:28:26 +0000 (20:28 +0100)]
Add more missing font options

usvg has terrible defaults.  Without these, text silently vanishes.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agousvg: Pass default options even during bundle processing.
Ian Jackson [Sun, 22 May 2022 19:34:45 +0000 (20:34 +0100)]
usvg: Pass default options even during bundle processing.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agousvg: Refactor code that runs it in bundles.rs
Ian Jackson [Sun, 22 May 2022 19:31:12 +0000 (20:31 +0100)]
usvg: Refactor code that runs it in bundles.rs

This provides a place to put additional command line options.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoPlumb usvg options from a file src/USVG_DEFAULT_ARGS.txt
Ian Jackson [Sun, 22 May 2022 19:27:04 +0000 (20:27 +0100)]
Plumb usvg options from a file src/USVG_DEFAULT_ARGS.txt

Rather than the Makefile.  This will let us make the default arguments
available to Rust code.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agousvg-processor: Print the command we run
Ian Jackson [Sun, 22 May 2022 19:24:34 +0000 (20:24 +0100)]
usvg-processor: Print the command we run

We're going to bury some extra option addition here, but it should be
visibile.  Ah well, the build log ever grows.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoangles: Make not be insane
Ian Jackson [Sun, 22 May 2022 11:02:57 +0000 (12:02 +0100)]
angles: Make not be insane

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodocs: Fix a typo
Ian Jackson [Sun, 22 May 2022 09:51:25 +0000 (10:51 +0100)]
docs: Fix a typo

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoat-currency: Test depositing from hidden
Ian Jackson [Sun, 22 May 2022 09:50:01 +0000 (10:50 +0100)]
at-currency: Test depositing from hidden

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoapitest: Rename some variables
Ian Jackson [Sun, 22 May 2022 09:29:44 +0000 (10:29 +0100)]
apitest: Rename some variables

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoat-currency: More tests
Ian Jackson [Sun, 22 May 2022 09:27:04 +0000 (10:27 +0100)]
at-currency: More tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoat-currency: More tests
Ian Jackson [Sun, 22 May 2022 09:21:22 +0000 (10:21 +0100)]
at-currency: More tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoapitest: Fish out quantities
Ian Jackson [Sun, 22 May 2022 09:07:59 +0000 (10:07 +0100)]
apitest: Fish out quantities

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoapitest: Introduce tree_walk; at-currency: test wip
Ian Jackson [Sun, 22 May 2022 08:53:29 +0000 (09:53 +0100)]
apitest: Introduce tree_walk; at-currency: test wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoat-currency: More tests
Ian Jackson [Sat, 21 May 2022 12:32:25 +0000 (13:32 +0100)]
at-currency: More tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoat-currency: Use move_money another time
Ian Jackson [Sat, 21 May 2022 12:24:39 +0000 (13:24 +0100)]
at-currency: Use move_money another time

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoat-currency: Make move_money a method on Session
Ian Jackson [Sat, 21 May 2022 12:23:33 +0000 (13:23 +0100)]
at-currency: Make move_money a method on Session

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoat-currency: Break out move_money
Ian Jackson [Sat, 21 May 2022 12:17:24 +0000 (13:17 +0100)]
at-currency: Break out move_money

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoat-currency: wip occult test
Ian Jackson [Sat, 21 May 2022 10:48:49 +0000 (11:48 +0100)]
at-currency: wip occult test

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoat-currency: wip occult test
Ian Jackson [Fri, 20 May 2022 18:56:06 +0000 (19:56 +0100)]
at-currency: wip occult test

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agofastsplit: Properly occult the left-behind piece
Ian Jackson [Fri, 20 May 2022 18:04:33 +0000 (19:04 +0100)]
fastsplit: Properly occult the left-behind piece

When we split, occult the new piece, if appropriate.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agofastsplit: Promote construction of ipc_from_record
Ian Jackson [Fri, 20 May 2022 18:04:21 +0000 (19:04 +0100)]
fastsplit: Promote construction of ipc_from_record

fs_record borrows from ig, so doing this sooner is helpful so we can
pass ig to complex recalculation code.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Occult the left-behind value too
Ian Jackson [Thu, 19 May 2022 23:22:59 +0000 (00:22 +0100)]
currency: Occult the left-behind value too

By plumbing Value more, rather than raw Qty.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Occult multigrab taken log properly
Ian Jackson [Fri, 20 May 2022 18:13:43 +0000 (19:13 +0100)]
currency: Occult multigrab taken log properly

Also rename two variables to be more accurate.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Use our own describe function
Ian Jackson [Thu, 19 May 2022 23:15:34 +0000 (00:15 +0100)]
currency: Use our own describe function

This will enable us to use our own occultation handling for the
description, soon.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Drop an unused variable
Ian Jackson [Thu, 19 May 2022 23:15:28 +0000 (00:15 +0100)]
currency: Drop an unused variable

This has become redundant, recently.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Split a line
Ian Jackson [Thu, 19 May 2022 23:11:51 +0000 (00:11 +0100)]
currency: Split a line

This is going to get more complicated.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Merge even when we're occulted
Ian Jackson [Thu, 19 May 2022 20:31:37 +0000 (21:31 +0100)]
currency: Merge even when we're occulted

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agofastsplit: No longer have fastsplit_delete insist on pass
Ian Jackson [Thu, 19 May 2022 20:29:40 +0000 (21:29 +0100)]
fastsplit: No longer have fastsplit_delete insist on pass

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Rename show_new_qty
Ian Jackson [Thu, 19 May 2022 20:26:05 +0000 (21:26 +0100)]
currency: Rename show_new_qty

We're going to show different quantities at different times.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Change Value::html to demand a ShowUnocculted
Ian Jackson [Thu, 19 May 2022 20:16:20 +0000 (21:16 +0100)]
currency: Change Value::html to demand a ShowUnocculted

This finds places we need to hide the quantity.  One (new_value) was
wrong, and is now fixed.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Change "new_qty" to "new_value"
Ian Jackson [Thu, 19 May 2022 20:12:43 +0000 (21:12 +0100)]
currency: Change "new_qty" to "new_value"

Spotted a bug, which leaked value during occultation.  Putting new_qty
inside Value makes it easier to arrange to always call call .html on
it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Rename to show_to_player
Ian Jackson [Thu, 19 May 2022 19:57:09 +0000 (20:57 +0100)]
currency: Rename to show_to_player

This is how it's going to be when we occult.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Move slight, to prepare for occultation
Ian Jackson [Thu, 19 May 2022 19:56:42 +0000 (20:56 +0100)]
currency: Move slight, to prepare for occultation

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Restructure slightly to make next log changes easier
Ian Jackson [Thu, 19 May 2022 19:52:32 +0000 (20:52 +0100)]
currency: Restructure slightly to make next log changes easier

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Offer occulted version
Ian Jackson [Thu, 19 May 2022 19:37:22 +0000 (20:37 +0100)]
currency: Offer occulted version

But we don't do merging within occultations yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Promote image conversion
Ian Jackson [Thu, 19 May 2022 19:36:41 +0000 (20:36 +0100)]
currency: Promote image conversion

Occult will want it earlier.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Break out describe()
Ian Jackson [Thu, 19 May 2022 19:36:15 +0000 (20:36 +0100)]
currency: Break out describe()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Break out value.html()
Ian Jackson [Thu, 19 May 2022 19:34:48 +0000 (20:34 +0100)]
currency: Break out value.html()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Break out render
Ian Jackson [Thu, 19 May 2022 19:24:57 +0000 (20:24 +0100)]
currency: Break out render

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: Support adjusting size of the unit text, separately
Ian Jackson [Thu, 19 May 2022 17:55:19 +0000 (18:55 +0100)]
currency: Support adjusting size of the unit text, separately

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodice: Arrange to use text_options.start_element
Ian Jackson [Thu, 19 May 2022 18:57:48 +0000 (19:57 +0100)]
dice: Arrange to use text_options.start_element

What a palaver!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodice: Insist that x and y are as our Rust would calculate them
Ian Jackson [Thu, 19 May 2022 17:06:28 +0000 (18:06 +0100)]
dice: Insist that x and y are as our Rust would calculate them

Preparatory for using TextOptions::start_element, which expects
to centre text at the nominal position.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoBreak out SVG_FONT_Y_ADJUST_OF_FONT_SIZE into a separate file.
Ian Jackson [Thu, 19 May 2022 17:22:05 +0000 (18:22 +0100)]
Break out SVG_FONT_Y_ADJUST_OF_FONT_SIZE into a separate file.

The dice template extractor is going to want this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodice: Don't include p in process_node.
Ian Jackson [Thu, 19 May 2022 17:13:10 +0000 (18:13 +0100)]
dice: Don't include p in process_node.

The text noce is going to want to do something odd.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoTextOptions: break out y_adjust
Ian Jackson [Thu, 19 May 2022 12:18:41 +0000 (13:18 +0100)]
TextOptions: break out y_adjust

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodice: Note a todo
Ian Jackson [Thu, 19 May 2022 12:17:46 +0000 (13:17 +0100)]
dice: Note a todo

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoBreak out TextOptions::start_element (from currency)
Ian Jackson [Thu, 19 May 2022 12:04:55 +0000 (13:04 +0100)]
Break out TextOptions::start_element (from currency)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoUse TextOptions in currency, so it now supports setting text size
Ian Jackson [Thu, 19 May 2022 11:47:47 +0000 (12:47 +0100)]
Use TextOptions in currency, so it now supports setting text size

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoMove text size into TextOptions, so dice now support setting text size
Ian Jackson [Thu, 19 May 2022 11:42:22 +0000 (12:42 +0100)]
Move text size into TextOptions, so dice now support setting text size

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochildio: Work around Linux kernel race bug
Ian Jackson [Thu, 19 May 2022 18:36:16 +0000 (19:36 +0100)]
childio: Work around Linux kernel race bug

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodocs: Fix a minor case oddity
Ian Jackson [Thu, 19 May 2022 11:42:07 +0000 (12:42 +0100)]
docs: Fix a minor case oddity

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoBreak out TextOptions and TextOptionsSpec
Ian Jackson [Thu, 19 May 2022 11:29:40 +0000 (12:29 +0100)]
Break out TextOptions and TextOptionsSpec

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocurrency: support label text recolouring
Ian Jackson [Tue, 17 May 2022 01:11:04 +0000 (02:11 +0100)]
currency: support label text recolouring

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoBreak out ColourSpecExt::resolve
Ian Jackson [Tue, 17 May 2022 01:10:36 +0000 (02:10 +0100)]
Break out ColourSpecExt::resolve

Hrm, maybe this should have been load() ?  This will do for now.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodemo.game.toml: Remove non-hnoured min_unit setting
Ian Jackson [Tue, 17 May 2022 00:58:48 +0000 (01:58 +0100)]
demo.game.toml: Remove non-hnoured min_unit setting

We decided to leave this to the players.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoHtml: Fix Debug truncation to not randomly panic
Ian Jackson [Tue, 17 May 2022 00:58:26 +0000 (01:58 +0100)]
Html: Fix Debug truncation to not randomly panic

Ow!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agospec loop detecton: Write down the rule
Ian Jackson [Mon, 16 May 2022 02:08:23 +0000 (03:08 +0100)]
spec loop detecton: Write down the rule

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agospec loop detecton: Detect for magic too.
Ian Jackson [Mon, 16 May 2022 01:58:39 +0000 (02:58 +0100)]
spec loop detecton: Detect for magic too.

Introduce PieceLoadArgs::recursing, and use it in the one current call
site.

Make the error more general.  So now we can call it for magic too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Misc minor improvements
Ian Jackson [Mon, 16 May 2022 01:36:32 +0000 (02:36 +0100)]
clippy: Misc minor improvements

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Remove a redundant pair of parens
Ian Jackson [Mon, 16 May 2022 01:31:06 +0000 (02:31 +0100)]
clippy: Remove a redundant pair of parens

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocli bundles: autozip: Use Deflate
Ian Jackson [Mon, 16 May 2022 01:03:45 +0000 (02:03 +0100)]
cli bundles: autozip: Use Deflate

This is considerably faster.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoprogress reporting: Nest: Provide and use more desc plumbing
Ian Jackson [Mon, 16 May 2022 00:59:41 +0000 (01:59 +0100)]
progress reporting: Nest: Provide and use more desc plumbing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocli bundle progress: Say we're hashing, when we are.
Ian Jackson [Mon, 16 May 2022 00:48:36 +0000 (01:48 +0100)]
cli bundle progress: Say we're hashing, when we are.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocli bundle progress: Report for files in the zip we're building
Ian Jackson [Mon, 16 May 2022 00:31:30 +0000 (01:31 +0100)]
cli bundle progress: Report for files in the zip we're building

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocli bundle progress: Collect local zipfile members in a vec
Ian Jackson [Mon, 16 May 2022 00:25:52 +0000 (01:25 +0100)]
cli bundle progress: Collect local zipfile members in a vec

This will let us easily count them, which we want to do for progress
reporting.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoprogress: Nest: Fix to actually be progressive
Ian Jackson [Mon, 16 May 2022 00:11:40 +0000 (01:11 +0100)]
progress: Nest: Fix to actually be progressive

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocli bundle progress: clear before thinking about bundles
Ian Jackson [Mon, 16 May 2022 00:09:32 +0000 (01:09 +0100)]
cli bundle progress: clear before thinking about bundles

Otherwise the output is a bit messed up.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoprogress: Nest: Issue a report at outer phase transitions
Ian Jackson [Mon, 16 May 2022 00:04:35 +0000 (01:04 +0100)]
progress: Nest: Issue a report at outer phase transitions

There's not much to say here, but without this, if the inner phase
does nothing, the user sees nothing.  Better to do something here.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agootter cli: Use new Nest progress during bundle uploading
Ian Jackson [Sun, 15 May 2022 23:57:02 +0000 (00:57 +0100)]
otter cli: Use new Nest progress during bundle uploading

This lets us show progress of zipfile preparation.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoprogress: Replace Nest
Ian Jackson [Mon, 16 May 2022 02:09:08 +0000 (03:09 +0100)]
progress: Replace Nest

This version doesn't need everyone to have counts.  In particular, you
can have woolly phases.  The otterlib bundle processing will want
this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoprogress: Rename NestEqual from Nest
Ian Jackson [Sun, 15 May 2022 20:43:09 +0000 (21:43 +0100)]
progress: Rename NestEqual from Nest

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoprogress: Allow ProgressInfo's Count to contain only a proportion
Ian Jackson [Sun, 15 May 2022 20:21:28 +0000 (21:21 +0100)]
progress: Allow ProgressInfo's Count to contain only a proportion

We're going to introduce a thing that will use this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agobundle auto-zip: works, but needs some progress reporting
Ian Jackson [Sun, 15 May 2022 19:16:48 +0000 (20:16 +0100)]
bundle auto-zip: works, but needs some progress reporting

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agobundle auto-zip: wip
Ian Jackson [Sun, 15 May 2022 17:37:22 +0000 (18:37 +0100)]
bundle auto-zip: wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodice: Set label colour of red dice. Hooray!
Ian Jackson [Sun, 15 May 2022 15:49:15 +0000 (16:49 +0100)]
dice: Set label colour of red dice.  Hooray!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodice: Allow setting label colour
Ian Jackson [Sun, 15 May 2022 15:30:50 +0000 (16:30 +0100)]
dice: Allow setting label colour

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodice: Use new templating arrangements to do away with d8 group
Ian Jackson [Sun, 15 May 2022 13:44:47 +0000 (14:44 +0100)]
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 <ijackson@chiark.greenend.org.uk>
2 years agobundles: Fix a bug which could cause IE on bundle load
Ian Jackson [Sun, 15 May 2022 22:32:20 +0000 (23:32 +0100)]
bundles: Fix a bug which could cause IE on bundle load

We need to make an entry entry in the bundles notes array even if the
hash is missing.  Or we might try to reuse the bundle number, if there
was a failed bundle upload followed by a server restart.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoshapelib bundle tests: Do not filter out "filenames" after ^:
Ian Jackson [Sun, 15 May 2022 22:00:05 +0000 (23:00 +0100)]
shapelib bundle tests: Do not filter out "filenames" after ^:

These are actually extra field definitions.  If there are these, our
parser is too stupid.  We're just filtering out the source filenames
to know that otter isn't reading them.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoshapelib subst: Reorder other settings
Ian Jackson [Sun, 15 May 2022 15:58:34 +0000 (16:58 +0100)]
shapelib subst: Reorder other settings

This lets the explicit substs from various places override the builtin
image and colour.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoshapelib subst: Reorder overrides
Ian Jackson [Sun, 15 May 2022 15:57:21 +0000 (16:57 +0100)]
shapelib subst: Reorder overrides

This is a bit confusing.  Early settings take precedence since they
get substituted away!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoshapelib, subst: Allow colours to provide magic substs
Ian Jackson [Sun, 15 May 2022 15:52:56 +0000 (16:52 +0100)]
shapelib, subst: Allow colours to provide magic substs

Eg, for text colour.  The dice want this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoshapelib, subst: Allow groups to provide magic substs
Ian Jackson [Sun, 15 May 2022 15:48:51 +0000 (16:48 +0100)]
shapelib, subst: Allow groups to provide magic substs

Otherwise they might have to recapitulate the template.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoshapelib subst: Prepare for substituting more into magic
Ian Jackson [Sun, 15 May 2022 15:37:59 +0000 (16:37 +0100)]
shapelib subst: Prepare for substituting more into magic

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodocs: Document die numeric labels
Ian Jackson [Sun, 15 May 2022 15:06:27 +0000 (16:06 +0100)]
docs: Document die numeric labels

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agorun-inkscape-extension: Work around a weird inkscape behaviour
Ian Jackson [Sun, 15 May 2022 14:58:12 +0000 (15:58 +0100)]
run-inkscape-extension: Work around a weird inkscape behaviour

Without this, generic recolour instructions in shape libraries don't
work right if some of the recolourings don't apply to some of the
image files in the group.  Which is about to be the case.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agosubst: Use ${...} format internally for most things
Ian Jackson [Sun, 15 May 2022 14:22:54 +0000 (15:22 +0100)]
subst: Use ${...} format internally for most things

This saves allocating in the usual case and is also clearer.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agosubst tests: Add test cases for converting needles
Ian Jackson [Sun, 15 May 2022 14:29:40 +0000 (15:29 +0100)]
subst tests: Add test cases for converting needles

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agosubst: Have substitutor handle any needle syntax
Ian Jackson [Sun, 15 May 2022 14:09:29 +0000 (15:09 +0100)]
subst: Have substitutor handle any needle syntax

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agosubst: Have subst_general return the resolved needle
Ian Jackson [Sun, 15 May 2022 19:23:36 +0000 (20:23 +0100)]
subst: Have subst_general return the resolved needle

This corrects the error reporting to show what we actually looked for.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agosubst test: Add many dbg calls
Ian Jackson [Sun, 15 May 2022 14:36:49 +0000 (15:36 +0100)]
subst test: Add many dbg calls

It turns out that I can make these fail and having it debug is useful.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodice: Change the inner edges in the blue d8
Ian Jackson [Sun, 15 May 2022 13:36:48 +0000 (14:36 +0100)]
dice: Change the inner edges in the blue d8

This looks better.  We will have to recolour them for the red die.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agosubst: Substitute x* variables into magic template
Ian Jackson [Sun, 15 May 2022 13:35:10 +0000 (14:35 +0100)]
subst: Substitute x* variables into magic template

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>