Cheo
Active member
Hello, I managed to reproduce an issue with item exchange between an inventory and equipment slot in the "7_1 Item Shape Grid With Equipping And Hotbar" demo scene. Here are the steps :
-Follow the instructions to make it so that the inventory grid does not display equipped items.
-Use an ItemViewSlotDropActionSet with only a SmartExchange condition and action.
-Assign a tall item into an equipment slot.
-Make it so that the inventory grid does not contain enough space for that tall item to be dynamically brought back in.
-Assign a smaller item into the equipment slot.
If you follow these steps you should see that the smaller item is equipped but that the big one just disappears and is nowhere to be seen in the Inventory grid. As I looked into ItemViewDropContainerCanSmartExchangeCondition, I noticed that sourceCanAdd wasn't used in the last return line, and that it wasn't set to true if no item were to be added to the source. If these two issues are fixed, we can then prevent an item from being dragged into the equipment slot if the current one can't go back to the grid, but this actually brings another issue as in reality the switch is also prevented even if there is enough space for the bigger item. Here is a video illustrating all of this :
Lastly as I mention at the end of the video my investigation led me to ItemShapeGridData.IsPositionAvailable which seems to return false when it shouldn't. This already took me a good amount of time for today and this is grid code stuff that I haven't touched before, so this is where I stop for now. I was at a playtest event last Saturday and saw a player reproduce the initial issue with a gun disappearing, so this is quite a significant issue for us and hope you can take a look at this, thanks.
-Follow the instructions to make it so that the inventory grid does not display equipped items.
-Use an ItemViewSlotDropActionSet with only a SmartExchange condition and action.
-Assign a tall item into an equipment slot.
-Make it so that the inventory grid does not contain enough space for that tall item to be dynamically brought back in.
-Assign a smaller item into the equipment slot.
If you follow these steps you should see that the smaller item is equipped but that the big one just disappears and is nowhere to be seen in the Inventory grid. As I looked into ItemViewDropContainerCanSmartExchangeCondition, I noticed that sourceCanAdd wasn't used in the last return line, and that it wasn't set to true if no item were to be added to the source. If these two issues are fixed, we can then prevent an item from being dragged into the equipment slot if the current one can't go back to the grid, but this actually brings another issue as in reality the switch is also prevented even if there is enough space for the bigger item. Here is a video illustrating all of this :
Lastly as I mention at the end of the video my investigation led me to ItemShapeGridData.IsPositionAvailable which seems to return false when it shouldn't. This already took me a good amount of time for today and this is grid code stuff that I haven't touched before, so this is where I stop for now. I was at a playtest event last Saturday and saw a player reproduce the initial issue with a gun disappearing, so this is quite a significant issue for us and hope you can take a look at this, thanks.
