forked from Mineclonia/Mineclonia
Dropping drops entire item stack again
This commit is contained in:
parent
29b418f719
commit
635b60c17f
|
@ -9,6 +9,8 @@ item_drop_settings.collect_by_default = true --make item entities automatical
|
||||||
--versus setting it in the item drop code, setting true might interfere with
|
--versus setting it in the item drop code, setting true might interfere with
|
||||||
--mods that use item entities (like pipeworks)
|
--mods that use item entities (like pipeworks)
|
||||||
item_drop_settings.random_item_velocity = true --this sets random item velocity if velocity is 0
|
item_drop_settings.random_item_velocity = true --this sets random item velocity if velocity is 0
|
||||||
|
item_drop_settings.drop_single_item = false --if true, the drop control drops 1 item instead of the entire stack, and sneak+drop drops the stack
|
||||||
|
-- drop_single_item is disabled by default because it is annoying to throw away items from the intentory screen
|
||||||
|
|
||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
|
@ -145,7 +147,8 @@ function minetest.handle_node_drops(pos, drops, digger)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--throw single items by default
|
if item_drop_settings.drop_single_item then
|
||||||
|
-- Drop single items by default
|
||||||
function minetest.item_drop(itemstack, dropper, pos)
|
function minetest.item_drop(itemstack, dropper, pos)
|
||||||
if dropper and dropper:is_player() then
|
if dropper and dropper:is_player() then
|
||||||
local v = dropper:get_look_dir()
|
local v = dropper:get_look_dir()
|
||||||
|
@ -166,6 +169,7 @@ function minetest.item_drop(itemstack, dropper, pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--modify builtin:item
|
--modify builtin:item
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue