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

Items with infinite max quantity don't stack #207

@420kyle69

Description

@420kyle69

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions