Using register_on_punchnode with pointed_thing

User avatar
qwrwed
Member
 
Posts: 323
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

Using register_on_punchnode with pointed_thing

by qwrwed » Tue Jan 21, 2014 19:24

I am trying to make a tool that will place a node when you use it on a certain node (similar to how buckets used to be), but I would like to be able to dig with it on all other nodes. Looking at the buckets code, I see that was achieved by using pointed_node.above, but it was on_use and on-rightclick - is there any equivalent for register_on_punchnode?
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Tue Jan 21, 2014 20:07

As far as I know and as far as I understand your problem, it is currently not possible to do that. But you can use on_place for right click, so you could still dig with left.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Tue Jan 21, 2014 20:29

Why can't you use on_use and check what pointed_thing is? You might have to give more detail.
"Fuck the hat." - Paulie Gualtieri
 

User avatar
qwrwed
Member
 
Posts: 323
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Tue Jan 21, 2014 21:27

Basically, I need to make a tool. This is just an example, but when you punch default:stone with it, it places default:sand in front of it. However, you can still dig things that aren't default:stone, but on_use doesn't allow this.
 


Return to WIP Mods

Who is online

Users browsing this forum: Google [Bot] and 9 guests