|
|
|
@ -127,8 +127,7 @@ public enum ForgeManager implements Runnable {
@@ -127,8 +127,7 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
|
|
|
|
|
// Single item configuration
|
|
|
|
|
|
|
|
|
|
if (workOrder.multiple_slot_request == false && |
|
|
|
|
workOrder.total_to_produce == 0) |
|
|
|
|
if (!workOrder.multiple_slot_request && workOrder.total_to_produce == 0) |
|
|
|
|
workOrder.total_to_produce = 1; |
|
|
|
|
|
|
|
|
|
workOrder.total_to_produce *= workOrder.slots_used; |
|
|
|
@ -386,8 +385,6 @@ public enum ForgeManager implements Runnable {
@@ -386,8 +385,6 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
|
|
|
|
|
int strongbox = workOrder.vendor.building.getStrongboxValue(); |
|
|
|
|
|
|
|
|
|
if (workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) > strongbox) { |
|
|
|
|
|
|
|
|
|
if (workOrder.vendor.building.getCity() == null) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
@ -400,7 +397,7 @@ public enum ForgeManager implements Runnable {
@@ -400,7 +397,7 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
|
|
|
|
|
workOrder.production_cost_total.forEach((key, value) -> warehouse.resources.put(key, warehouse.resources.get(key) - value)); |
|
|
|
|
DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|