加入榨汁机 冰棍盒,炒冰盒 厨具架小bug

This commit is contained in:
wenhe committed 2026-09-29 17:14:43 +08:00
1 parent a7b56aec7d
commit 9d12baf1b2
25 files changed
+354 -227

No files matched your search

@@ -245,7 +245,7 @@ class ShicaiService(BlueFoxServerSystem):
else:
# 最后一级再切 -> 掉碎 + 变空气
self.clearBlock(pos, dim)
self.dropItems(dim, pos, [chain["drop"]])
self.dropItems(dim, pos, [chain["drop"]], playerId)
return True
# ============================================================================
@@ -261,7 +261,7 @@ class ShicaiService(BlueFoxServerSystem):
n = self.garlicChop.get(gkey, 0) + 1
if n >= GARLIC_CHOP_COUNT:
self.clearBlock(pos, dim)
self.dropItems(dim, pos, [GARLIC_DROP])
self.dropItems(dim, pos, [GARLIC_DROP], playerId)
self.garlicChop.pop(gkey, None)
else:
self.garlicChop[gkey] = n
@@ -284,7 +284,7 @@ class ShicaiService(BlueFoxServerSystem):
return True
self.consumeItem(playerId, itemDict, need)
self.clearBlock(pos, dim)
self.dropItems(dim, pos, [rule["drop"]])
self.dropItems(dim, pos, [rule["drop"]], playerId)
return True
# ============================================================================
@@ -343,14 +343,19 @@ class ShicaiService(BlueFoxServerSystem):
# 八、工具方法:以掉落物形式生成物品
# ============================================================================
def dropItems(self, dim, pos, dropList):
def dropItems(self, dim, pos, dropList, playerId=None):
for d in dropList:
itemDict = {
"itemName": d["name"],
"count": d.get("count", 1),
"auxValue": d.get("aux", 0),
}
self.CreateEngineItemEntity(itemDict, dim, (pos[0], pos[1] + 0.5, pos[2]))
if playerId is not None:
# 任务一: 玩家主动获得 -> 统一优先级(同类合并->主手->背包->掉落)
self.giveItemToPlayer(playerId, d["name"], d.get("count", 1), pos, dim,
aux=d.get("aux", 0))
else:
self.CreateEngineItemEntity(itemDict, dim, (pos[0], pos[1] + 0.5, pos[2]))
# ============================================================================
# 九、工具方法:冷却检查