Open Klaranth opened 3 years ago
Cherry picks from long description above:
Telling a drawer what item it should prefer for storage could be done as a mimic slot à la filter injectors; this could be set via the digiline as well (filter injector, autocrafter). You could set a drawer's preferred item so the drawer controller can do the work and have some kind of data to use. Instead of buggery around punching this drawer or that drawer, you set the preferred item, and get on with it for pipeworks and/or digiline to pull items out and put them back in. That scales much better than having to punch drawers manually?
Telling a drawer what item it should prefer for storage
Yes but I don't think it can be easily done by adding drawer upgrades, instead actual logic should be done with drawer controller as functionality is useless without drawer controller (if running tubes directly to drawers and not using controller then you can simply use sorting tubes). Could maybe open another issue about possible drawer controller updates.
edit. Actually it could be done by making upgrade item that updates formspec to include relevant stuff, drawer controller still needs to be aware of that to prevent it from adding items to drawer that is connected to controller but does not have this upgrade.
Including issue #116 in here.
TL:DR : ThinkSome & sunkenhero Drawer's should behave like chests on_dig and not drop all items.
SX This is intended and unique feature specifically built into drawers. Drawers should not be simply extremely large chests with limited slots, this is one important thing that makes drawers different, Add upgrade item that prevents digging drawers with items inside?
Discussion from ideas channel
UncleSam Mese drawer upgrade Technic node replacer working as simple node replacer with dark glass, mode I am using- field
OgelGames not really a bug, more just a strange design choice
SX mese upgrade could be used for something proposed here: https://github.com/pandorabox-io/in-game/issues/111 one fairly simple additional upgrade would be public drawer, mese upgrade could be good for that
ThinkSome Locked, protected and public drawer. I guess protected could be default. It'd turn into locked if you place padlock in one of the upgrade slots or into public if you place... [your idea here] but probably the padlock should be a special craftitem, since otherwise it'd be unintuitive.
SX Padlock is special craftitem. Was it basic_materials? I think that's where it comes from.
ThinkSome It should be visible when searching for 'drawer' or 'upgrade', thus either it's another craftitem or padlock is put into group:drawer_upgrades or some such.
SX yeah that... possibly could still be done with current padlock, optional dependency + edit description a bit to add something like (works as drawer upgrade)
ThinkSome Ok, I guess that's the third option
SX Optional dependency would be good anyway if using padlock, so already few ways to do it nicely :) (is it basic_materials?)
AceRichman yes
ThinkSome Maybe in that case it's better to just have another drawer upgrade craftable in the style of drawer upgrades ThinkSome where the ingots are substituted for padlocks ThinkSome or padlocks are substituted for ingots, I never know which way to say this is correct
AceRichman problem is I'm not sure of an easy way to add that functionality to drawers
ThinkSome So that when padlock is not installed, it can be made crafteable from idk... iron ingots. Why would't it be easy?
AceRichman Well because the current upgrade system is only designed for space upgrades.
ThinkSome Nothing a bit of coding couldn't fix
ThinkSome Hmm, would it be nice to have 2x3 items drawers? Maybe even 3x3? The 1x2 one feels kinda useless to me. If the stuff is plentiful enough, it goes into 1x1 drawer. Else a 2x2 suffices
Prevent full drawers to be able to dig them up? same as chests?
ThinkSome I already fixed the drawers dig annoyance, just needs testing and commiting somewhere. Fix extends to removing drawer upgrades such that the new capacity is less than the quantity of items contained.
Suggested committing at https://github.com/pandorabox-io/ or, alternatively : https://github.com/minetest/minetest
ThinkSome Make drawer upgrades work with technic machines. Each upgrade increases number of i/o slots proportionally to how good the upgrade is so steel upgrade +1 input, +1 output slot. Mithril +12 input, +12 output slots, instead of fiddling with injectors/chests one could therefore just upgrade input size and be done with it. Saves two extra nodes.
SX Injectors and chests would still be needed for automation unless going with tubes and clu upgrade but then extra input / output slots would not be that useful
ThinkSome Yes, this is just for things like public/random workshops
Hedgehog So, basically two different drawer sets?
Shadow No, making use of the drawer upgrade items as a power-up for other machines.
one thing could be to make drawer contents public while keeping drawer itself still protected..
Just noticed issue on drawers mod: https://github.com/minetest-mods/drawers/issues/66 So at least someone else thought about it, but have to add that I would still like item upgrade solution better than simple checkbox approach.
ah yeah a chest upgrade slot?
Having an unlocked chest as an upgrade to make it public would match Technic and would be a superb addition.
Also, a feature that would be nice: digiline_send("channel", "get") that would retrieve the node name and quantity of each item in the drawers into a lua table.
baijin ; SX Drawer upgrade items should stack, and shift click should work when placing drawer upgrades into drawers Drawer upgrades able to be placed in drawers
There was some discussion about stacking drawer upgrades and I think final decision was better to not allow stacking, I think there was also suggestion to allow stacks with just few items.
Actually I think question about stacking was not decided because it is one of those edge cases, it was to not add fully automatic upgrade distribution. Stacking question was just simply left undecided and untouched.
Kermit I would like to propose my idea: Make drawer controller digiline interface like in the mithril chest where content can be listed an counted. I don't know if it is doabe. So please give your opinion. Hedgehog In a way a drawer is counting already, just hover your mouse over a drawer. So the info is there. Would be interesting if you can hook up a monitor to the controller and let it give you a list of what is in the drawers. 1hittoaster I've read the source code to the drawers mod. It should not be too difficult to add the ability to query the drawers. However, it is possible to construct a drawer setup that is HUGE, and the response lua table from the drawer controller back to your luac would be huge. You might not be able to process it. Imagine a drawer config w/ 200 drawers, 90% are full. So 180 items and counts. A typical item string is 20 bytes, add in the counts and syntactic sugar, lets round to 30 bytes per item. ok, that 5k bytes, not a lot fo bytes, but processing 180 items in lua in a luac won't happen in 1 server tick.
Sending a large lua table over digiline is NOT efficient, btw. That was a concern when I wrote the "digiline_craftdb" mod.
Hedgehog Too bad you can't order the controller to direct certain items towards specific sections. Now I have ore and wood in the dye section, ore in the HV section, LV in the MV and so on ...
1hittoaster You can send that a query that will return LOTS of data. I have 7 or 8 different drawer controllers, with dedicated TP tubes and dedicated, non-connected, drawers, so that I can keep it all separate. it is a PITA.
I wish that one could "label" a drawer so that it will only ever take ONE thing and have a tool that lets you swap drawers by clicking on those two drawers. ohh: that's an #idea. Craftable "drawer tool" that swaps the contents of any two drawers that you click on (even if they are on different drawer controllers).
SX I should add drawer upgrade support for container tool, it however still allows only installing upgrades (but currently not for drawers). Install only was mostly because I could not decide which one of possible behaviors would be best so I did not add any yet: https://github.com/S-S-X/metatool/pull/117 That would still require clicking but just once and without need to open configuration form and would be all selected upgrades at once.
ThinkSome Can we have more different upgrades for drawers?
SX Capacity is already huge with mithril upgrades. I cannot really think about any other possible upgrades for drawers? Got some ideas?
Thinksome I don't know, I was missing something in the x8 - x13 range
SX You can combine different upgrades too to get something between. What else?
One thing could be to make drawer contents public while keeping drawer itself still protected.
Thinksome Maybe a wifi drawer, too? So it's available at multiple linked drawers
SX That gets probably too complicated because of how drawers work. It cannot be done easily cheap way like wifi chest and would require large changes to drawers code (it's pretty messed up stuff).
Thinksome I don't like that it uses a separate variable for each item in a 4-item drawer and a separate one for each count.
Should be items = { { name=.. count= } , ... } instead I guess.
SX And messed up spaghetti API, but there's a reason for that. I think those were originally implemented by just converting some piece of other code from other game written in other language.
Thinksome Having more drawer textures would also be nice. Also, the 2-item drawer feels kinda useless. Is anyone actually using it?.
SX Why useless? 2 slot one takes 2 times less space for same total item slots and has 2x space compared to 1 slotted.
SwissalpS may have started rewriting some stuff for drawers but not sure if any of that is done or merged to "official" code but might be able to give some more accurate feedback for ideas.
Thinksome Another upgrade would be to have drawer controller support moving all the items to other linked drawer. Punch the original drawer, punch the empty one, and it'd moves everything if it can, else it fails. It doesn't have twice the space, tested that.
SX Well, drawer controller can do moving like that already if you did think a bit about usability before building drawer array.
Thinksome 1-item one has 32 stacks of space, 2-item one has 216 stacks, 4-item one has 48 stacks Total space is the same.
SX Total space is same only for item count but for different items 2 slotted can have 2 different items 4 slotted can have 4.
Thinksome That's true. Hence why I said that I use 4-slotted ones for things where I expect to have low counts of stuff, and 1-slotted ones where I expect a lot/
SX Just 2x2 drawer setup can be 4 items, 16 items or something between which is big difference.
Thinksome Yes, but I'm saying that if you have so many items that you need to 5-mithril upgrade a 4-slotted drawer, then you would be better served to just use a 1-slotted drawer. Perhaps drawers would need some sort of a multi-node cabinet as well, for when even the 1-slotted 5-mithril one isn't enough.
Thinksome Drawers are also awesome for implementing storage & retrival systems without having one filter per chest.