|
|
@ -47,7 +47,7 @@ public enum ForgeManager implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
// Create negative ID items to add to collections
|
|
|
|
// Create negative ID items to add to collections
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < workOrder.slotCount; ++i) { |
|
|
|
for (int i = 0; i < workOrder.slots_used; ++i) { |
|
|
|
|
|
|
|
|
|
|
|
// Create workOrder items; one for each slot
|
|
|
|
// Create workOrder items; one for each slot
|
|
|
|
// assigned to this workOrder.
|
|
|
|
// assigned to this workOrder.
|
|
|
@ -100,7 +100,7 @@ public enum ForgeManager implements Runnable { |
|
|
|
workOrder.workOrderID = wordOrderCounter.incrementAndGet(); |
|
|
|
workOrder.workOrderID = wordOrderCounter.incrementAndGet(); |
|
|
|
workOrder.rollingDuration = ForgeManager.calcRollingDuration(workOrder); |
|
|
|
workOrder.rollingDuration = ForgeManager.calcRollingDuration(workOrder); |
|
|
|
workOrder.completionTime = System.currentTimeMillis() + workOrder.rollingDuration; |
|
|
|
workOrder.completionTime = System.currentTimeMillis() + workOrder.rollingDuration; |
|
|
|
workOrder.slotCount = calcAvailableSlots(workOrder); |
|
|
|
workOrder.slots_used = calcAvailableSlots(workOrder); |
|
|
|
|
|
|
|
|
|
|
|
// Cost to execute this workOrder
|
|
|
|
// Cost to execute this workOrder
|
|
|
|
|
|
|
|
|
|
|
@ -113,12 +113,12 @@ public enum ForgeManager implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
// Single item rolls are total_to_produce of 0;
|
|
|
|
// Single item rolls are total_to_produce of 0;
|
|
|
|
|
|
|
|
|
|
|
|
if (workOrder.slotCount > 0 && workOrder.total_to_produce == 0) |
|
|
|
if (workOrder.slots_used > 0 && workOrder.total_to_produce == 0) |
|
|
|
workOrder.slotCount = 1; |
|
|
|
workOrder.slots_used = 1; |
|
|
|
|
|
|
|
|
|
|
|
// Create negative ID items to add to collections
|
|
|
|
// Create negative ID items to add to collections
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < workOrder.slotCount; ++i) { |
|
|
|
for (int i = 0; i < workOrder.slots_used; ++i) { |
|
|
|
|
|
|
|
|
|
|
|
// Create workOrder items; one for each slot
|
|
|
|
// Create workOrder items; one for each slot
|
|
|
|
// assigned to this workOrder.
|
|
|
|
// assigned to this workOrder.
|
|
|
@ -194,7 +194,7 @@ public enum ForgeManager implements Runnable { |
|
|
|
// Slots currently used up by the npc workOrders
|
|
|
|
// Slots currently used up by the npc workOrders
|
|
|
|
|
|
|
|
|
|
|
|
for (WorkOrder npcWorkOrder : workOrder.vendor.workOrders) |
|
|
|
for (WorkOrder npcWorkOrder : workOrder.vendor.workOrders) |
|
|
|
availableSlots = availableSlots - npcWorkOrder.slotCount; |
|
|
|
availableSlots = availableSlots - npcWorkOrder.slots_used; |
|
|
|
|
|
|
|
|
|
|
|
// Slot count override for single item production
|
|
|
|
// Slot count override for single item production
|
|
|
|
|
|
|
|
|
|
|
|