From: Ian Jackson Date: Sat, 16 Apr 2022 11:31:08 +0000 (+0100) Subject: dice: Always provide the label text node X-Git-Tag: otter-1.1.0~529 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=eff2017c3b3037e2057e8ba74e09dabf7698526d;p=otter.git dice: Always provide the label text node This will give us a way to tell which elements are part of the cooldown clock and therefore need to be removed when it runs down. Signed-off-by: Ian Jackson --- diff --git a/dice/overlay-template-extractor b/dice/overlay-template-extractor index 54b15794..2b93f121 100755 --- a/dice/overlay-template-extractor +++ b/dice/overlay-template-extractor @@ -62,9 +62,9 @@ sub filter_text () { $node->removeChildNodes(); $node->appendText('{{ label_text }}'); } -p "{% if label_text != \"\" %}\n"; +# This node also acts as the sentinel for when the JS +# wants to remove the cooldown timer. process_node('textlabel', \&filter_text); -p "{% endif %}\n"; p "{% if cooldown_active %}\n"; process_node('timeblack', sub {