Storage Drawers: Biomes O' Plenty Pack

Storage Drawers: Biomes O' Plenty Pack

6M Downloads

[Enhancement] locked drawers always keep a minimum of one item in stock

WebDragon opened this issue ยท 6 comments

commented

I would like to have the option to maintain a minimum number of items (at the very least, one) in a drawer, such that neither automation, nor casual use, can use up the last remaining item in a drawer.

This is partially due to the fact that if you remove the last item from a locked drawer and later want to unlock it, clear it, and put something else in it, you first have to break the drawer to clear it, even though it's empty, as there is no 'one last item' to remove that would clear the drawer face on the now-unlocked drawer.

the other reason is for things like botania petals where if you had at least one left, you could quickly plant and bonemeal and shear the tall flowers to get more petals, but if the last one gets used without you noticing, you'll need a jaded amaranthus or floral fertilizer to hope to generate more (or go flower-hunting again).

I wouldn't mind if this were a config-tweakable option.

commented

You can unlock locked drawers by right clicking on them with the drawer key. No need to break them.

commented

lock an empty drawer. put items in it. pull all the items out that it will allow, leaving the item picture on the face (because it's locked). unlock the drawer. try and remove the last item to clear the drawer. no can do, drawer is actually empty despite displaying a picture on the face.

either retain one item for the picture, or conversely, unlocking an empty drawer will automatically clear its designation

commented

What's the use case here? Why aren't you unlocking the drawer before attempting to clear it?

There certainly could be a config option to clear empty drawers when they become unlocked, but it would need to be off by default as it would definitely alter expected behavior when mass unlocking/locking with a drawer controller. The behavior would also be hard to control with multi-slot drawers.

commented

The behavior that was in previous (1.7.10) versions of SD but is missing now is this: Take all of the items out of a locked drawer, then unlock it, then punch the drawer as if withdrawing another item. In previous versions, punching the drawer would remove the zero-count item from the drawer and allow other items to be inserted. In current versions, punching the drawer has no effect - it remains an unlocked drawer containing zero of an item.

commented

one "use case" I can easily think of, is for example, during rearranging your drawer setup, and moving items between drawers (maybe from the original 1x1 to part of a 2x2 or whatever), forgetting to unlock the drawer before emptying it, and wanting to clear it after unlocking it without having to break the drawer and replace it.

commented

i have never really thought about it in all the rearrangements that i have done in passed with drawers. yes i remember the punch an empty unlocked drawer and it clears the label but not a big deal if i need to add an item to clear label or just break the drawer. thats my 2cents.