Some issues with the Keyring
Jack-McKalling opened this issue ยท 1 comments
- Removing the currently selected key doesn't update the selection
When you remove the currently selected key from the keyring, it will not switch to select a different key if there is one, and maintains the key mode that was removed. This is evident by the item's name as well as its icon, and it even maintains the functionality of said removed key.
It is possible to switch away from the unavailable key, but you cannot switch back to it (it's not there anymore, so that's appropriate).
For example. You have a keyring with both the quantify key and drawer key in it, select e.g. the quantify one, and then remove the quantify key. The keyring will still be in quantify mode and function as if the quantify key was still in it. It still quantifies drawers when used.
How to fix:
Each time a key is removed from the keyring, it should revalidate the currently selected key, and switch away from it if appropriate to prevent ghost key selection.
- Removing the last key from the keyring creates a new blank item void of any added data (a morphing tool would get destroyed)
When you add keys to a blank keyring (or craft a keyring from a key), and then add the keyring to the morphing tool, the morphing tool will not be supported by the keyring when removing keys. Because as soon as the last key is removed from the keyring, the morphing tool it was a part of, gets completely destroyed and the item reverts to just a blank keyring.
How to fix:
When removing the last key from the ring, it shouldn't just replace the item with a blank keyring, but copy the data tag to the empty ring so extra, unexpected data gets persisted.
- A renamed keyring looses its custom name when all keys have been removed from it
If you rename the keyring before adding keys to it, when all keys are then removed from it again, it also loses that custom name on the keyring.
How to fix:
Same solution as issue 2.
- A renamed keyring doesn't show which key is currently selected
When the keyring has been renamed, it doesn't show the currently selected key at all anymore. The custom name completely replaces the whole name of the item including its mode.
How to fix:
I don't actually know how this works, but I expect this could or should be trivial.
- The keyring displays the default item name of the currently selected key, even if it's been renamed
Custom names on the keys themselves are indeed supported and maintained once removed from the keyring. However the keyring doesn't display these custom names in its own name, it just shows their default name.
For example, a keyring with only a drawer key in it, that's been renamed to "Locking Key", will still be called "Keyring (Drawer Key)".
- The lore on the keyring's tooltip doesn't render linefeeds correctly
When hovering over a keyring, it displays brief instructions how to use it, but this text contains two escaped linefeed characters.