From 7f3599a859df7454cf09047f1d3168edd2288846 Mon Sep 17 00:00:00 2001 From: grigo Date: Fri, 5 Jun 2026 15:13:55 +0300 Subject: [PATCH] new RPG system --- routers/chat.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/routers/chat.py b/routers/chat.py index 5f0d0c0..808f4ce 100644 --- a/routers/chat.py +++ b/routers/chat.py @@ -745,17 +745,17 @@ async def chat_stream(request: ChatRequest): } if applied.get("step_advanced"): + # Drop stale narrator/plot choices from the step we just left; + # injection is shown once in the plot choice panel (beat_injection). + choices = [c for c in choices if c.get("type") == "new_arc_roll"] new_step = get_current_step(arc) - if new_step: - inj = (new_step.get("injection") or "").strip() - if inj: - debug_blocks.append({"type": "narrator_injection", "text": inj}) - if rpg_settings.get("choices", True): - choices += choices_from_step(new_step) + if new_step and rpg_settings.get("choices", True): + choices += choices_from_step(new_step) debug_blocks.append({ "type": "plot_arc", "text": f"Step advanced: «{applied.get('new_step_title', '')}»", }) + narrator_meta["choices_count"] = len(choices) if applied.get("arc_completed"): debug_blocks.append({