Skip to content
Snippets Groups Projects
Forked from Illuna-Minetest / minetest_game
Source project has a limited visibility.
  • Auke Kok's avatar
    12d5ca2f
    Allow the on_blast API to pass an itemstack. · 12d5ca2f
    Auke Kok authored
    If the node is special and has an on_blast() handler, we need
    to call it instead of getting node drops manually. However, we
    do want to know if drops should be added for the special nodes,
    so we modify the on_blast() handler code to allow the nodedef
    handlers to pass back itemstacks. This could be used by e.g.
    the doors mod to drop door items after a blast.
    
    Since this API is documented in lua_api.txt, a separate PR will
    be incoming to update the on_blast() documentation.
    12d5ca2f
    History
    Allow the on_blast API to pass an itemstack.
    Auke Kok authored
    If the node is special and has an on_blast() handler, we need
    to call it instead of getting node drops manually. However, we
    do want to know if drops should be added for the special nodes,
    so we modify the on_blast() handler code to allow the nodedef
    handlers to pass back itemstacks. This could be used by e.g.
    the doors mod to drop door items after a blast.
    
    Since this API is documented in lua_api.txt, a separate PR will
    be incoming to update the on_blast() documentation.