About Scripting with Style
If I create a new game, It could be possible that I want edit some features from the builtin folder (for example item.lua). This isn't a good idea for the finel user who doesn't want edit some files. I research and could it possible edit some tables like minetest.nodedef_default:
With this, we can code some common features in all nodes without edit item.lua. But... Is it a suitable scripting practise?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.nodedef_default.post_effect_color = {a=250, r=0, g=0, b=0}
minetest.nodedef_default.on_dig = default.node_dig(0)
With this, we can code some common features in all nodes without edit item.lua. But... Is it a suitable scripting practise?