diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index f3455dab..c7030fe4 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -113,18 +113,9 @@ public enum ForgeManager implements Runnable { if (workOrder.slots_used > 0 && workOrder.total_to_produce == 0) workOrder.slots_used = 1; - // Create negative ID items to add to collections + // Create in-memory items and add to collections - for (int i = 0; i < workOrder.slots_used; ++i) { - - // Create workOrder items; one for each slot - // assigned to this workOrder. - - // if Prefix and suffix are null random roll item - // otherwise roll what was asked for - - workOrder.total_produced = workOrder.total_produced + 1; - } + forgeItems(workOrder); Logger.info(workOrder.toString()); workOrder.vendor.workOrders.add(workOrder); @@ -279,4 +270,17 @@ public enum ForgeManager implements Runnable { return forgedItem; } + + public static void forgeItems(WorkOrder workOrder) { + + for (int i = 0; i < workOrder.slots_used; ++i) { + + Item forged_item = forgeItem(workOrder); + ForgeManager.oven.put(forged_item, workOrder); + workOrder.cooking.add(forged_item); + + workOrder.total_produced = workOrder.total_produced + 1; + Logger.info("Forged item: " + forged_item.objectUUID + " of template " + forged_item.templateID); + } + } }