|
|
|
@ -61,11 +61,12 @@ public enum ForgeManager implements Runnable {
@@ -61,11 +61,12 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
// workOrder
|
|
|
|
|
|
|
|
|
|
ArrayList<Item> toRemove = new ArrayList<>(); |
|
|
|
|
Item completed_item = null; |
|
|
|
|
|
|
|
|
|
for (Item cooked_item : workOrder.cooking) { |
|
|
|
|
toRemove.add(cooked_item); |
|
|
|
|
cooked_item.containerType = mbEnums.ItemContainerType.INVENTORY; |
|
|
|
|
Item completed_item = DbManager.ItemQueries.PERSIST(cooked_item); |
|
|
|
|
completed_item = DbManager.ItemQueries.PERSIST(cooked_item); |
|
|
|
|
|
|
|
|
|
workOrder.vendor.charItemManager.addItemToInventory(completed_item); |
|
|
|
|
} |
|
|
|
@ -78,8 +79,12 @@ public enum ForgeManager implements Runnable {
@@ -78,8 +79,12 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
vendorItemLookup.get(workOrder.vendor).remove(memoryItem); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Logger.info("item forged:" + workOrder.workOrderID + " (" + workOrder.total_produced + "/" + workOrder.total_to_produce + ")"); |
|
|
|
|
// Update vendor window
|
|
|
|
|
|
|
|
|
|
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, completed_item, 8, true); |
|
|
|
|
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); |
|
|
|
|
|
|
|
|
|
Logger.info("item forged:" + workOrder.workOrderID + " (" + workOrder.total_produced + "/" + workOrder.total_to_produce + ")"); |
|
|
|
|
|
|
|
|
|
if (workOrder.total_produced >= workOrder.total_to_produce) { |
|
|
|
|
Logger.info("workOrder has completed: " + workOrder.workOrderID); |
|
|
|
|