加入榨汁机 冰棍盒,炒冰盒 厨具架小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

@@ -156,7 +156,7 @@ class MarketService(BlueFoxServerSystem):
# ---- 取出:掉落物 ----
if recipe.get("dropItem"):
self.dropItems(dim, pos, recipe["dropItem"])
self.dropItems(dim, pos, recipe["dropItem"], playerId)
# ---- 替换方块 ----
if recipe.get("target"):
@@ -232,10 +232,10 @@ class MarketService(BlueFoxServerSystem):
# 八、工具方法:以掉落物形式生成物品(取出)
# ============================================================================
def dropItems(self, dim, pos, dropList):
def dropItems(self, dim, pos, dropList, playerId=None):
"""
dropList 格式:[{"name": "xxx", "count": N}, ...]
在方块上方生成掉落物实体, 让它自然掉到地上。
playerId 给出时走统一优先级(任务一: 同类合并->主手->背包->掉落)。
"""
for d in dropList:
itemDict = {
@@ -243,7 +243,11 @@ class MarketService(BlueFoxServerSystem):
"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]))
# ============================================================================
# 九、工具方法:冷却检查