From 3a23c3d46f8581bd9ce2ad9db3d426056cd5d184 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Wed, 14 Jun 2023 13:28:13 -0700 Subject: [PATCH] Add some comments to the code --- app/star_citizen.py | 3 +++ test-dragon-bot.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/star_citizen.py b/app/star_citizen.py index c483a64a..6defa492 100644 --- a/app/star_citizen.py +++ b/app/star_citizen.py @@ -220,6 +220,8 @@ async def calculate_trade_profies(commodity, scu=None): name=commodity, url="%s%s" % (wiki_url, commodity), ) + + # Loop through every system/outpost and find the cheapest place selling the commodity costs = {} for systems, stations in response.items(): for station, trades in stations.items(): @@ -237,6 +239,7 @@ async def calculate_trade_profies(commodity, scu=None): inline=True, ) + # Same logic, but finding the place buying the commodity for the most profits = {} for systems, stations in response.items(): for station, trades in stations.items(): diff --git a/test-dragon-bot.sh b/test-dragon-bot.sh index bb2e719e..284ee812 100755 --- a/test-dragon-bot.sh +++ b/test-dragon-bot.sh @@ -11,4 +11,4 @@ printf "\n[-] Running dragon bot in test mode\n" chmod +x ./app/bot.py docker build -f ./Dockerfile-test-env -t dragon-bot-test . || exit -docker run -ti -v $(pwd)/app:/app --rm --name dragon-bot-test -e DRAGON_ENV=test -e token="MzQ1MjkwMTI5OTQ4Mjc4Nzg0.DG5IBw._9umb82PrL22bPe7GjmHClU-NtU" dragon-bot-test bash +docker run -ti -v $(pwd)/app:/app --rm --name dragon-bot-test -e DRAGON_ENV=test -e token="MzQ1MjkwMTI5OTQ4Mjc4Nzg0.G16mG8.vxgQLwnbusG9fSlXvAFV0wTUmRsJJlPnQ3bpco" dragon-bot-test bash