-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Digibuilder improvements #331
Comments
Huhhila |
I feel like that functionality would be better suited in a separate "inventory scanner" node... |
slightly related BuckarooBanzay/digibuilder#14 |
MCLV |
birdlover32767 et |
You could just use more digibuilders :) |
MCLV
it would be so nice if the digibuilder could get information on the inventory of a scanned item
BuckarooBanzai
Interesting, so you want to read chest-contents from afar, right?
Something like this?
Not sure about the performance though 🤔
SX
I guess performance would be somewhat similar to digiline chests, not good but still usable for some tasks.
Would it be better to create another mod for that, some digiline metadata reader mod?
Reasoning: There's a lot of things to consider when making decision if it is okay to return contents and if successful then it is possible that there will be a lot of custom handling for certain things.
For example locked wooden chests wont normally reveal contents to other players and been utilized to keep some things hidden.
(might even be such mod out there already)
MCLV
Anything that would allow players to mechanically read metadata whilst respecting privacy would be a good thing to have, rather yesterday than today in my opinion. Using a CSM, I've already been able to do it, but if I could build machines to do it that would open up a lot of possibilities and improve efficiency of a lot of new machine builds
SX
CSM still cannot read private metadata unless you wire it to server side mod.
MCLV
uhuh. normally indeed you can't. pretty safe imo
SX
Because metadata marked as private never leaves server without it being explicitly sent out-
MCLV
oh, really
SX
But thing is that most mods do not mark their metadata as private.
There however has been suggestion for engine to make private mode default, but that would probably cause many other issues (which would anyway be fixable in mod code).
I think lua controller memory is private.
MCLV
yes, that could very well explain why I can't see that
SX
https://github.com/minetest-mods/mesecons/blob/master/mesecons_luacontroller/init.lua#L611
But like said most mods do not use that and many modders do not even know it exists...
MCLV
Would it be an idea to create some new node that works like the node detector, but reads meta data ?
doesn't sound too hard to do. but I'm not really a modder just yet
SX
I think probably that would be best but also more work... after all it is very simple to read metadata and send it out. A lot harder to handle all special cases... Well, you could just take some simple digiline component like some memory chip from digistuff mod and dump fairly simple metadata reader there.
Then maybe change some textures...
Basics for inventory: meta = core.get_meta({x=0,y=0,z=0}); inv = meta:get_inventory(); lists = inv:get_lists(); lists["main"][0] == ItemStack("mod:item") (there can be multiple inventory lists, to get all loop is needed but often same name for containers)
Basics for other metadata meta = core.get_meta({x=0,y=0,z=0}); meta:get_string("owner") == "MCLV"; meta:to_table() == { ... eveything including private stuff ... }
And complete API: https://raw.githubusercontent.com/minetest/minetest/5.7.0/doc/lua_api.txt
The text was updated successfully, but these errors were encountered: