面食 5
This commit is contained in:
1 parent
a4c5ad43e4
commit
ad48047f4a
3 files changed
+19
-7
No files matched your search
+4
-3
@@ -166,6 +166,10 @@ class MianshiService(BlueFoxServerSystem):
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
# 先冷却, 再检查下方/消耗等(避免长按右键疯狂弹提示)
|
||||
if not self.checkCooldown((dim, x, y, z), 0.4):
|
||||
return True
|
||||
|
||||
# 需要下方方块(如蒸笼下要点燃的炉灶): 不满足则提示并拦截, 不消耗物品
|
||||
needBelow = rule.get("needBelow")
|
||||
if needBelow and not self._belowIs(dim, (x, y, z), needBelow):
|
||||
@@ -173,9 +177,6 @@ class MianshiService(BlueFoxServerSystem):
|
||||
playerId, rule.get("belowTip", "§c下方方块不符合"))
|
||||
return True
|
||||
|
||||
if not self.checkCooldown((dim, x, y, z), 0.4):
|
||||
return True
|
||||
|
||||
itemDict = self.getCarriedItem(playerId)
|
||||
if not itemDict:
|
||||
return False
|
||||
|
||||
+13
-4
@@ -231,10 +231,6 @@ class FeatureDispatcher(BlueFoxServerSystem):
|
||||
"""
|
||||
itemName = args.get("itemName")
|
||||
services = self.itemUseOnAll.get(itemName)
|
||||
if not services:
|
||||
return
|
||||
print "[FD-ItemUseOn]", itemName, "svcs:", [s.__class__.__name__ for s in services]
|
||||
|
||||
playerId = args.get("playerId") or args.get("entityId")
|
||||
# 被点方块(用于去重: 该方块归哪些右键服务管辖)
|
||||
clickedName = None
|
||||
@@ -247,6 +243,19 @@ class FeatureDispatcher(BlueFoxServerSystem):
|
||||
pass
|
||||
|
||||
owners = self.blockOwnerAll.get(clickedName) if clickedName else None
|
||||
|
||||
# 手持方块物品右键"功能方块"(右键服务管辖的方块): 若没有任何 itemUseOn
|
||||
# 服务会处理它, 直接取消默认放置 —— 防止"先放一个方块再消失"的体验
|
||||
# (例如手持生饺子右键蒸笼、手持方块右键面团等, 意图是转换而非放置)
|
||||
if clickedName and owners and (not services or not any(
|
||||
s in owners for s in services)):
|
||||
args['ret'] = True
|
||||
return
|
||||
|
||||
if not services:
|
||||
return
|
||||
print "[FD-ItemUseOn]", itemName, "svcs:", [s.__class__.__name__ for s in services]
|
||||
|
||||
for service in services:
|
||||
# 被点方块属于某些"右键方块"服务的管辖(条箱/挂肉钩/锅具等) → 该方块右键由
|
||||
# ServerBlockUseEvent 处理(放入/挂鱼/做菜), 跳过本服务的 itemUseOn,
|
||||
|
||||
@@ -630,6 +630,8 @@ FurnitureData+FurnitureService 实现, 注册到 FeatureDispatcher)
|
||||
【信息提示】所有转换有成功提示(含消耗数量); 计时开始提示(和面完成开始发酵/
|
||||
转法棍胚开始发酵/烤制60秒/蒸制); 计时完成提示发给发起玩家; 烤炉被打碎/
|
||||
蒸笼下炉灶移走有中断/暂停提示 [已实现]
|
||||
【右键体验】右键转换/放入/取出均有0.4秒冷却(长按不会疯狂弹提示); 手持方块物品
|
||||
右键"功能方块"时若无非处理服务, 直接取消默认放置, 不会"先放一个方块再消失" [已实现]
|
||||
|
||||
【留后】吃(熟肉包子/馍/煎饼卷/熟竹筒饭/蛋糕小块 右键吃)、巧克力蛋糕系列
|
||||
见 全部功能没做什么.txt 面食节
|
||||
|
||||
Reference in new issue
Block a user