Barotrauma
Barotrauma copied to clipboard
canbeselected triggers on dropping item from inventory
- [x] I have searched the issue tracker to check if the issue has already been reported.
Description having canbeselected="true" on a container opens the container when the item is dropped it would stay open until the player moved far enough away (interaction radius?) or clicked away
Steps To Reproduce If possible, describe how the developers can reproduce the issue. It is often extremely hard to fix a bug if we don't know how to make it happen.
Version 0.14.9
Additional information removing canbeselected attribute made it stop appearing.
Actually what happens here is that the item gets selected when you click on it, the inventory just isn't drawn while the item is in your inventory. Is there are reason to use "canbselected" in this case, or is the problem just that it's behaving in an unexpected way?
A holdable to be placed on a wall should do it, though I'm not quite sure why the vanilla Detonator doesn't.
The vanilla detonator does however, open a 0 slot container UI when picking it up off the ground (not wrench),
Fixed in https://github.com/Regalis11/Barotrauma-development/commit/bd8b1fa8609352d792fce28d40fe8da1a576b7dd
Tested in 0.19.0.0, works with note:
There is a small jarring effect when you go to pick the item up where the container opens in multiplayer for a split second (showing a 1 slot container for a detonator dropped on the floor as a quick example) before disappearing once its on the inventory bar.