[solved] Where are default commands registered?

Posted:
Mon Jun 20, 2016 20:11
by octacian
I would like to view the code for /clearobjects so that I can create another command doing the same thing within only a smaller radius. Then I could create a block available by normal player to run such a function without doing large damage as could be possible without changing the area in which it was run.
Re: Where are default commands registered?

Posted:
Mon Jun 20, 2016 20:15
by BrandonReese
Default commands are in builtin/games/chatcommands.lua but the actual clear object functionality is in the engine. environment.cpp line 1140.
https://github.com/minetest/minetest/bl ... .cpp#L1140
Re: Where are default commands registered?

Posted:
Mon Jun 20, 2016 20:36
by octacian
Wow, can't believe I didn't notice that they were in chatcommands. >_< Thanks anyway!
Now I can make any changes needed to enable radius clearing, then use the function within the /clearobjects register...