From 56be18e394fa23f509dff77cfb59fe8f111aaba7 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sun, 8 Sep 2024 12:13:12 +0200 Subject: [PATCH] fix: InterSignalBox can be added to saver --- .../com/troblecodings/signals/guis/ContainerSignalBox.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/troblecodings/signals/guis/ContainerSignalBox.java b/src/main/java/com/troblecodings/signals/guis/ContainerSignalBox.java index f8e74649b..4afb19c71 100644 --- a/src/main/java/com/troblecodings/signals/guis/ContainerSignalBox.java +++ b/src/main/java/com/troblecodings/signals/guis/ContainerSignalBox.java @@ -338,7 +338,9 @@ public void deserializeServer(final ReadBuffer buffer) { final Point end = Point.of(buffer); final PathwayRequestResult request = grid.requestWay(start, end); if (!request.isPass()) { - if (request.canBeAddedToSaver() && grid.addNextPathway(start, end)) { + final SignalBoxNode endNode = grid.getNode(end); + if (request.canBeAddedToSaver() && !endNode.containsOutConnection() + && grid.addNextPathway(start, end)) { final WriteBuffer sucess = new WriteBuffer(); sucess.putEnumValue(SignalBoxNetwork.ADDED_TO_SAVER); sucess.putEnumValue(request);