发光 垃圾桶问题
This commit is contained in:
1 parent
61c7c71016
commit
14e5057d58
7 files changed
+81
-2
No files matched your search
@@ -337,6 +337,26 @@ BLOCKUSE_CANCEL_ITEMS = set(
|
||||
_it for (_it, _bk) in BLOCKUSE_CANCEL
|
||||
)
|
||||
|
||||
# ---- 通配"任意物品"转换(垃圾桶)的【整块】拦截集合 ----
|
||||
# 垃圾桶规则的 item="*any"(任意非空物品), 无法枚举成 (item, block) 对, 上面的精确派生
|
||||
# 会整条跳过 -> 手持 葡萄(吃)/胡萝卜(放置) 右键垃圾桶时客户端不拦, 原版先吃/先放,
|
||||
# 服务端再取消已经太晚("一边吃葡萄一边清空"/"直接放置")。故改为按"被点方块"整块拦截。
|
||||
# 派生条件: 规则表里 item == "*any" 且【无 below 前置条件】。
|
||||
# (带 below 的如丸子机 meatballmaker_2 需下方有炉灶, 客户端无法判断, 不能无条件拦,
|
||||
# 否则条件不满足时会吞掉玩家正常对着它吃东西/放东西。)
|
||||
BLOCKUSE_CANCEL_ANY_BLOCKS = set()
|
||||
for _tbl in _BLOCK_USE_TABLES:
|
||||
for _r in _as_list(_tbl):
|
||||
if not isinstance(_r, dict):
|
||||
continue
|
||||
if _r.get("item") != "*any":
|
||||
continue
|
||||
if _r.get("below"):
|
||||
continue # 有前置条件(如炉灶)的客户端无法判断, 不拦
|
||||
_bk = _r.get("source") or _r.get("block")
|
||||
if isinstance(_bk, basestring) and _bk:
|
||||
BLOCKUSE_CANCEL_ANY_BLOCKS.add(_bk)
|
||||
|
||||
# ---- Chuju 锅铲/油罐 inline 转换(在 ChujuService.handleItemUseOn 内联, 不在数据表) ----
|
||||
# 手持 锅铲/带油锅铲 右键 油罐(oilcan)/炒锅(wok) 蘸油/还油/上油 -> 取消默认
|
||||
CHUJU_INLINE_CANCEL = {
|
||||
|
||||
Reference in new issue
Block a user