diff --git a/docs/DESIGN.md b/docs/DESIGN.md index a3c343d..c2fe009 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -78,7 +78,8 @@ character, can run as one chain. **Board and rolling** - **Cards and pipes.** Cards show their numbered results and a die button. Drag from a - result's ● onto another card to lay a pipe. + result's ● onto another card to lay a pipe. A result can pipe into several cards (fan-out), + on ranged and weighted tables alike; one roll runs them all. - **Rolling.** Results flicker and land, and a bead travels each pipe. **Shift-click** fast-rolls with no animation. - **Play / Build modes.** Collapse a card, or every table from **View ▾**. Pan, zoom (8%–150%) with the **− 90% ▾ +** control (the percentage opens Fit board, Zoom to 100% and the minimap), minimap (M). @@ -296,6 +297,10 @@ templates/ built-in templates · examples/logic_demo.json (original demo board) - **Dice** always read `2d6` / `d6`. `2D` is accepted as input only. - **Choice types:** "Which option / How many / Open ended", from `Describe.choice_label`. - **JSON keys aren't renamed.** A rename needs a format bump plus migration. +- **Fan-out on ranged tables (2026-11-09).** Dropping a pipe from a range used to replace that + range's pipe, a rule left over from the first build. It was a user-reported bug (a "Rocky" range + could not feed Resources, Atmosphere and Water), so ranges now add pipes like weighted results. + `MainEditing.finish_link` uses `TableEntry.add_pipe`. The drop itself has no automated test. ## 7. Known gaps and bugs - **Only one pipe per target per result.** Pipes are keyed by target id, so the mockup's @@ -426,3 +431,6 @@ templates/ built-in templates · examples/logic_demo.json (original demo board) 17 topics. Build cards get a ⋯ menu instead of the gear and footer Delete, and row × buttons show on hover. The sample gained Luck, Make Camp (a pick card) and Search the Ruins (1d6 + Luck, with a cave-in and a vault only a modifier reaches). New suite: test_top_bar. + +**2026-11-09: fan-out fix** +14. A range on a ranged table can pipe into several cards; a new pipe no longer replaces the old one. diff --git a/ui/main_editing.gd b/ui/main_editing.gd index 0063f70..6135291 100644 --- a/ui/main_editing.gd +++ b/ui/main_editing.gd @@ -255,19 +255,11 @@ func finish_link() -> void: m.toast("Variable cards aren't rolled, so pipes can't lead into them. Use a change such as @%s += 1." % over.table.var_name) return m.undo_redo._begin_edit() - # Each range on a ranged table takes a single pipe, so a new one replaces the old. - var replaced: RollTable = null - if t.is_ranged(): - if not e.pipes.is_empty(): - replaced = m.data.get_table(e.pipes[0]) - e.pipes.clear() - e.pipes.append(over.table.id) + # A result may pipe into several cards (fan-out); a new pipe adds to the others. + e.add_pipe(over.table.id) m.card_for(t.id).rebuild() m.undo_redo._end_edit() - var msg := "“%s” now rolls on %s" % [e.text, over.table.name] - if replaced: - msg += " instead of %s" % replaced.name - m.toast(msg, true) + m.toast("“%s” now rolls on %s" % [e.text, over.table.name], true) func _card_under_mouse() -> TableCard: