init.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. local S
  2. if minetest.get_modpath("intllib") then
  3. S = intllib.Getter(minetest.get_current_modname())
  4. else
  5. S = function(s) return s end
  6. end
  7. minetest.register_craftitem("doc_encyclopedia:encyclopedia", {
  8. description = S("Encyclopedia"),
  9. _doc_items_longdesc = S("Allows you to access the help."),
  10. _doc_items_usagehelp = S("Wield it, then leftclick to access the help."),
  11. _doc_items_hidden = false,
  12. stack_max = 1,
  13. inventory_image = "doc_encyclopedia_encyclopedia.png",
  14. wield_image = "doc_encyclopedia_encyclopedia.png",
  15. wield_scale = { x=1, y=1, z=2.25 },
  16. on_use = function(itemstack, user)
  17. doc.show_doc(user:get_player_name())
  18. end,
  19. groups = { book=1 },
  20. })
  21. minetest.register_craft({
  22. output = "doc_encyclopedia:encyclopedia 2",
  23. recipe = {
  24. {"doc_encyclopedia:encyclopedia", "default:book"},
  25. }
  26. })
  27. minetest.register_craft({
  28. output = "doc_encyclopedia:encyclopedia",
  29. recipe = {
  30. {"epic:float_crystal_shard", "default:book", "epic:bloodstone_shard"},
  31. }
  32. })
  33. minetest.register_craft({
  34. type = "fuel",
  35. recipe = "doc_encyclopedia:encyclopedia",
  36. burntime = 6,
  37. })