Skip to content

Instantly share code, notes, and snippets.

@Andrey2470T
Created August 29, 2018 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Andrey2470T/bfbd82287fa0adb9e8e5480dfa46a2cc to your computer and use it in GitHub Desktop.
Save Andrey2470T/bfbd82287fa0adb9e8e5480dfa46a2cc to your computer and use it in GitHub Desktop.
allow_metadata_inventory_put = function (pos, listname, index, stack, player)
if string.match(stack:get_name(), "syringe") and string.match(stack:get_name(), "medicine:") then
minetest.debug(stack)
minetest.chat_send_player("The item has been put!")
return -1, stack:get_count()
else
return stack:get_count()
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment