minetest-mods / inspector

A minetest node inspector tool that shows various properties of nodes.
GNU Lesser General Public License v2.1
9 stars 8 forks source link

Item inspector #13

Closed FaceDeer closed 4 years ago

FaceDeer commented 4 years ago

I use this all the time while developing my own mods and it's awesome. But I've been doing a lot of work with craft items and tools that have metadata lately, and this didn't handle those. So I added a formspec for inspecting items in my inventory. Use "/inspect_item" to bring it up.

While I was in here I also made a few other changes that I hope are all reasonable "cleanup" style tweaks, if any of them are unwelcome let me know and I'll retract this pull request and offer one without them. To wit:

FaceDeer commented 4 years ago

I just added a quick bugfix to this pull, inspector was crashing when you tried inspecting an undefined node.

SmallJoker commented 4 years ago

Will merge after the comments are handled and the PR re-tested.

FaceDeer commented 4 years ago

There were a bunch of other similarly squashed ifs and fors, I expanded those too. I left this group alone, though, it seemed more elegant in its current form.