forked from MagicBane/Server
Minor class cleanup
This commit is contained in:
@@ -58,7 +58,7 @@ public enum ForgeManager implements Runnable {
|
|||||||
// Resubmit workOrder
|
// Resubmit workOrder
|
||||||
|
|
||||||
workOrder.completionTime = System.currentTimeMillis() + workOrder.rollingDuration;
|
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);
|
workOrders.add(workOrder);
|
||||||
|
|
||||||
Logger.info("Workorder has cycled: " + workOrder.workOrderID);
|
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)
|
if (workOrder.slotCount > 1 && workOrder.total_to_produce == 0)
|
||||||
workOrder.slotCount = 1;
|
workOrder.slotCount = 1;
|
||||||
|
|
||||||
|
Logger.info(workOrder.toString());
|
||||||
|
|
||||||
workOrder.vendor.workOrders.add(workOrder);
|
workOrder.vendor.workOrders.add(workOrder);
|
||||||
workOrders.add(workOrder);
|
workOrders.add(workOrder);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,4 +52,23 @@ public class WorkOrder implements Delayed {
|
|||||||
public int compareTo(@NotNull Delayed o) {
|
public int compareTo(@NotNull Delayed o) {
|
||||||
return toIntExact(this.completionTime - ((WorkOrder) o).completionTime);
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user