diff --git a/src/main/java/de/ellpeck/prettypipes/network/ActiveCraft.java b/src/main/java/de/ellpeck/prettypipes/network/ActiveCraft.java index aad9b1b..6643a14 100644 --- a/src/main/java/de/ellpeck/prettypipes/network/ActiveCraft.java +++ b/src/main/java/de/ellpeck/prettypipes/network/ActiveCraft.java @@ -63,6 +63,19 @@ public class ActiveCraft implements INBTSerializable { this.canceled = nbt.getBoolean("canceled"); } + @Override + public String toString() { + return "ActiveCraft{" + + "pipe=" + this.pipe + + ", moduleSlot=" + this.moduleSlot + + ", travelingIngredients=" + this.travelingIngredients + + ", ingredientsToRequest=" + this.ingredientsToRequest + + ", resultDestPipe=" + this.resultDestPipe + + ", resultStackRemain=" + this.resultStackRemain + + ", inProgress=" + this.inProgress + + ", canceled=" + this.canceled + '}'; + } + public ItemStack getTravelingIngredient(ItemStack stack, ItemEquality... equalityTypes) { for (var traveling : this.travelingIngredients) { if (ItemEquality.compareItems(stack, traveling, equalityTypes)) @@ -71,14 +84,14 @@ public class ActiveCraft implements INBTSerializable { return ItemStack.EMPTY; } - public boolean markCanceledOrResolve(PipeNetwork network) { - if (this.inProgress) { - this.canceled = true; - return false; - } else { + public boolean markCanceledOrResolve(PipeNetwork network, boolean force) { + if (force || !this.inProgress) { for (var lock : this.ingredientsToRequest) network.resolveNetworkLock(lock); return true; + } else { + this.canceled = true; + return false; } } diff --git a/src/main/java/de/ellpeck/prettypipes/network/PipeNetwork.java b/src/main/java/de/ellpeck/prettypipes/network/PipeNetwork.java index 8eeea93..9c84a4a 100644 --- a/src/main/java/de/ellpeck/prettypipes/network/PipeNetwork.java +++ b/src/main/java/de/ellpeck/prettypipes/network/PipeNetwork.java @@ -109,7 +109,8 @@ public class PipeNetwork extends SavedData implements GraphListener streamWidgets() { return this.renderables.stream() - .filter(w -> w instanceof ItemTerminalWidget) - .map(w -> (ItemTerminalWidget) w); + .filter(w -> w instanceof ItemTerminalWidget) + .map(w -> (ItemTerminalWidget) w); } public static int requestModifier() { diff --git a/src/main/resources/assets/prettypipes/lang/en_us.json b/src/main/resources/assets/prettypipes/lang/en_us.json index 8911144..bfab943 100644 --- a/src/main/resources/assets/prettypipes/lang/en_us.json +++ b/src/main/resources/assets/prettypipes/lang/en_us.json @@ -94,7 +94,7 @@ "info.prettypipes.energy": "%s / %s FE", "info.prettypipes.crafting": "Awaiting", "info.prettypipes.cancel_all": "Cancel", - "info.prettypipes.cancel_all.desc": "Stops waiting for current crafting outputs\nOngoing crafting operations are still completed", + "info.prettypipes.cancel_all.desc": "Stops waiting for current crafting outputs\nOngoing crafting operations are still completed\nHold Shift to include ongoing crafting operations,\nwhich may cause partial recipes to stay behind", "info.prettypipes.no_pipe_connected": "The terminal needs to be connected to a pipe network", "info.prettypipes.too_many_pipes_connected": "The terminal can only be connected to a single pipe at a time", "dir.prettypipes.up": "Up",