|
|
|
@ -165,9 +165,9 @@ public class WorkOrder implements Delayed {
@@ -165,9 +165,9 @@ public class WorkOrder implements Delayed {
|
|
|
|
|
if (warehouse == null) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
int remainingAmount = workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - strongbox; |
|
|
|
|
int overflowAmount = workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - strongbox; |
|
|
|
|
workOrder.vendor.building.setStrongboxValue(0); |
|
|
|
|
workOrder.production_cost_total.put(mbEnums.ResourceType.GOLD, workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - remainingAmount); |
|
|
|
|
workOrder.production_cost_total.put(mbEnums.ResourceType.GOLD, workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - overflowAmount); |
|
|
|
|
|
|
|
|
|
// Deduct total production cost from warehouse
|
|
|
|
|
|
|
|
|
|