Simplify total cost calc

This commit is contained in:
2024-05-08 15:40:35 -04:00
parent ec35228de9
commit a5255bcf11
+1 -2
View File
@@ -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.