From 5e64d6dd6d4a99fa2eb7ebf677263875775365a5 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sun, 20 Oct 2024 23:35:42 +0200 Subject: [PATCH] added temporary system to revomve bugged paths --- .../com/troblecodings/signals/signalbox/SignalBoxGrid.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/troblecodings/signals/signalbox/SignalBoxGrid.java b/src/main/java/com/troblecodings/signals/signalbox/SignalBoxGrid.java index c7b77ac96..bc4db847b 100644 --- a/src/main/java/com/troblecodings/signals/signalbox/SignalBoxGrid.java +++ b/src/main/java/com/troblecodings/signals/signalbox/SignalBoxGrid.java @@ -191,6 +191,9 @@ protected void updatePrevious(final SignalBoxPathway pathway) { public void resetAllPathways() { ImmutableSet.copyOf(this.startsToPath.values()).forEach(this::resetPathway); clearPaths(); + modeGrid.values().forEach(node -> node.getModes().values() + .forEach(optionEntry -> optionEntry.getEntry(PathEntryType.PATHUSAGE) + .ifPresent(_u -> optionEntry.removeEntry(PathEntryType.PATHUSAGE)))); } public void resetAllSignals() {