[solved] Where are default commands registered?

User avatar
octacian
Member
 
Posts: 408
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian

[solved] Where are default commands registered?

by octacian » Mon Jun 20, 2016 20:11

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.
Last edited by octacian on Mon Jun 20, 2016 20:36, edited 1 time in total.
God isn't dead!

My Coolest Mods:
MicroExpansion, Working Computers, Interchangeable Hands

Check out my YouTube channel! (octacian)
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: Where are default commands registered?

by BrandonReese » Mon Jun 20, 2016 20:15

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
 

User avatar
octacian
Member
 
Posts: 408
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian

Re: Where are default commands registered?

by octacian » Mon Jun 20, 2016 20:36

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...
God isn't dead!

My Coolest Mods:
MicroExpansion, Working Computers, Interchangeable Hands

Check out my YouTube channel! (octacian)
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 7 guests