From 1edd4d681b8e821df378e0b326161f8616695750 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 23 Apr 2024 15:14:43 -0400 Subject: [PATCH] Update to protection check. --- src/engine/loot/WorkOrder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/loot/WorkOrder.java b/src/engine/loot/WorkOrder.java index 815bf3d7..9f53f35c 100644 --- a/src/engine/loot/WorkOrder.java +++ b/src/engine/loot/WorkOrder.java @@ -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;