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
local item = minetest.registered_items[some_variable]
Assuming that some_variable is a legit itemstring, then item will contain a legit item definition table.
Question: How do I find out if certain callback functions, such as on_use or on_place are left at the default functions?
I need it to figure out whether a craftitem or tool has the default on_place or on_use behaviour as opposed to a custom behaviour where the modder added a custom function into the definition table?
Sadly, those values seem to be always set to a function value. They don't seem to be nil, ever. This makes it very hard to check, I suppose. :-/
I also tried comparing the function pointers, but this doesn't help either. I don't know to which function I should compare. :-(
I hope you understand my problem and you can help me. :-)