汤锅功能实现 5 计时 提示修改 蔬菜鱼片汤补充 锅铲添油实现
This commit is contained in:
1 parent
31bb44a409
commit
c342dcc93d
12 files changed
+585
-395
No files matched your search
+6
-3
@@ -96,7 +96,8 @@ class MianshiService(BlueFoxServerSystem):
|
||||
# ---- 空手右键"蒸笼计时源"(蒸X_生): 放在点燃炉灶上 -> 开始计时 ----
|
||||
# 蒸笼蒸制的计时源(下方必须点燃炉灶)才登记, 烤炉/发酵等走各自机制
|
||||
self.timerSources = set()
|
||||
self.startTimerTips = {}
|
||||
self.startTimerTips = {} # 空手右键启动计时 -> 提示(含总共多少秒)
|
||||
self.timingTips = {} # 空手右键"已在计时中" -> 提示(同样含总共多少秒)
|
||||
for r in TIMER_RULES:
|
||||
if LIT_STOVE not in (r.get("below") or []):
|
||||
continue
|
||||
@@ -107,6 +108,7 @@ class MianshiService(BlueFoxServerSystem):
|
||||
sec = r.get("time", 60)
|
||||
tgt = NAME_MAP.get(r["target"], r["target"])
|
||||
self.startTimerTips[src] = "§a开始蒸制…共需计时%d秒; 计时结束变成 %s" % (sec, tgt)
|
||||
self.timingTips[src] = "§e正在蒸制中…共需计时%d秒, 计时结束变成 %s" % (sec, tgt)
|
||||
|
||||
# ---- 结果方块/物品 -> "下一步"可读提示(供转换/入笼提示追加) ----
|
||||
# 例子: 饺子皮 -> "加入 猪肉馅、青菜碎"; 可颂面胚 -> "放在烤炉上等计时(60秒)结束变成 可颂"
|
||||
@@ -298,12 +300,13 @@ class MianshiService(BlueFoxServerSystem):
|
||||
return True
|
||||
|
||||
def _handleStartTimer(self, blockName, playerId, pos, dim):
|
||||
"""空手右键蒸笼计时源(蒸X_生): 已在计时中 -> 提示;
|
||||
"""空手右键蒸笼计时源(蒸X_生): 已在计时中 -> 提示总时长;
|
||||
否则转发计时服务开始(下方需点燃的炉灶 stove_2)"""
|
||||
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