Browse Source

Multiple item workOrder work

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

9
src/engine/gameManager/ForgeManager.java

@ -100,11 +100,6 @@ public enum ForgeManager implements Runnable { @@ -100,11 +100,6 @@ public enum ForgeManager implements Runnable {
workOrder.production_cost_total.putAll(workOrder.production_cost);
workOrder.production_cost_total.forEach((key, value) -> workOrder.production_cost_total.compute(key, (k, v) -> v * workOrder.total_to_produce));
// Single item rolls are msg_size of 0;
if (workOrder.slots_used > 0 && workOrder.msg_size == 0)
workOrder.slots_used = 1;
workOrder.total_to_produce *= workOrder.slots_used;
// Create in-memory items and add to collections
@ -178,9 +173,9 @@ public enum ForgeManager implements Runnable { @@ -178,9 +173,9 @@ public enum ForgeManager implements Runnable {
for (WorkOrder npcWorkOrder : workOrder.vendor.workOrders)
availableSlots = availableSlots - npcWorkOrder.slots_used;
// Slot count override for single item production
// Single item rolls are msg_size of 0;
if (workOrder.total_to_produce == 0 && availableSlots > 1)
if (workOrder.slots_used > 0 && workOrder.msg_size == 0)
availableSlots = 1;
return availableSlots;

Loading…
Cancel
Save