汤油锅计时 2

This commit is contained in:
wenhe committed 2026-09-22 14:16:11 +08:00
1 parent 562f2c9ca8
commit fadb5db6ec
3 files changed
+125 -128

No files matched your search

@@ -137,29 +137,21 @@ class TangguoService(BlueFoxServerSystem):
for src, r in self._timerBySrc.items():
self.timerSources.add(src)
self.featureBlocks.add(src) # 登记右键路由, 空手右键才分发到这里
total, stages = self._timerTotal[src] # total = 从当前级到终点剩余秒数
curLv, totLv = self._timerStages.get(src, (1, 1))
lvTip = "(第%d级/共%d级)" % (curLv, totLv) if totLv > 1 else ""
if len(stages) == 1:
perTip = ""
elif len(set(stages)) == 1:
perTip = "每级%d秒" % stages[0]
else:
perTip = "先%d秒,再%s" % (stages[0], ",".join("%d秒" % s for s in stages[1:]))
perStr = (", " + perTip) if perTip else ""
# 【提示不再报秒数】计时已统一为 1 秒/级, 秒数信息无意义, 只提示成品
if r.get("randomTargets"):
tip = "§a开始煮饭%s: 还需%d秒%s, 计时结束变成 熟米饭(形态随机)" % (lvTip, total, perStr)
t2 = "§e正在煮饭中%s: 还需%d秒%s, 计时结束变成 熟米饭(形态随机)" % (lvTip, total, perStr)
tip = "§a开始煮饭, 计时结束变成 熟米饭(形态随机)"
t2 = "§e正在煮饭, 计时结束变成 熟米饭(形态随机)"
else:
endBlock = self._timerTerminal(src)
endName = self._finalNames.get(endBlock, "") if endBlock else ""
act = self._finalInfo.get(endBlock) if endBlock else None
actStr = (", " + act) if act else ""
base = "还需%d秒%s" % (total, perStr)
if endName:
base += ", 计时结束变成 %s%s" % (endName, actStr)
tip = "§a开始熬制%s: %s" % (lvTip, base)
t2 = "§e正在熬制中%s: %s" % (lvTip, base)
base = "计时结束变成 %s%s" % (endName, actStr)
else:
base = "计时结束自动变成成品"
tip = "§a开始熬制: %s" % base
t2 = "§e正在熬制: %s" % base
self.startTimerTips[src] = tip
self.timingTips[src] = t2