1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-23 15:20:19 +01:00

Creative: Automatic item colorization for creative mode

This commit is contained in:
Dániel Juhász 2017-04-22 14:34:51 +02:00 committed by paramat
parent 2668619638
commit 24559d012e

View File

@ -55,8 +55,7 @@ function minetest.handle_node_drops(pos, drops, digger)
local inv = digger:get_inventory() local inv = digger:get_inventory()
if inv then if inv then
for _, item in ipairs(drops) do for _, item in ipairs(drops) do
item = ItemStack(item):get_name() if not inv:contains_item("main", item, true) then
if not inv:contains_item("main", item) then
inv:add_item("main", item) inv:add_item("main", item)
end end
end end