mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-27 18:13:52 +01:00
Don't hide irrelevant materials if their stock is not empty
This commit is contained in:
parent
9ddb1c4379
commit
a5f82e96ed
@ -83,8 +83,10 @@ function WarehouseRoot(props: IProps): React.ReactElement {
|
||||
const mats = [];
|
||||
for (const matName of Object.keys(props.warehouse.materials)) {
|
||||
if (!(props.warehouse.materials[matName] instanceof Material)) continue;
|
||||
// Only create UI for materials that are relevant for the industry
|
||||
if (!isRelevantMaterial(matName, division)) continue;
|
||||
// Only create UI for materials that are relevant for the industry or in stock
|
||||
const isInStock = props.warehouse.materials[matName].qty > 0;
|
||||
const isRelevant = isRelevantMaterial(matName, division);
|
||||
if (!isInStock && !isRelevant) continue;
|
||||
mats.push(
|
||||
<MaterialElem
|
||||
rerender={props.rerender}
|
||||
|
Loading…
Reference in New Issue
Block a user