Compare commits

...

1 Commits

Author SHA1 Message Date
loosewheel
c43dab66d7 Add files via upload 2021-12-06 21:15:05 +10:00
4 changed files with 14 additions and 2 deletions

View File

@@ -78,3 +78,7 @@ v0.1.12
v0.1.13
* 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 ()

View File

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

View File

@@ -135,6 +135,14 @@ end
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)
end