|
|
|
@ -46,13 +46,13 @@ public enum ForgeManager implements Runnable {
@@ -46,13 +46,13 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
// otherwise roll what was asked for
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (workOrder.total_to_produce == 0) { |
|
|
|
|
if (workOrder.total_produced >= workOrder.total_to_produce) { |
|
|
|
|
|
|
|
|
|
workOrder.runCompleted = true; |
|
|
|
|
workOrder.vendor.workOrders.remove(workOrder); |
|
|
|
|
|
|
|
|
|
Logger.info("Workorder has completed: " + workOrder.workOrderID); |
|
|
|
|
// Remove this workOrder from any slots on vendor
|
|
|
|
|
workOrder.vendor.workOrders.remove(workOrder); |
|
|
|
|
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
@ -114,4 +114,14 @@ public enum ForgeManager implements Runnable {
@@ -114,4 +114,14 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
rollingDuration = (long) (baseTime * Float.parseFloat(ConfigManager.MB_PRODUCTION_RATE.getValue())); |
|
|
|
|
return rollingDuration; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static int getAvailableSlots(WorkOrder workOrder) { |
|
|
|
|
|
|
|
|
|
int availableSlots = workOrder.vendor.getRank(); |
|
|
|
|
|
|
|
|
|
for (WorkOrder npcWorkOrder : workOrder.vendor.workOrders) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return availableSlots; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|