This commit is contained in:
2025-12-08 11:28:44 +01:00
parent b750f320fc
commit 3336b59e7d
7 changed files with 155 additions and 8 deletions

View File

@@ -331,4 +331,21 @@ class InteractionSystem {
update(delta) {
// No logic needed here anymore (loot pickup handled by LootSystem)
}
spawnLoot(gridX, gridY, itemType, count = 1) {
// Add items directly to inventory instead of spawning physical loot
if (this.scene.inventorySystem) {
const added = this.scene.inventorySystem.addItem(itemType, count);
if (added) {
// Visual feedback
this.scene.events.emit('show-floating-text', {
x: gridX * 48,
y: gridY * 48,
text: `+${count} ${itemType}`,
color: '#00FF00'
});
console.log(`📦 Spawned ${count}x ${itemType} at ${gridX},${gridY}`);
}
}
}
}