Explorar el Código

supply: fix exporting bug

raylu hace 1 mes
padre
commit
9996a56dda
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      supply.py

+ 1 - 1
supply.py

@@ -245,7 +245,7 @@ class Planet:
 		# producing more than consumption
 		self.exporting = set()
 		for item in fio_burn['OrderProduction']:
-			if item['MaterialTicker'] not in self.net_consumption:
+			if self.net_consumption.get(item['MaterialTicker'], 0) < 0:
 				self.exporting.add(item['MaterialTicker'])
 
 	def supply_for_days(self, target_days: float) -> dict[str, int]: