City check moved outside of validation
This commit is contained in:
@@ -105,7 +105,13 @@ public enum ForgeManager implements Runnable {
|
||||
if (validation_result != 0)
|
||||
return validation_result;
|
||||
|
||||
// Concurrency is managed by same lock as warehouse
|
||||
|
||||
City city = workOrder.vendor.building.getCity();
|
||||
|
||||
if (city == null)
|
||||
return 58; //58: The formula is beyond the means of this facility
|
||||
|
||||
city.transactionLock.writeLock().lock();
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user