[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4866: Undefined array key "database_gc"
FOSS gamedev and creative worlds • View topic - Mod Develpoment {HELP NEEDED}
Page 1 of 1

Mod Develpoment {HELP NEEDED}

PostPosted: Tue Mar 13, 2012 19:36
by IPushButton2653
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.

PostPosted: Tue Mar 13, 2012 21:20
by sfan5
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

PostPosted: Tue Mar 13, 2012 21:32
by jn
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.

PostPosted: Tue Mar 13, 2012 22:16
by IPushButton2653
Thanks. I can see what I can do.