Closed SwissalpS closed 3 years ago
Good point. It should be possible to ask the craftdb for all items that are members of a given group.
Should that just be a special case handling of item = 'group:foo'
in the existing find API, or a new API.. Thoughts?
other mods do something like this:
local stack = ItemStack(msg)
I think a look at injector helps get a feel for naming scheme to use. It helps when same fields are used to mean same things accross mods.
Following the example of the readme, I looked up stone pickaxe. For this I need group:stone and default:stick.
Sticks I can set in autocrafter but group:stone not, so I looked up 'group:stone' and got nothing in return.
Is the intended use to now ask mithril chest how many 'group:stone' it has in inventory? That is the work-around I can see right now.
If autocrafters could deal with groups, then this lookup method would also be less interesting to implement.
Just a thought :)