Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

canbeselected triggers on dropping item from inventory

Open Tsunder opened this issue 3 years ago • 4 comments

  • [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.

Tsunder avatar Sep 05 '21 14:09 Tsunder

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?

Regalis11 avatar Sep 06 '21 07:09 Regalis11

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),

Tsunder avatar Sep 11 '21 06:09 Tsunder

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/bd8b1fa8609352d792fce28d40fe8da1a576b7dd

Regalis11 avatar Jul 15 '22 12:07 Regalis11

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.

NilanthAnimosus avatar Jul 26 '22 17:07 NilanthAnimosus