稻谷bug修复 提示删除
This commit is contained in:
1 parent
344fad19ac
commit
bd2ebfb154
43 files changed
+700
-846
No files matched your search
+2
-25
@@ -132,23 +132,9 @@ class TangguoService(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) # 登记右键路由, 空手右键才分发到这里
|
||||
# 【提示不再报秒数】计时已统一为 1 秒/级, 秒数信息无意义, 只提示成品
|
||||
if r.get("randomTargets"):
|
||||
tip = "§a开始煮饭, 木碗盛出"
|
||||
t2 = "§e正在煮饭, 等待盛出"
|
||||
else:
|
||||
endBlock = self._timerTerminal(src)
|
||||
act = self._finalInfo.get(endBlock) if endBlock else None
|
||||
base = (", " + act) if act else ""
|
||||
tip = "§a开始熬制%s" % base
|
||||
t2 = "§e正在熬制%s" % base
|
||||
self.startTimerTips[src] = tip
|
||||
self.timingTips[src] = t2
|
||||
|
||||
# ---- 右键冷却表 ----
|
||||
self.cooldown = {}
|
||||
@@ -197,20 +183,15 @@ class TangguoService(BlueFoxServerSystem):
|
||||
return True
|
||||
|
||||
def _handleStartTimer(self, blockName, playerId, pos, dim):
|
||||
"""空手右键生汤羹等: 已在计时中 -> 提示总时长; 否则转发计时服务开始(下方需点燃炉灶)"""
|
||||
"""空手右键生汤羹等: 已在计时中则忽略; 否则转发计时服务开始(下方需点燃炉灶)"""
|
||||
try:
|
||||
data = blockEntityDataComp.GetBlockEntityData(dim, pos)
|
||||
if data and data["rtdd_tid"] == blockName:
|
||||
msg = self.timingTips.get(blockName) or "§e正在熬制中"
|
||||
comp.CreateMsg(playerId).NotifyOneMessage(playerId, msg)
|
||||
return
|
||||
except Exception:
|
||||
pass
|
||||
started = FeatureDispatcher.startTimerFor(blockName, dim, pos, playerId)
|
||||
if started:
|
||||
msg = self.startTimerTips.get(blockName) or "§a已启动计时"
|
||||
comp.CreateMsg(playerId).NotifyOneMessage(playerId, msg)
|
||||
else:
|
||||
if not started:
|
||||
comp.CreateMsg(playerId).NotifyOneMessage(
|
||||
playerId, "§c需要放在点燃的炉灶上")
|
||||
|
||||
@@ -317,10 +298,6 @@ class TangguoService(BlueFoxServerSystem):
|
||||
if recipe.get("give"):
|
||||
self.giveItem(playerId, recipe["give"])
|
||||
|
||||
# 提示
|
||||
if recipe.get("tip"):
|
||||
comp.CreateMsg(playerId).NotifyOneMessage(playerId, recipe["tip"])
|
||||
|
||||
def _defaultPot(self):
|
||||
"""take_out 未指定 target 时回退(正常应总是带 target=汤锅(空))"""
|
||||
return "rtdd:stewedsoup"
|
||||
|
||||
+1
@@ -214,6 +214,7 @@ class TangguoTimerService(BlueFoxServerSystem):
|
||||
ids = comp.CreateGame(LevelId).GetAllPlayerIds()
|
||||
if playerId in ids:
|
||||
comp.CreateMsg(playerId).NotifyOneMessage(playerId, tip)
|
||||
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in new issue
Block a user