稻谷bug修复 提示删除

This commit is contained in:
wenhe committed 2026-09-29 16:25:50 +08:00
1 parent 344fad19ac
commit bd2ebfb154
43 files changed
+700 -846

No files matched your search

@@ -117,31 +117,9 @@ class YouguoService(BlueFoxServerSystem):
self._finalInfo[r["block"]] = "手持盘子出锅"
self.timerSources = set()
self.startTimerTips = {} # 空手右键启动计时 -> 提示(含总共多少秒)
self.timingTips = {} # 空手右键"已在计时中" -> 提示(同样含总共多少秒)
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 ""
endBlock = self._oilTerminal(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)
base += actStr
tip = "§a开始炸制%s: %s" % (lvTip, base)
t2 = "§e正在炸制中%s: %s" % (lvTip, base)
self.startTimerTips[src] = tip
self.timingTips[src] = t2
# ---- 右键冷却表 ----
self.cooldown = {}
@@ -193,16 +171,11 @@ class YouguoService(BlueFoxServerSystem):
try:
data = blockEntityDataComp.GetBlockEntityData(dim, pos)
if data and data["rtdd_tid"] == blockName:
comp.CreateMsg(playerId).NotifyOneMessage(
playerId, self.timingTips.get(blockName, "§e已经在计时中"))
return
except Exception:
pass
started = FeatureDispatcher.startTimerFor(blockName, dim, pos, playerId)
if started:
comp.CreateMsg(playerId).NotifyOneMessage(
playerId, self.startTimerTips.get(blockName, "§a已启动计时"))
else:
if not started:
comp.CreateMsg(playerId).NotifyOneMessage(
playerId, "§c油锅需要放在点燃的炉灶上才能开始计时")
@@ -279,10 +252,6 @@ class YouguoService(BlueFoxServerSystem):
if recipe.get("give"):
self.giveItem(playerId, recipe["give"])
# 提示
if recipe.get("tip"):
comp.CreateMsg(playerId).NotifyOneMessage(playerId, recipe["tip"])
# ============================================================================
# 三、工具方法,判断正下方是否指定方块(点燃炉灶)
# ============================================================================
@@ -207,6 +207,7 @@ class YouguoTimerService(BlueFoxServerSystem):
ids = comp.CreateGame(LevelId).GetAllPlayerIds()
if playerId in ids:
comp.CreateMsg(playerId).NotifyOneMessage(playerId, tip)
except Exception:
pass