物品预备

This commit is contained in:
Giao committed 2026-10-06 21:55:32 +08:00
1 parent 43c1859aad
commit a0ff1f80d1
297 files changed
+4000 -9

No files matched your search

@@ -188,6 +188,14 @@ class ShousiService(BlueFoxServerSystem):
recipe = self.findRecipe(blockName, itemDict)
if not recipe:
return False
# ---- 数量校验: 消耗型转换必须手持足量(如 铺饭团需4个), 不足则提示不转换 ----
need = recipe.get("consume", 0)
if need > 0:
have = itemDict.get("count", 0) if itemDict else 0
if have < need:
comp.CreateMsg(playerId).NotifyOneMessage(
playerId, "§c数量不足,需要 %d 个" % need)
return True
if not self.checkCooldown(key, 0.5):
return True
self.handleSwitch(recipe, playerId, pos, dim, itemDict)