ForgeManager started at boot

This commit is contained in:
2024-04-07 22:53:41 -04:00
parent 5e92bab977
commit 92402097d4
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -64,11 +64,21 @@ public enum ForgeManager implements Runnable {
}
}
public static void start() {
Thread messageDispatcher;
messageDispatcher = new Thread(FORGE_MANAGER);
messageDispatcher.setName("Forge Manager");
messageDispatcher.start();
}
public static void submit(WorkOrder workOrder) {
workOrder.workOrderID = wordOrderCounter.incrementAndGet();
workOrder.completionTime = System.currentTimeMillis() + 10000;
// 0 signifies single item roll. > 0 signifies multiple item roll.
workOrder.total_to_produce = Math.max(1, workOrder.total_to_produce);
workOrders.add(workOrder);