Fix logic for calculating spawn chance
This commit is contained in:
parent
97bcce40d1
commit
c6e968e8ac
@ -175,10 +175,7 @@ class Tarkov(commands.Cog):
|
|||||||
for key, value in levels.items():
|
for key, value in levels.items():
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
name=key,
|
name=key,
|
||||||
value="\n".join(
|
value="\n".join(f"{k}: {v['spawnChance']}" for k, v in value.items()),
|
||||||
f"{k}: **{str(round(v['spawnChance'],2))}%**"
|
|
||||||
for k, v in value.items()
|
|
||||||
),
|
|
||||||
inline=False,
|
inline=False,
|
||||||
)
|
)
|
||||||
embed.set_footer(text=f"Pulled from the api")
|
embed.set_footer(text=f"Pulled from the api")
|
||||||
|
@ -75,7 +75,7 @@ def tarkov_boss_info():
|
|||||||
"escorts": sum(
|
"escorts": sum(
|
||||||
escort["amount"][0]["count"] for escort in boss["escorts"]
|
escort["amount"][0]["count"] for escort in boss["escorts"]
|
||||||
),
|
),
|
||||||
"spawnChance": f"**{str(round(boss['spawnChance'],2))}%**",
|
"spawnChance": f"**{str(round(boss['spawnChance'] * 100, 2))}%**",
|
||||||
"picture": boss["boss"]["imagePortraitLink"],
|
"picture": boss["boss"]["imagePortraitLink"],
|
||||||
}
|
}
|
||||||
for boss in level["bosses"]
|
for boss in level["bosses"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user