|
|
@ -367,9 +367,8 @@ public enum ForgeManager implements Runnable { |
|
|
|
public static boolean debitWorkOrderCost(WorkOrder workOrder) { |
|
|
|
public static boolean debitWorkOrderCost(WorkOrder workOrder) { |
|
|
|
|
|
|
|
|
|
|
|
int strongbox = workOrder.vendor.building.getStrongboxValue(); |
|
|
|
int strongbox = workOrder.vendor.building.getStrongboxValue(); |
|
|
|
int overflow = strongbox - workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (overflow > 1 || workOrder.production_cost_total.size() > 1) { |
|
|
|
if (workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) > strongbox) { |
|
|
|
|
|
|
|
|
|
|
|
// Deduct total cost from warehouse
|
|
|
|
// Deduct total cost from warehouse
|
|
|
|
|
|
|
|
|
|
|
|