|
@@ -20,14 +20,20 @@ def main() -> None:
|
|
|
|
|
|
|
|
supplies: list[tuple[float, str]] = []
|
|
supplies: list[tuple[float, str]] = []
|
|
|
for mat, amount in supply.warehouse_inventory().items():
|
|
for mat, amount in supply.warehouse_inventory().items():
|
|
|
|
|
+ if mat is None:
|
|
|
|
|
+ continue
|
|
|
if (consumption := total_consumption.get(mat)) is None:
|
|
if (consumption := total_consumption.get(mat)) is None:
|
|
|
supplies.append((float('inf'), mat))
|
|
supplies.append((float('inf'), mat))
|
|
|
else:
|
|
else:
|
|
|
supplies.append((amount / consumption, mat))
|
|
supplies.append((amount / consumption, mat))
|
|
|
|
|
|
|
|
supplies.sort(reverse=True)
|
|
supplies.sort(reverse=True)
|
|
|
|
|
+ ignored = frozenset(config.junk.ignore_materials)
|
|
|
for days, mat in supplies:
|
|
for days, mat in supplies:
|
|
|
- print(f'{mat}: {days:.2f} d')
|
|
|
|
|
|
|
+ if mat in ignored:
|
|
|
|
|
+ print(f'\033[90m{mat:3}: {days:.2f} d\033[0m')
|
|
|
|
|
+ else:
|
|
|
|
|
+ print(f'{mat:3}: {days:.2f} d')
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
|
main()
|
|
main()
|