汤锅功能实现 5 计时 提示修改 蔬菜鱼片汤补充 锅铲添油实现
This commit is contained in:
1 parent
31bb44a409
commit
c342dcc93d
12 files changed
+585
-395
No files matched your search
@@ -337,7 +337,7 @@ SWITCH_RULES = [
|
||||
"tip": "§a蘑菇汤加生鸡肉, 开始熬制(共270秒, 3级×90秒); 等计时结束变成 蘑菇炖鸡(熟), 手持木碗出锅"},
|
||||
{"block": VEGETABLE_SOUP, "item": SASHIMI, "target": VEGETABLE_FISH_SOUP_0,
|
||||
"consume": 10, "startTimer": VEGETABLE_FISH_SOUP_0,
|
||||
"tip": "§a蔬菜汤加生鱼片x10, 开始计时熬制(60秒/级); 等计时结束变成 蔬菜鱼片汤(熟), 手持木碗出锅"},
|
||||
"tip": "§a蔬菜汤加生鱼片x10, 开始熬制(共180秒, 3级×60秒); 等计时结束变成 蔬菜鱼片汤(熟), 手持木碗出锅"},
|
||||
|
||||
# ---------------- 五、单独菜谱 ----------------
|
||||
# 菜谱29 猪蹄汤
|
||||
@@ -667,4 +667,11 @@ TIMER_RULES = [
|
||||
# 煮豆腐(单级60秒)
|
||||
{"source": BEANCURD_SOUP_0, "target": BEANCURD_SOUP_1, "time": 60,
|
||||
"below": [LIT_STOVE], "autoStart": True},
|
||||
# 蔬菜鱼片汤(60秒/级, 3级)
|
||||
{"source": VEGETABLE_FISH_SOUP_0, "target": VEGETABLE_FISH_SOUP_1, "time": 60,
|
||||
"below": [LIT_STOVE], "autoStart": True},
|
||||
{"source": VEGETABLE_FISH_SOUP_1, "target": VEGETABLE_FISH_SOUP_2, "time": 60,
|
||||
"below": [LIT_STOVE], "autoStart": True},
|
||||
{"source": VEGETABLE_FISH_SOUP_2, "target": VEGETABLE_FISH_SOUP_3, "time": 60,
|
||||
"below": [LIT_STOVE], "autoStart": True},
|
||||
]
|
||||
+9
-3
@@ -94,7 +94,8 @@ class TangguoService(BlueFoxServerSystem):
|
||||
self._finalNames[r["block"]] = nm
|
||||
|
||||
self.timerSources = set()
|
||||
self.startTimerTips = {}
|
||||
self.startTimerTips = {} # 空手右键启动计时 -> 提示(含总共多少秒)
|
||||
self.timingTips = {} # 空手右键"已在计时中" -> 提示(同样含总共多少秒)
|
||||
for src, r in self._timerBySrc.items():
|
||||
self.timerSources.add(src)
|
||||
self.featureBlocks.add(src) # 登记右键路由, 空手右键才分发到这里
|
||||
@@ -107,12 +108,16 @@ class TangguoService(BlueFoxServerSystem):
|
||||
stage = "(%d级: %s)" % (len(stages), "→".join("%d秒" % s for s in stages))
|
||||
if r.get("randomTargets"):
|
||||
tip = "§a开始煮饭…共需计时%d秒%s; 计时结束变成 熟米饭(形态随机)" % (total, stage)
|
||||
t2 = "§e正在煮饭中…共需计时%d秒%s, 计时结束变成 熟米饭(形态随机)" % (total, stage)
|
||||
else:
|
||||
tip = "§a开始熬制…共需计时%d秒%s" % (total, stage)
|
||||
t2 = "§e正在熬制中…共需计时%d秒%s" % (total, stage)
|
||||
end = self._timerTerminalName(src)
|
||||
if end:
|
||||
tip += "; 计时结束变成 %s" % end
|
||||
t2 += ", 计时结束变成 %s" % end
|
||||
self.startTimerTips[src] = tip
|
||||
self.timingTips[src] = t2
|
||||
|
||||
# ---- 右键冷却表 ----
|
||||
self.cooldown = {}
|
||||
@@ -161,11 +166,12 @@ 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:
|
||||
comp.CreateMsg(playerId).NotifyOneMessage(playerId, "§e已经在计时中")
|
||||
comp.CreateMsg(playerId).NotifyOneMessage(
|
||||
playerId, self.timingTips.get(blockName, "§e已经在计时中"))
|
||||
return
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
Reference in new issue
Block a user