Provide a 'Protection Mese Lamp' node "protector:meselamp" by change of code to a reusable function for registration of different looking protector nodes. Two new PNGs included.
I took the liberty to add a '.luacheckrc' file for the Luacheck code checker.
Hope this is fun.
Please note the 'diff' of the init.lua file may be looking weird but the change in the code is rather simple and straight forward.
73484364ac is a code tidy after the luacheck and adds tool.lua to the list of resp. files as appropriate.
This should complete this PullRequest sufficiently.
While it could have been a nice addition, adding more protectors to the mix will slow down the constant checks during every dig/place/interact for each player, which is why I added a Protector Logo that could easily be placed on the face of any block in the game to give the same look.
Okay this is a very reasonable answer. Aha, so I got your question in the forum wrong.
However, the lamp is a shiny object, IMHO it would be preferable to have a ray logo attached (see my answer in the froum).
Could you consider this again please?
I would presume the slow down effect would be comparable between a second node and a second log or am I wrong?
Taking your argument of slow down effect seriously I would propose to delete the block and continue with just the logo only. Then a two logo approach would be the most reasonable and more flexible solution.
Naturally, this is your code and I would accept any consideration or could fork if not. This MT programming is a nice little hobby and brings me fun even when I may fail in some of my poor efforts.
I should not hassle you but I want to learn and improve. However, I would kindly ask to reconsider and how to find a shared solution hopefully.
Another option would be to use a custom texture pack which has a different protector_logo.png that uses the ray texture you made, then it would look as you want it to without adding any new nodes into the mix :)
I will however tinker with the code and see if a global function for adding new protection nodes is possible without slowing things down too much.