|
|
|
@ -61,8 +61,7 @@ public enum ForgeManager implements Runnable {
@@ -61,8 +61,7 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
|
|
|
|
|
if (workOrder.total_produced >= workOrder.total_to_produce) { |
|
|
|
|
|
|
|
|
|
// Complete this workOrder. Persist items currently in memory
|
|
|
|
|
// and set the items as completed.
|
|
|
|
|
// Complete this workOrder.
|
|
|
|
|
|
|
|
|
|
for (Item workOrderItem : workOrder.cooking) { |
|
|
|
|
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, workOrderItem, mbEnums.ProductionActionType.CONFIRM_PRODUCE, true); |
|
|
|
@ -71,7 +70,22 @@ public enum ForgeManager implements Runnable {
@@ -71,7 +70,22 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
|
|
|
|
|
Logger.info("workOrder has completed: " + workOrder.workOrderID); |
|
|
|
|
workOrder.runCompleted = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (workOrder.runCompleted == true) |
|
|
|
|
continue; |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
// Persist items that were currently cooking
|
|
|
|
|
|
|
|
|
|
for (Item workOrderItem : workOrder.cooking) { |
|
|
|
|
// ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, workOrderItem, mbEnums.ProductionActionType.CONFIRM_PRODUCE, true);
|
|
|
|
|
// DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
|
|
|
|
ItemProductionMsg outMsg1 = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, workOrderItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true); |
|
|
|
|
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg1, mbEnums.DispatchChannel.SECONDARY, 700, false, false); |
|
|
|
|
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, workOrderItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true); |
|
|
|
|
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Create new set in memory items
|
|
|
|
|