Default egg restocking to ten draws and add single-draw opt-in
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import re
|
||||
|
||||
|
||||
def battle_message(message):
|
||||
def battle_message(message, *, translate_unknown=True):
|
||||
text = str(message or "")
|
||||
objective = "Non-elimination win/loss objective is unsupported"
|
||||
units = "Protected/destroy objective units are unsupported"
|
||||
@@ -33,6 +33,6 @@ def battle_message(message):
|
||||
(r"Invalid numeric field: [^;;\n]+", "战斗数据包含无效数值,暂时无法模拟"),
|
||||
):
|
||||
text = re.sub(pattern, target, text)
|
||||
if re.search(r"[a-zA-Z]{2,}", text) and not re.search(r"[\u3400-\u9fff]", text):
|
||||
if translate_unknown and re.search(r"[a-zA-Z]{2,}", text) and not re.search(r"[\u3400-\u9fff]", text):
|
||||
return "战斗模拟暂时无法处理当前数据,详细原因已保留在调试记录中"
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user