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

@@ -134,7 +134,7 @@ class ShoubanService(BlueFoxServerSystem):
# 盒子变为"开过"
self.replaceBlock(pos, dim, BLIND_BOX_TARGET, playerId)
# 掉落手办
self.dropItems(dim, pos, [{"name": fig, "count": 1}])
self.dropItems(dim, pos, [{"name": fig, "count": 1}], playerId)
# 提示开出内容
name = FIGURINE_NAMES.get(fig, "手办")
@@ -174,10 +174,10 @@ class ShoubanService(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 = {
@@ -185,7 +185,11 @@ class ShoubanService(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]))
# ============================================================================
# 六、工具方法:冷却检查