Add files via upload

This commit is contained in:
loosewheel
2021-12-06 21:15:05 +10:00
committed by GitHub
parent ca31c40d8b
commit c43dab66d7
4 changed files with 14 additions and 2 deletions

View File

@@ -78,3 +78,7 @@ v0.1.12
v0.1.13 v0.1.13
* Removed optional dependency lwdrops. * Removed optional dependency lwdrops.
v0.1.14
* Calls on_drop when item is dropped.

View File

@@ -1,4 +1,4 @@
local version = "0.1.13" local version = "0.1.14"
local mod_storage = minetest.get_mod_storage () local mod_storage = minetest.get_mod_storage ()

View File

@@ -13,7 +13,7 @@ CC BY-SA 3.0
Version Version
======= =======
0.1.13 0.1.14
Minetest Version Minetest Version

View File

@@ -135,6 +135,14 @@ end
function utils.item_drop (itemstack, dropper, pos) function utils.item_drop (itemstack, dropper, pos)
if itemstack then
local def = utils.find_item_def (itemstack:get_name ())
if def and def.on_drop then
return def.on_drop (itemstack, dropper, pos)
end
end
return minetest.item_drop (itemstack, dropper, pos) return minetest.item_drop (itemstack, dropper, pos)
end end