稻谷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

@@ -41,7 +41,6 @@ blockEntityDataComp = comp.CreateBlockEntityData(LevelId)
from ..ChaoguoData import (
SWITCH_RULES, ITEM_USE_ON_RULES, TIMER_RULES,
WOK,
COOKED_EGG, COOKING_SCALLION_PANCAKE_0, COOKING_DOUGH_0, COOKING_DOUGHT_0,
)
# ---- 统一分发器 ----
@@ -80,18 +79,6 @@ class ChaoguoService(BlueFoxServerSystem):
for src, r in {t["source"]: t for t in TIMER_RULES}.items():
self.timerSources.add(src)
self.featureBlocks.add(src) # 登记右键路由, 空手右键才分发到这里
self.startTimerTips = {
COOKED_EGG: "§a开始煎蛋, 等待一段时间, 手持盘子出锅",
COOKING_SCALLION_PANCAKE_0: "§a开始煎葱油饼, 等待一段时间, 空手出锅 葱油饼",
COOKING_DOUGH_0: "§a开始煎馍, 等待一段时间, 空手出锅 馍",
COOKING_DOUGHT_0: "§a开始煎面饼, 等待一段时间, 空手出锅 煎饼",
}
self.timingTips = {
COOKED_EGG: "§e正在煎蛋, 等待一段时间后出锅",
COOKING_SCALLION_PANCAKE_0: "§e正在煎葱油饼, 等待一段时间后出锅",
COOKING_DOUGH_0: "§e正在煎馍, 等待一段时间后出锅",
COOKING_DOUGHT_0: "§e正在煎面饼, 等待一段时间后出锅",
}
# ---- 右键冷却表 ----
self.cooldown = {}
@@ -152,16 +139,11 @@ class ChaoguoService(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炒锅需要放在点燃的炉灶上才能开始计时")
@@ -205,8 +187,6 @@ class ChaoguoService(BlueFoxServerSystem):
self.replaceBlock(pos, dim, recipe["target"], playerId)
self._clearWokData(dim, pos)
if recipe.get("tip"):
comp.CreateMsg(playerId).NotifyOneMessage(playerId, recipe["tip"])
return True
# ============================================================================
@@ -253,7 +233,6 @@ class ChaoguoService(BlueFoxServerSystem):
if needFlag:
flagKey, flagVal, flagTip = needFlag[0], needFlag[1], needFlag[2]
if self._readFlag(dim, pos, flagKey) < flagVal:
comp.CreateMsg(playerId).NotifyOneMessage(playerId, flagTip)
return
# 消耗物品(数量不足则拦截, 不转换)
@@ -280,10 +259,6 @@ class ChaoguoService(BlueFoxServerSystem):
self.replaceBlock(pos, dim, recipe["target"], playerId)
self._clearWokData(dim, pos)
# 提示
if recipe.get("tip"):
comp.CreateMsg(playerId).NotifyOneMessage(playerId, recipe["tip"])
def _handleStir(self, recipe, playerId, pos, dim):
"""翻炒: 锅铲右键一次 -> 方块旋转90度 + 计数+1(rtdd_cf), 满 times 次(转回原位)
后变 target(照石磨旋转机制); 煎酱香饼无 target, 满4次后门控(空手出锅用)"""
@@ -300,8 +275,6 @@ class ChaoguoService(BlueFoxServerSystem):
self._clearWokData(dim, pos) # 新方块重置翻炒计数
else:
self._writeFlag(dim, pos, "rtdd_cf", times) # 门控: 保持4
comp.CreateMsg(playerId).NotifyOneMessage(
playerId, recipe.get("tip", "§a翻炒完成"))
else:
self._writeFlag(dim, pos, "rtdd_cf", cf)