Skip to content

Commit

Permalink
fix: InterSignalBox can be added to saver
Browse files Browse the repository at this point in the history
  • Loading branch information
Uhutown committed Sep 8, 2024
1 parent 8fe8312 commit 56be18e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 56be18e

Please sign in to comment.