油锅 4
This commit is contained in:
1 parent
fd4f65e19e
commit
b69e487b10
2 files changed
+35
-7
No files matched your search
+15
-3
@@ -147,10 +147,21 @@ class YouguoTimerService(BlueFoxServerSystem):
|
||||
|
||||
def _handleBelowBroken(self, dim, pos, blockName, data, rules):
|
||||
"""下方点燃炉灶被移走/熄灭: 暂停计时(数据保留, 炉灶回来继续) + 提示发起玩家"""
|
||||
self._notifyIfOnline(data.get("rtdd_tp"), "§c油锅下的炉灶移走了, 暂停炸制")
|
||||
tp = ""
|
||||
try:
|
||||
tp = data["rtdd_tp"] or ""
|
||||
except Exception:
|
||||
tp = ""
|
||||
self._notifyIfOnline(tp, "§c油锅下的炉灶移走了, 暂停炸制")
|
||||
|
||||
def _finishTimer(self, dim, pos, rule, data):
|
||||
try:
|
||||
# 先取出发起玩家(下方 replaceBlock/_clearTimerData 会把实体数据清掉, 必须提前读)
|
||||
tp = ""
|
||||
try:
|
||||
tp = data["rtdd_tp"] or ""
|
||||
except Exception:
|
||||
tp = ""
|
||||
cur = comp.CreateBlockInfo(LevelId).GetBlockNew(pos, dim)
|
||||
if cur and cur.get("name") != rule["source"]:
|
||||
self._clearTimerData(dim, pos)
|
||||
@@ -158,10 +169,11 @@ class YouguoTimerService(BlueFoxServerSystem):
|
||||
# 到点转换
|
||||
self.replaceBlock(pos, dim, rule["target"], None)
|
||||
self._clearTimerData(dim, pos)
|
||||
# 计时结束提示: 发给发起玩家; 发起者不在/未知则提示附近
|
||||
tip = rule.get("doneTip", "")
|
||||
if tip:
|
||||
self._notifyIfOnline(data.get("rtdd_tp"), tip)
|
||||
if not data.get("rtdd_tp"):
|
||||
self._notifyIfOnline(tp, tip)
|
||||
if not tp:
|
||||
self._notifyNearby(dim, pos, tip)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
Reference in new issue
Block a user