Add a break to the price calculation loop to save sweet sweet cpu cycles
This commit is contained in:
parent
42f74a5354
commit
68e4e50d19
@ -227,6 +227,7 @@ async def calculate_trade_profies(commodity, scu=None):
|
|||||||
for station, trades in stations.items():
|
for station, trades in stations.items():
|
||||||
if "buy" in trades and commodity in trades["buy"]:
|
if "buy" in trades and commodity in trades["buy"]:
|
||||||
costs[station] = trades["buy"][commodity] * int(scu)
|
costs[station] = trades["buy"][commodity] * int(scu)
|
||||||
|
break
|
||||||
|
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
name="**Cheapest place to fill %s**" % scu_string,
|
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():
|
for station, trades in stations.items():
|
||||||
if "sell" in trades and commodity in trades["sell"]:
|
if "sell" in trades and commodity in trades["sell"]:
|
||||||
profits[station] = trades["sell"][commodity] * int(scu)
|
profits[station] = trades["sell"][commodity] * int(scu)
|
||||||
|
break
|
||||||
|
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
name="Most profitable place to sell %s" % scu_string,
|
name="Most profitable place to sell %s" % scu_string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user