Browse Source

Simplify total cost calc

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

3
src/engine/gameManager/ForgeManager.java

@ -160,8 +160,7 @@ public enum ForgeManager implements Runnable { @@ -160,8 +160,7 @@ public enum ForgeManager implements Runnable {
workOrder.total_to_produce *= workOrder.slots_used;
workOrder.production_cost = calcProductionCost(workOrder);
workOrder.production_cost_total.putAll(workOrder.production_cost);
workOrder.production_cost_total.forEach((key, value) -> workOrder.production_cost_total.put(key, value * workOrder.total_to_produce));
workOrder.production_cost.forEach((key, value) -> workOrder.production_cost_total.put(key, value * workOrder.total_to_produce));
// Withdraw gold and resource costs. Availability has previously been validated.

Loading…
Cancel
Save