Functional Storage

Functional Storage

25M Downloads

[FEATURE REQUEST] Trading drawer

bbarry opened this issue ยท 0 comments

commented

It would be awesome if there was a drawer such that if you inserted an item into it, some other item from the drawer network could be made available in the drawer to extract. To accomplish this I was thinking something like:

  1. create a drawer network with a controller, a 2x1 locked drawer with diamonds and blaze rods, an empty unlocked drawer and a trading drawer
  2. holding an emerald in your off hand click on the diamond entry with the linking tool and then the trading drawer
  3. holding a diamond in your off hand click on the blaze rod entry with the linking tool and then the trading drawer

With this drawer network configured:

  • If you put an emerald in the empty trading drawer, the emerald is put in the empty unlocked drawer and a diamond is moved to the trading drawer where it can be extracted.
  • If you put a diamond in the empty trading drawer, the diamond is put in the diamond drawer and a blaze rod is moved to the trading drawer where it can be extracted.
  • If the input item cannot be put in the drawer network then the trading drawer should not accept the input. For example if the unlocked drawer had a gold ingot in it, you could no longer insert an emerald into the trading drawer (you could insert a diamond still for a blaze rod); similarly if the diamond storage was full and there were no empty unlocked storages then you could not insert a diamond to get a blaze rod.
  • If the input item does not have an available trade then the trading drawer should not accept the input.
  • If the trading drawer is not empty, you can only put the item that makes that trade into it to increase the number of trade outputs available in the drawer for extraction (eg if it has a diamond in it in this case you could put another emerald in but nothing else can be put in the drawer).
  • If the trading drawer is full, you cannot insert the input item anymore.

The trading drawer should otherwise work the same as a 1x1 drawer (upgrades, automations, etc).