feat: add configurable battle loss cooldown in Web 2.0.13
Web image / image (push) Waiting to run

This commit is contained in:
AttilaNet
2026-11-17 00:17:52 +08:00
parent 598bdf5c1c
commit b976151263
23 changed files with 297 additions and 43 deletions
+8
View File
@@ -7,6 +7,14 @@ from .model import Action, Planner, seconds
CN = timezone(timedelta(hours=8))
def commission_quota_reason(snapshot):
offset = (9 if (snapshot.raw.get("client_context") or {}).get("lang") == "JP" else 8) * 3600
day = int((snapshot.now - 10 + offset) // 86400)
reset_at = (day + 1) * 86400 - offset + 10
stamp = datetime.fromtimestamp(reset_at, timezone(timedelta(seconds=offset))).strftime("%m-%d %H:%M:%S")
return f"当日接取次数已用完(剩余0次),等待 {stamp} 自动刷新后继续"
def commission_reason_kind(reason):
text = str(reason or "")
for kind, words in (