peter-kish / gloot

A universal inventory system for the Godot game engine.
MIT License
640 stars 28 forks source link

Auto-remove items when `stack_size == 0` #122

Closed peter-kish closed 1 year ago

peter-kish commented 1 year ago

Currently the stack_size item property can be set to any int value. It would make sense to automatically remove the items with zero stack sizes from the inventory when working with InventoryStacked and InventoryGridStacked.

Initially this could be implemented in StacksConstraint.set_item_stack_size and later also integrated into the item property editor.

It would also make sense for StacksConstraint.set_item_stack_size to reject negative values and values greater than the max stack size.

peter-kish commented 1 year ago

Implemented in v2.3.6