Browse Source

Minor class cleanup

combat-2
MagicBot 7 months ago
parent
commit
bfa43823f6
  1. 4
      src/engine/gameManager/ForgeManager.java
  2. 19
      src/engine/loot/WorkOrder.java

4
src/engine/gameManager/ForgeManager.java

@ -58,7 +58,7 @@ public enum ForgeManager implements Runnable { @@ -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 { @@ -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);
}

19
src/engine/loot/WorkOrder.java

@ -52,4 +52,23 @@ public class WorkOrder implements Delayed { @@ -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;
}
}

Loading…
Cancel
Save