City check moved outside of validation

This commit is contained in:
2024-04-21 14:08:27 -04:00
parent 979cd70d65
commit 7f8c297ae2
2 changed files with 6 additions and 3 deletions
+6
View File
@@ -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 {