peter-kish / gloot

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

Vanishing items in item slots #177

Closed peter-kish closed 7 months ago

peter-kish commented 8 months ago

I also found this bug where your item just vanishes. Not sure what causes it. Seems like it happens dragging and dropping into the same slot that is equipped; when dragging and dropping onto the corner of the item slot (in the top right). Its pretty easy to make it happen.

https://private-user-images.githubusercontent.com/49783296/307601437-02c456a7-8ad2-4019-a75a-46726422c8e5.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDkxNDQyMzksIm5iZiI6MTcwOTE0MzkzOSwicGF0aCI6Ii80OTc4MzI5Ni8zMDc2MDE0MzctMDJjNDU2YTctOGFkMi00MDE5LWE3NWEtNDY3MjY0MjJjOGU1Lm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjI4VDE4MTIxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA5YmRkYTcxZDEzNWFiYTM4ZWI5YzIzODY4NGM0NmRhOTA0MzJkNjA1MjhiNzU1MDg0YWQyNzAwZDg5MDdiZmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qiHSNGEs3cOJBUhyWXDkjG7PycufdnsqFFJywIojTjQ

(Original issue: https://github.com/peter-kish/gloot/issues/167)

peter-kish commented 8 months ago

Should be fixed on the dev_v2.4.4 branch. Will close this issue once it has been merged.

LeeWannacott commented 7 months ago

@peter-kish Just updated looks like you fixed this issue :+1: , although I found another condition under which inventory in an ItemSlot vanishes:

https://github.com/peter-kish/gloot/assets/49783296/156799af-37d0-413e-8fb8-e51d58cb1ea1

(mainly an issue in my particular case on rings, or one handed weapons which you would be able to swap between two slots). I'm guessing its to do with keeping track of which InventoryGrid the item comes from.

peter-kish commented 7 months ago

Yeah, swapping items still doesn't work. I think that one should be fixed once https://github.com/peter-kish/gloot/issues/171 is imeplemted.