Add a break to the price calculation loop to save sweet sweet cpu cycles

This commit is contained in:
Luke Robles 2023-06-14 13:50:50 -07:00
parent 42f74a5354
commit 68e4e50d19

View File

@ -227,6 +227,7 @@ async def calculate_trade_profies(commodity, scu=None):
for station, trades in stations.items():
if "buy" in trades and commodity in trades["buy"]:
costs[station] = trades["buy"][commodity] * int(scu)
break
embed.add_field(
name="**Cheapest place to fill %s**" % scu_string,
@ -244,6 +245,7 @@ async def calculate_trade_profies(commodity, scu=None):
for station, trades in stations.items():
if "sell" in trades and commodity in trades["sell"]:
profits[station] = trades["sell"][commodity] * int(scu)
break
embed.add_field(
name="Most profitable place to sell %s" % scu_string,