From 4ba38af2464da4e76151045b6cc0586c727ecd38 Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 25 Jun 2024 09:04:07 -0500 Subject: [PATCH] fix: item proxy --- app/ecs-components/inventory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ecs-components/inventory.js b/app/ecs-components/inventory.js index bb38d7a..69ef133 100644 --- a/app/ecs-components/inventory.js +++ b/app/ecs-components/inventory.js @@ -60,7 +60,7 @@ export default function(Component) { const instance = this; const proxy = new Proxy(item, { set(target, property, value) { - target[property] = value; + slots[slot][property] = value; if ('qty' === property && value <= 0) { Component.markChange(instance.entity, 'slotChange', {[slot]: false}); delete slots[slot];