From c1bdae1c8c57d61d8b9ce3e5948bcee85d63fff4 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sat, 28 Sep 2024 07:56:00 -0500 Subject: [PATCH] fix: give --- app/ecs/components/inventory.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ecs/components/inventory.js b/app/ecs/components/inventory.js index d9c7368..948e27a 100644 --- a/app/ecs/components/inventory.js +++ b/app/ecs/components/inventory.js @@ -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; }