mirror of
https://github.com/frozenpandaman/s3s.git
synced 2026-08-27 21:04:44 -05:00
only send SR fail_reason when certain (fix #82)
Co-authored-by: eli <frozenpandaman@users.noreply.github.com>
This commit is contained in:
10
s3s.py
10
s3s.py
@@ -776,12 +776,10 @@ def prepare_job_result(job, ismonitoring, isblackout, overview_data=None):
|
||||
if payload["clear_waves"] < 0: # player dc'd
|
||||
payload["clear_waves"] = None
|
||||
|
||||
elif payload["clear_waves"] != 3: # job defeat only
|
||||
underperformed = False
|
||||
for wave in job["waveResults"]:
|
||||
if wave["teamDeliverCount"] < wave["deliverNorm"]:
|
||||
underperformed = True
|
||||
payload["fail_reason"] = "time_limit" if underperformed else "wipe_out"
|
||||
elif payload["clear_waves"] != 3: # job failure
|
||||
last_wave = job["waveResults"][payload["clear_waves"]]
|
||||
if last_wave["teamDeliverCount"] >= last_wave["deliverNorm"]: # delivered more than quota, but still failed
|
||||
payload["fail_reason"] = "wipe_out"
|
||||
|
||||
# xtrawave only
|
||||
# https://stat.ink/api-info/boss-salmonid3
|
||||
|
||||
Reference in New Issue
Block a user