Browse Source

forged items are persisted

combat-2
MagicBot 9 months ago
parent
commit
a16bef418b
  1. 10
      src/engine/gameManager/ForgeManager.java

10
src/engine/gameManager/ForgeManager.java

@ -72,18 +72,20 @@ public enum ForgeManager implements Runnable {
} }
// Remove the fake negativeID item from all collections. // Remove the fake negativeID item from all collections.
// set the items as 'completed'
for (Item memoryItem : toRemove) { for (Item memoryItem : toRemove) {
workOrder.cooking.remove(memoryItem);
inMemoryItemLookup.remove(memoryItem.objectUUID);
vendorItemLookup.get(workOrder.vendor).remove(memoryItem);
}
// Update vendor window // Update vendor window
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, completed_item, 8, true); ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, completed_item, 8, true);
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
workOrder.cooking.remove(memoryItem);
inMemoryItemLookup.remove(memoryItem.objectUUID);
vendorItemLookup.get(workOrder.vendor).remove(memoryItem);
}
Logger.info("item forged:" + workOrder.workOrderID + " (" + workOrder.total_produced + "/" + workOrder.total_to_produce + ")"); Logger.info("item forged:" + workOrder.workOrderID + " (" + workOrder.total_produced + "/" + workOrder.total_to_produce + ")");
if (workOrder.total_produced >= workOrder.total_to_produce) { if (workOrder.total_produced >= workOrder.total_to_produce) {

Loading…
Cancel
Save