pointers on modifying the pickaxe

caseyir
New member
 
Posts: 2
Joined: Tue Mar 26, 2013 05:24

pointers on modifying the pickaxe

by caseyir » Tue Mar 26, 2013 05:40

Hello all, I would appreciate any pointers on how to modify the pickaxe (any one) to be able to dig a 2x2 or 3x3 hold instead of 1x1. Might this be possible? Thanks!
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Tue Mar 26, 2013 07:45

Technic's MK3 Mining Drill has this effect.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

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

by prestidigitator » Tue Mar 26, 2013 07:58

You can use the on_use(...) callback (it's the same for tools as for nodes, but tools haven't really been documented on the wiki yet) to do custom things when you use the tool. Unfortunately this is going to be completely custom and a bit hacky, as currently the dig/damage system is implemented completely in C++, not Lua. So you'd need to either have the tool instantly dig nodes, or count the number of actual left-clicks (uses) someone has used on the same node, or something like that.

Your other option is to register a global callback for when a player digs a node (minetest.register_on_dignode) and test whether the tool the player is currently wielding is the one you are interested in "modifying". Then you could affect the nodes around the one that was just dug.
Last edited by prestidigitator on Tue Mar 26, 2013 07:59, edited 1 time in total.
 

caseyir
New member
 
Posts: 2
Joined: Tue Mar 26, 2013 05:24

by caseyir » Sun Apr 14, 2013 23:31

Thank you guys for the information!!!!!!
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 14 guests

cron