peter-kish / gloot

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

Bug: Trying to stack stackable item from inventoryGrid to InventoryGridStacked causes a crash. #225

Closed LeeWannacott closed 1 month ago

LeeWannacott commented 1 month ago

use case: a shop might have InventoryGrid with nothing stackable because then you could literally stack and then transfer and get two for the price of one. but players inventory is stackable (although I guess could program; price * the stack size). Either way I don't know if it should crash the game. I'll probably switch my shops to inventoryGridStacked anyway :thinking: I report it anyhow.

image

Note: In Godot editor right click "Change Type" from inventoryGrid -> inventoryGridStacked doesn't seem to work, so I'll probably have to delete and recreate.

peter-kish commented 1 month ago

eb48df094258a9affd29b34fc979ac221985629f will probably fix this, but I think I should also add some more tests for moving items between inventories of different types at some point.

P.S.: "Change Type" seems to have this bug when it comes to custom classes since Godot 3: https://github.com/godotengine/godot/issues/39147