40 lines
1.2 KiB
JSON
40 lines
1.2 KiB
JSON
|
|
{
|
|||
|
|
"format_version": 1,
|
|||
|
|
"name": "Counter",
|
|||
|
|
"description": "A number variable and a card that adds one, takes one away or resets it. Read the variable in any expression, or show it in text with {@name}.",
|
|||
|
|
"kind": "group",
|
|||
|
|
"params": [
|
|||
|
|
{"name": "label", "label": "Name shown on the cards", "default": "Counter"},
|
|||
|
|
{"name": "name", "label": "Variable name (lowercase, no @)", "default": "counter"},
|
|||
|
|
{"name": "start", "label": "Starting value", "default": "0"}
|
|||
|
|
],
|
|||
|
|
"tables": [
|
|||
|
|
{
|
|||
|
|
"id": "var",
|
|||
|
|
"name": "{$label}",
|
|||
|
|
"kind": "variable",
|
|||
|
|
"var_name": "{$name}",
|
|||
|
|
"initial": "{$start}",
|
|||
|
|
"x": 22,
|
|||
|
|
"y": 68,
|
|||
|
|
"entries": []
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"id": "change",
|
|||
|
|
"name": "Change {$label}",
|
|||
|
|
"kind": "choice",
|
|||
|
|
"prompt": "{$label} is {@{$name}}. Change it?",
|
|||
|
|
"x": 342,
|
|||
|
|
"y": 68,
|
|||
|
|
"entries": [
|
|||
|
|
{"id": "e1", "text": "+1", "effects": "@{$name} += 1"},
|
|||
|
|
{"id": "e2", "text": "−1", "effects": "@{$name} -= 1"},
|
|||
|
|
{"id": "e3", "text": "Reset", "effects": "reset @{$name}"}
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"groups": [
|
|||
|
|
{"name": "{$label}", "x": 0, "y": 0, "w": 620, "h": 300, "members": ["var", "change"]}
|
|||
|
|
]
|
|||
|
|
}
|