汤锅功能实现 5 计时 提示修改 蔬菜鱼片汤补充 锅铲添油实现
This commit is contained in:
1 parent
31bb44a409
commit
c342dcc93d
12 files changed
+585
-395
No files matched your search
+8
-3
@@ -86,7 +86,8 @@ class YouguoService(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)
|
||||
@@ -96,10 +97,13 @@ class YouguoService(BlueFoxServerSystem):
|
||||
else:
|
||||
stage = "(%d级: %s)" % (len(stages), "→".join("%d秒" % s for s in stages))
|
||||
tip = "§a开始炸制…共需计时%d秒%s" % (total, stage)
|
||||
t2 = "§e正在炸制中…共需计时%d秒%s" % (total, stage)
|
||||
end = self._oilTerminalName(src)
|
||||
if end:
|
||||
tip += "; 计时结束变成 %s" % end
|
||||
t2 += ", 计时结束变成 %s" % end
|
||||
self.startTimerTips[src] = tip
|
||||
self.timingTips[src] = t2
|
||||
|
||||
# ---- 右键冷却表 ----
|
||||
self.cooldown = {}
|
||||
@@ -147,11 +151,12 @@ class YouguoService(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