|
|
@@ -21,23 +21,6 @@ def main() -> None:
|
|
|
if profit := calc_profit(recipe, buildings, materials, prices):
|
|
|
profits.append(profit)
|
|
|
profits.sort()
|
|
|
- print('\033[1mwrought \033[0;32mdaily profit/area\033[31m')
|
|
|
- print('\033[30mrecipe \033[0mexpertise \033[33mcapex \033[35mdaily opex \033[34mlogistics\033[0m')
|
|
|
- for p in profits:
|
|
|
- print(f'\033[53;1m{p.output:5} \033[53;32m{p.profit_per_day/p.area: 10,.0f} ', end='')
|
|
|
- warnings = []
|
|
|
- if p.average_traded_7d < p.output_per_day * 20:
|
|
|
- warnings.append('low volume')
|
|
|
- if p.logistics_per_area > 1.5:
|
|
|
- warnings.append('heavy logistics')
|
|
|
- if p.cost_per_day > 50_000:
|
|
|
- warnings.append('high opex')
|
|
|
- if len(warnings) > 0:
|
|
|
- print(' \033[31m' + ' '.join(warnings).ljust(43), end='')
|
|
|
- else:
|
|
|
- print(' ' * 14 + '\033[0;53m' + ' ' * 43, end='')
|
|
|
- print(f'\n\033[0;30m{p.recipe:30} \033[0m{p.expertise:19} \033[33m{p.capex:7,.0f} \033[35m{p.cost_per_day:9,.0f} \033[34m{p.logistics_per_area:5.2f}\033[0m')
|
|
|
-
|
|
|
with open('www/roi.json', 'w') as f:
|
|
|
json.dump([dataclasses.asdict(p) for p in profits], f, indent='\t')
|
|
|
|