Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Items with infinite max quantity don't stack #207

Open
420kyle69 opened this issue Mar 12, 2022 · 0 comments
Open

Items with infinite max quantity don't stack #207

420kyle69 opened this issue Mar 12, 2022 · 0 comments

Comments

@420kyle69
Copy link
Contributor

When the Max quantity option on an item is left blank, in-game the item's maxQuantity property is null.
Infinite quantity item in editor
Infinite item's properties
This leads to the matchingItem._stats.maxQuantity - matchingItem._stats.quantity > 0 condition never passing because null is 0, and items of infinite max quantity will never stack. Either the editor could be reworked to save blank number inputs as Infinity, or line 991 of Unit.js can be changed to check if maxQuantity is null.

itemData.quantity > 0 && (matchingItem._stats.maxQuantity - matchingItem._stats.quantity > 0)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant