Skip to content

Commit aa17c9b

Browse files
committed
fix: re-roll seed on manual restart so constellations vary
ControlAction::Restart reused original_seed verbatim, so pressing 'r' always re-picked the same Constellation figure. Re-roll a fresh seed on each manual restart unless a seed was pinned via --seed (then it stays reproducible).
1 parent 02c5503 commit aa17c9b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/app/runner.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,15 @@ pub fn run_simulation(
26992699
}
27002700
ControlAction::Restart => {
27012701
let init_mode = effective_init_mode(runtime_state.original_init_mode);
2702-
sim.reset(runtime_state.original_seed, init_mode);
2702+
// Re-roll the seed on each manual restart so seed-driven
2703+
// choices (e.g. the Constellation figure) vary — UNLESS a
2704+
// seed was pinned via `--seed`, which stays reproducible.
2705+
let seed = match args.seed {
2706+
Some(pinned) => pinned,
2707+
None => crate::app::fresh_seed(),
2708+
};
2709+
runtime_state.original_seed = seed;
2710+
sim.reset(seed, init_mode);
27032711
}
27042712
ControlAction::QuickKey(c) => match resolve_bind(c, &user_binds) {
27052713
Some(crate::keybind_manager::BindTarget::Preset(preset)) => {

0 commit comments

Comments
 (0)