diff options
author | EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> | 2022-08-11 04:55:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 04:55:17 +0800 |
commit | 0bd5136dc20141235dbb2e20f35bd5d71bb2fb2a (patch) | |
tree | d5f86b8be5132e7a42dff031a0b7659abdb71d8e /features/globalSettings | |
parent | 59914a8efc0e5001a8397322622d564b9cfbcdac (diff) | |
download | SoopyV2-0bd5136dc20141235dbb2e20f35bd5d71bb2fb2a.tar.gz SoopyV2-0bd5136dc20141235dbb2e20f35bd5d71bb2fb2a.tar.bz2 SoopyV2-0bd5136dc20141235dbb2e20f35bd5d71bb2fb2a.zip |
fix
fix not being able to record negative amount cuz it got returned
Diffstat (limited to 'features/globalSettings')
-rw-r--r-- | features/globalSettings/index.js | 8 |
1 files 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) } } |