Update to protection check.

This commit is contained in:
2024-04-23 15:14:43 -04:00
parent 911698a7e3
commit 1edd4d681b
+2 -1
View File
@@ -22,6 +22,7 @@ import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Delayed;
@@ -150,7 +151,7 @@ public class WorkOrder implements Delayed {
// Forge must be protected in order to access warehouse.
if (ForgeManager.calcProductionCost(workOrder).size() > 1)
if (!workOrder.vendor.building.protectionState.equals(mbEnums.ProtectionState.PROTECTED))
if (!EnumSet.of(mbEnums.ProtectionState.PROTECTED, mbEnums.ProtectionState.CONTRACT).contains(workOrder.vendor.building.protectionState))
return 193; //193: Production denied: This building must be protected to gain access to warehouse
return validation_result;