popravki
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user