Code Help

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

Code Help

by jojoa1997 » Tue Apr 02, 2013 01:56

Can someone make a batch file that searches the entire directory it is in and find all the node names in minetest.register_node, minetest.register_tool, minetest.register_craftitem. Also could you make it make a file and save all the nodes like ("<prefixe>:<node name>") without the ().Thanks in advance. This can also be done in a lua mod maybe?
Last edited by jojoa1997 on Tue Apr 02, 2013 03:12, edited 1 time in total.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Tue Apr 02, 2013 03:06

Might be easier to do from a mod. Iterate through minetest.registered_nodes, etc. and filter on a "modname:" prefix for the mod you are interested in. If you really need to do it by directory instead it would be a relatively complex piece of logic, especially because not every call to minetest.register_node(...) uses a string literal (many mods do it in batches and compute the name of the node).
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Tue Apr 02, 2013 03:12

ok can someone make a mod for that
i have tried and failed with lua to do that
Coding;
1X coding
3X debugging
12X tweaking to be just right
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 7 guests