Skip to content

[drawers] support more info for single drawer cabinets#52

Open
SwissalpS wants to merge 11 commits into
masterfrom
drawerLabel
Open

[drawers] support more info for single drawer cabinets#52
SwissalpS wants to merge 11 commits into
masterfrom
drawerLabel

Conversation

@SwissalpS

@SwissalpS SwissalpS commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

The other drawer types were left out for reasons:

  • too much information bunched into a tooltip.
  • only very few players would actually have stacks of non-single drawer cabinets with items and need to be able to identify them in an inventory.

When need arrises, we can then search for a solution for multi-drawer cabinets.

@SwissalpS SwissalpS added the enhancement New feature or request label Apr 4, 2026
@SwissalpS SwissalpS changed the title Drawer label support more info for single drawer cabinets [drawers] support more info for single drawer cabinets Apr 4, 2026
@OgelGames

Copy link
Copy Markdown
Contributor

IMO it wouldn't be too much if they were split across multiple lines, something like this:

Wooden Drawers (1x2) with items
- Cobblestone
- Acacia Planks

Could even put the quantities, but maybe that would be too much.

Comment thread nodes/drawers.lua Outdated
Comment thread nodes/drawers.lua Outdated
@SwissalpS

Copy link
Copy Markdown
Contributor Author

IMO it wouldn't be too much if they were split across multiple lines, something like this:

Wooden Drawers (1x2) with items
- Cobblestone
- Acacia Planks

Could even put the quantities, but maybe that would be too much.

With 1x2 it seems fine, but just imagine 4 lines on a small screen.

@SwissalpS

SwissalpS commented Apr 5, 2026

Copy link
Copy Markdown
Contributor Author

Also it may be nicer to have it limited to the item name (no "xyz wooden drawer").

Edit: Just like with technic chests. If nobody is against this idea, I'm going to do this making the whole PR smaller :D

@SwissalpS

SwissalpS commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

After trying several options I feel this is the most useable:

  • drawer containing 234 carrots -> "234 Carrots"
  • drawer containing 234567 carrots -> "235k Carrots"
  • drawer containing nothing (except maybe extenders) -> generic "<Drawer type> with items"

@SwissalpS
SwissalpS requested a review from OgelGames April 7, 2026 19:52
@SwissalpS

Copy link
Copy Markdown
Contributor Author

I've tried supporting 1x2 and 2x2 cabinets too: https://github.com/mt-mods/wrench/tree/drawerLabel2

The tooltip is kinda useable but the short description cuts off multiple lines, so the hotbar text isn't satisfactory.

@OgelGames

Copy link
Copy Markdown
Contributor

I've tried supporting 1x2 and 2x2 cabinets too: https://github.com/mt-mods/wrench/tree/drawerLabel2

The tooltip is kinda useable but the short description cuts off multiple lines, so the hotbar text isn't satisfactory.

I don't like the formatting of that, it looks messy:

image

I tried my idea (tree/drawers_info), which looks like this:

image

I think the size is okay, it's bigger than most tooltips but still only slightly taller than an inventory slot, and much easier to read.

@OgelGames
OgelGames removed their request for review June 4, 2026 06:56
@SwissalpS

Copy link
Copy Markdown
Contributor Author

Sure, one line per item is neater but short description will still be "Wooden Drawers ...." and no actual info. Which pretty much defeats the purpouse of this idea.

@OgelGames

Copy link
Copy Markdown
Contributor

Why does the short description matter?

@SwissalpS

SwissalpS commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Because that is the info shown on hotbar when changing item. Imagine having 8 wrenched drawers on hotbar and you want to place them in a specific order but all it says is "Wooden drawer with items" i.e. same as what it says now.
Players would still have to short-term memorize which is which.

Edit: at this stage, the player is not interested in the "wooden drawer" part, they know that by now, they have filled and wrenched it. What they need is info on the content type.

@SwissalpS

Copy link
Copy Markdown
Contributor Author

Can we get the single drawer merged and discuss the format for multi-drawer cabinets in another PR?

@OgelGames

OgelGames commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

What if we made it possible to set the short description too? It wouldn't be too hard to do, and then it could be different.

For multi item drawers the short description could just specify the first item and combine the others, something like "Drawer with 99 Cobblestone + 2.5k other items".

Can we get the single drawer merged and discuss the format for multi-drawer cabinets in another PR?

I'd rather get it all done in one PR.

@OgelGames

OgelGames commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Turns out the short_description isn't used by the hotbar, and I can't find even the code that displays that text in the engine 🤦

@SwissalpS

Copy link
Copy Markdown
Contributor Author

https://github.com/minetest-mods/unified_inventory/blob/0db7e7ba4cbee9bcbea9e1136da07fbcadb55fb8/item_names.lua#L62 and following

(I really think we should merge this as title says: just single drawers and figure this part out in the longer term)

@OgelGames

Copy link
Copy Markdown
Contributor

Oh it's not even in the engine... That makes it easier to change though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants