瀏覽代碼

supply: fix exporting bug

raylu 1 月之前
父節點
當前提交
9996a56dda
共有 1 個文件被更改,包括 1 次插入1 次删除
  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]: