From dc18e71ee43bd03c6a9fb86432d2b8ca4d9cf239 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 12 Apr 2024 17:15:04 -0400 Subject: [PATCH] Locked resources are always unavailable. --- src/engine/objects/Warehouse.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/Warehouse.java b/src/engine/objects/Warehouse.java index 02ea37a1..0bcdce7c 100644 --- a/src/engine/objects/Warehouse.java +++ b/src/engine/objects/Warehouse.java @@ -645,7 +645,9 @@ public class Warehouse { int debit = warehouse.resources.get(resourceType) - cost_map.get(resourceType); - if (debit < 0) + // Locked resources are always unavailable + + if (debit < 0 || warehouse.locked.contains(resourceType)) overflowMap.put(resourceType, debit); }