mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-06 23:57:49 +02:00
CODEBASE: Add comments explaining redundant check in product calculation (#2705)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user