From 0bd5136dc20141235dbb2e20f35bd5d71bb2fb2a Mon Sep 17 00:00:00 2001 From: EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> Date: Thu, 11 Aug 2022 04:55:17 +0800 Subject: fix fix not being able to record negative amount cuz it got returned --- features/globalSettings/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index 30ba992..689df07 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -185,11 +185,13 @@ class GlobalSettings extends Feature { this.addToTodoPickUpLog(now, oldItemName, newItemAmount - oldItemAmount) return //so it doesn't provide duplicate message } - if (getSBUUID(oldItem) === getSBUUID(newItem) && oldItem) return // fixes using old master star making sba go brrr - if (oldItem) { //thing removed from that inventory slot + let olduuid = getSBUUID(oldItem) + let newuuid = getSBUUID(newItem) + if (oldItemAmount == 1 && olduuid == newuuid) return // fixes using old master star making sba go brrr + if (oldItemName) { //thing removed from that inventory slot this.addToTodoPickUpLog(now, oldItemName, (-1) * oldItemAmount) } - if (newItem) { //thing being placed into that inventory slot + if (newItemName) { //thing being placed into that inventory slot this.addToTodoPickUpLog(now, newItemName, newItemAmount) } } -- cgit