From bfa43823f683309a323dd2ce2298a5056682beaa Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 8 Apr 2024 16:42:44 -0400 Subject: [PATCH] Minor class cleanup --- src/engine/gameManager/ForgeManager.java | 4 +++- src/engine/loot/WorkOrder.java | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index feaa38a7..c9e1bbbf 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -58,7 +58,7 @@ public enum ForgeManager implements Runnable { // Resubmit workOrder workOrder.completionTime = System.currentTimeMillis() + workOrder.rollingDuration; - workOrder.total_to_produce = workOrder.total_to_produce - 1; + workOrder.total_produced = workOrder.total_produced - 1; workOrders.add(workOrder); Logger.info("Workorder has cycled: " + workOrder.workOrderID); @@ -86,6 +86,8 @@ public enum ForgeManager implements Runnable { if (workOrder.slotCount > 1 && workOrder.total_to_produce == 0) workOrder.slotCount = 1; + Logger.info(workOrder.toString()); + workOrder.vendor.workOrders.add(workOrder); workOrders.add(workOrder); } diff --git a/src/engine/loot/WorkOrder.java b/src/engine/loot/WorkOrder.java index 49fbb2d1..e4c51dfd 100644 --- a/src/engine/loot/WorkOrder.java +++ b/src/engine/loot/WorkOrder.java @@ -52,4 +52,23 @@ public class WorkOrder implements Delayed { public int compareTo(@NotNull Delayed o) { return toIntExact(this.completionTime - ((WorkOrder) o).completionTime); } + + public String toString() { + String outSTring = "wordOrderID" + this.workOrderID + "\r\n" + + "vendor" + this.vendor.getObjectUUID() + "\r\n" + + "slotCount" + this.slotCount + "\r\n" + + "total_to_produce" + this.total_to_produce + "\r\n" + + "total_produced" + this.total_produced + "\r\n" + + "templateID" + this.templateID + "\r\n" + + "itemName" + this.itemName + "\r\n" + + "prefixToken" + this.prefixToken + "\r\n" + + "suffixToken" + this.suffixToken + "\r\n" + + "rollingDuration" + this.rollingDuration + "\r\n" + + "completionTime" + this.completionTime + "\r\n" + + "runCompleted" + this.runCompleted + "\r\n" + + "runCanceled" + this.runCanceled + "\r\n"; + + return outSTring; + } + }