Mod Develpoment {HELP NEEDED}

User avatar
IPushButton2653
Member
 
Posts: 666
Joined: Wed Nov 16, 2011 22:47

Mod Develpoment {HELP NEEDED}

by IPushButton2653 » Tue Mar 13, 2012 19:36

I have a few different questions about modding.
  • First, is it possible to allow a node to drop a specific item when dug with a certain tool? And if so, how?
  • Second, would it be possible to make that item drop where you dug the node instead of it going directly to your inventory?

Thanks in advance for any help. This is all going to my development of the obsidian mod.
Last edited by IPushButton2653 on Tue Mar 13, 2012 19:36, edited 1 time in total.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Tue Mar 13, 2012 21:20

IPushButton2653 wrote:I have a few different questions about modding.
  • First, is it possible to allow a node to drop a specific item when dug with a certain tool? And if so, how?
  • Second, would it be possible to make that item drop where you dug the node instead of it going directly to your inventory?

Thanks in advance for any help. This is all going to my development of the obsidian mod.

- Very Hard to make, but it could be done
- minetest.env:add_item
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

jn
Member
 
Posts: 106
Joined: Tue Jan 03, 2012 19:15

by jn » Tue Mar 13, 2012 21:32

IPushButton2653 wrote:I have a few different questions about modding.
  • First, is it possible to allow a node to drop a specific item when dug with a certain tool? And if so, how?

You can overwrite the node's "on_dig" callback; See builtin.lua for what to do in it.
Last edited by jn on Tue Mar 13, 2012 21:33, edited 1 time in total.
 

User avatar
IPushButton2653
Member
 
Posts: 666
Joined: Wed Nov 16, 2011 22:47

by IPushButton2653 » Tue Mar 13, 2012 22:16

Thanks. I can see what I can do.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 9 guests

cron