This commit is contained in:
tacigar 2016-06-02 13:25:05 +09:00
parent cc60e9ae17
commit c03a8ded8b

View File

@ -149,8 +149,12 @@ function maidroid.register_maidroid(product_name, def)
inventory_image = def.inventory_image, inventory_image = def.inventory_image,
stack_max = 1, stack_max = 1,
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
minetest.add_entity(pointed_thing.above, product_name) print(pointed_thing.under, pointed_thing.above)
return itemstack if pointed_thing.above ~= nil then
minetest.add_entity(pointed_thing.above, product_name)
return itemstack
end
return nil
end end
}) })
end end