dennisjenkins75 / digiline_craftdb

Minetest mod for a digiline queryable database holding all regular and technic crafting recipes.
GNU General Public License v3.0
2 stars 2 forks source link

only send context information if user wants it #7

Closed SwissalpS closed 3 years ago

SwissalpS commented 3 years ago

I was going to suggest only sending msg.context back.

User scripts should be aware of what they asked for. If they are multitasking, then they would add something to the request. msg.context = { breadcrumbs = { smthsmth }, job = 4 }

This is a compromise suggestion for your consideration. maybe there is a better name for the field. It's worth making your mod use less by default than adding overhead to all requests.

dennisjenkins75 commented 3 years ago

Hello SwissalpS. Thank you for the suggestion, but based on the discussion in issue #6, I'm going to completely remove sending back the original request at all, and push the "useful response table" up to the top of the actual response. At that point, this PR would not be needed; in fact it would cause a merge conflict.

SwissalpS commented 3 years ago

was not aware of that discussion. Good. Adding some feature like this doesn't play well with current set of tools. We encourage to do one activity at per cycle, this would go the other direction.