From a99eeea80c8562ebae6f982b7ab5fe56f46727d6 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Fri, 1 May 2026 06:18:22 +0700 Subject: [PATCH] CODEBASE: Add comments explaining redundant check in product calculation (#2705) --- src/Corporation/Division.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Corporation/Division.ts b/src/Corporation/Division.ts index 31b4d9363..b6637002c 100644 --- a/src/Corporation/Division.ts +++ b/src/Corporation/Division.ts @@ -873,12 +873,12 @@ export class Division { } prod *= corpConstants.secondsPerMarketCycle * marketCycles; + // The "netStorageSize" check is redundant, but retained in case the product size calculation changes. //Calculate net change in warehouse storage making the Products will cost let netStorageSize = product.size; for (const [reqMatName, reqQty] of getRecordEntries(product.requiredMaterials)) { netStorageSize -= MaterialInfo[reqMatName].size * reqQty; } - //If there's not enough space in warehouse, limit the amount of Product if (netStorageSize > 0) { const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / netStorageSize);