avoid error on unsupported SR gear (#112)

This commit is contained in:
eli fessler
2023-02-28 22:11:41 -10:00
parent fcb2301a11
commit d61b0eddd2

13
s3s.py
View File

@@ -1039,16 +1039,23 @@ def prepare_job_result(job, ismonitoring, isblackout, overview_data=None, prevre
player_info["disconnected"] = "yes" if all(value == 0 for value in dc_indicators) else "no"
slop_num = utils.b64d(player["player"]["uniform"]["id"])
translate_slop = {
translate_suit = {
1: "orange",
2: "green",
3: "yellow",
4: "pink",
5: "blue",
6: "black",
7: "white"
7: "white",
# 8: "orange_gloop",
# 9: "black_gloop",
# 10: "yellow_gloop",
# 11: "brown_gloop"
}
player_info["uniform"] = translate_slop[slop_num]
try:
player_info["uniform"] = translate_suit[slop_num]
except KeyError:
print("Could not send unsupported Salmon Run gear data to stat.ink. You may want to delete & re-upload this job later.")
if player["specialWeapon"]: # if null, player dc'd
try: