new RPG system

This commit is contained in:
2026-06-05 15:13:55 +03:00
parent 01b16dbeaa
commit 7f3599a859
+6 -6
View File
@@ -745,17 +745,17 @@ async def chat_stream(request: ChatRequest):
} }
if applied.get("step_advanced"): 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) new_step = get_current_step(arc)
if new_step: if new_step and rpg_settings.get("choices", True):
inj = (new_step.get("injection") or "").strip() choices += choices_from_step(new_step)
if inj:
debug_blocks.append({"type": "narrator_injection", "text": inj})
if rpg_settings.get("choices", True):
choices += choices_from_step(new_step)
debug_blocks.append({ debug_blocks.append({
"type": "plot_arc", "type": "plot_arc",
"text": f"Step advanced: «{applied.get('new_step_title', '')}»", "text": f"Step advanced: «{applied.get('new_step_title', '')}»",
}) })
narrator_meta["choices_count"] = len(choices)
if applied.get("arc_completed"): if applied.get("arc_completed"):
debug_blocks.append({ debug_blocks.append({