fix: give

This commit is contained in:
cha0s 2024-09-28 07:56:00 -05:00
parent 46f0a0cc07
commit c1bdae1c8c

View File

@ -194,9 +194,9 @@ export default class Inventory extends Component {
}
for (let slot = 1; slot < 11; ++slot) {
if (!slots[slot]) {
slots[slot] = stack;
slots[slot] = {...stack};
this.$$items[slot] = new ItemProxy(Component, this, slot);
Component.markChange(this.entity, 'given', {[slot]: slots[slot]});
Component.markChange(this.entity, 'given', {[slot]: {...stack}});
await this.$$items[slot].load(stack.source);
return;
}