Proper handling of "unknown" spells and wands with them.
Currently, spells that are in the bank but dont exist on the local client will 'crash' the bank UI and also cause lua error spam.
This is likely to be caused by either beta-branch spells on a non-beta client, or mod spells where the local player is missing the relevant mod.
Instead, we will render them with an obvious 'missing-texture' icon, and also add tooltip text to explain the issue.
Also, the spell (or wand, if it is on a wand) will not be withdrawable from the bank - This doesn't actually seriously break Noita anyway, but it leaves the player with a useless dummy spell that doesn't actually do anything, so let's avoid that situation 😄
Fixing "all" tab
Went in and figured out what was breaking the 'all' tab when entering search text:
Moved initial sort of bank items in the 'all' tab to its own if-else block instead of trying to include it in spells/wands/items block (spells tab was checking filter buttons that dont exist in 'all' tab)
Removed some if-statement that was only allowing spells to be selected on the spells tab (extraneous check, was already filtered by-spells on that tab at that point)
Some improvements to the bank UI:
Proper handling of "unknown" spells and wands with them.
Currently, spells that are in the bank but dont exist on the local client will 'crash' the bank UI and also cause lua error spam.
This is likely to be caused by either beta-branch spells on a non-beta client, or mod spells where the local player is missing the relevant mod.
Instead, we will render them with an obvious 'missing-texture' icon, and also add tooltip text to explain the issue. Also, the spell (or wand, if it is on a wand) will not be withdrawable from the bank - This doesn't actually seriously break Noita anyway, but it leaves the player with a useless dummy spell that doesn't actually do anything, so let's avoid that situation 😄
Fixing "all" tab
Went in and figured out what was breaking the 'all' tab when entering search text: