Quellcode durchsuchen

sell: exclude items consumed intra-planet

raylu vor 3 Wochen
Ursprung
Commit
3e094a650a
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      sell.py

+ 2 - 1
sell.py

@@ -16,7 +16,8 @@ def main() -> None:
 
 	planets: typing.Sequence[supply.FIOBurn] = cache.get('https://rest.fnar.net/fioweb/burn/user/' + config.username,
 			headers={'Authorization': config.fio_api_key})
-	producing = frozenset(mat['MaterialTicker'] for planet in planets for mat in planet['OrderProduction'])
+	producing = frozenset(mat['MaterialTicker'] for planet in planets for mat in planet['OrderProduction']
+			if mat['MaterialTicker'] not in (c['MaterialTicker'] for c in planet['OrderConsumption']))
 	materials = []
 	for mat in producing:
 		price = raw_prices[mat]