From 75c92585371443f73c81ade3eded3ec4562e0954 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 17 Aug 2022 17:34:13 +0200 Subject: [PATCH] rulegen3:: w_r3_no_road_shortcuts --- rulegen.cpp | 1 + rulegen3.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/rulegen.cpp b/rulegen.cpp index 404ac1e1..5c521bed 100644 --- a/rulegen.cpp +++ b/rulegen.cpp @@ -92,6 +92,7 @@ static const flagtype w_skip_transducers = Flag(32); /*< skip the transducer tes static const flagtype w_skip_transducer_loops = Flag(33); /*< skip loops during the transducer test */ static const flagtype w_skip_transducer_terminate = Flag(34); /*< skip termination during the transducer test */ static const flagtype w_r3_all_errors = Flag(35); /*< consider all errors for R3 */ +static const flagtype w_r3_no_road_shortcuts = Flag(36); /*< consider all errors for R3 */ #endif /** these control the output */ diff --git a/rulegen3.cpp b/rulegen3.cpp index c572f77a..bbd428b8 100644 --- a/rulegen3.cpp +++ b/rulegen3.cpp @@ -24,6 +24,7 @@ map qroad_for; map qroad_memo; EX void add_road_shortcut(tcell *s, tcell *t) { + if(flags & w_r3_no_road_shortcuts) return; shared_ptr u; vector tpath; if(!road_shortcuts.count(s->id)) road_shortcuts[s->id] = make_shared(); @@ -58,6 +59,7 @@ EX void add_road_shortcut(tcell *s, tcell *t) { EX int newcon; EX void apply_road_shortcut(tcell *s) { + if(flags & w_r3_no_road_shortcuts) return; auto& mem = qroad_memo[s]; if(mem == qroad_for[s->id]) return; mem = qroad_for[s->id];