|
|
@ -36,7 +36,7 @@ public enum ForgeManager implements Runnable { |
|
|
|
// WorkOrders are persisted then reconstituted at bootstrap using table dyn.workorders.
|
|
|
|
// WorkOrders are persisted then reconstituted at bootstrap using table dyn.workorders.
|
|
|
|
// Forge window (ManageNPCMsg) uses item.upgradeDate to serialize completion time.
|
|
|
|
// Forge window (ManageNPCMsg) uses item.upgradeDate to serialize completion time.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Replaces garbage code that looked as if written by a mental patient with face boils.
|
|
|
|
// Replaces garbage code that looked as if written by a mental patient.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// @TODO Reuse same set of virtual items for all workOrder cycles.
|
|
|
|
// @TODO Reuse same set of virtual items for all workOrder cycles.
|
|
|
|
|
|
|
|
|
|
|
@ -72,8 +72,8 @@ public enum ForgeManager implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
if (workOrder.total_produced >= workOrder.total_to_produce) { |
|
|
|
if (workOrder.total_produced >= workOrder.total_to_produce) { |
|
|
|
|
|
|
|
|
|
|
|
// Set items as completed in the window.
|
|
|
|
// CONFIRM_PRODUCE to refresh the interface after we add
|
|
|
|
// CONFIRM_PRODUCE to refresh item in the interface.
|
|
|
|
// the Identified flag to the item.
|
|
|
|
|
|
|
|
|
|
|
|
for (Item workOrderItem : workOrder.cooking) { |
|
|
|
for (Item workOrderItem : workOrder.cooking) { |
|
|
|
workOrderItem.flags.add(mbEnums.ItemFlags.Identified); |
|
|
|
workOrderItem.flags.add(mbEnums.ItemFlags.Identified); |
|
|
@ -81,15 +81,15 @@ public enum ForgeManager implements Runnable { |
|
|
|
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); |
|
|
|
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Set to completed and update workOrder on disk
|
|
|
|
// Set this workOrder to completed and update on disk
|
|
|
|
|
|
|
|
|
|
|
|
workOrder.runCompleted.set(true); |
|
|
|
workOrder.runCompleted.set(true); |
|
|
|
DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder); |
|
|
|
DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder); |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// PERSIST current cooking batch of virtual
|
|
|
|
// PERSIST our current cooking batch of virtual
|
|
|
|
// item then add to the vendor inventory
|
|
|
|
// items then add to the vendor inventory
|
|
|
|
|
|
|
|
|
|
|
|
completeWorkOrderBatch(workOrder); |
|
|
|
completeWorkOrderBatch(workOrder); |
|
|
|
|
|
|
|
|
|
|
|