init.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. dofile(minetest.get_modpath("lottinventory") .. "/functions.lua")
  2. dofile(minetest.get_modpath("lottinventory") .. "/potions.lua")
  3. dofile(minetest.get_modpath("lottinventory") .. "/brewing.lua")
  4. dofile(minetest.get_modpath("lottinventory") .. "/guides.lua")
  5. --Inventory Plus
  6. inventory_plus = {}
  7. inventory_plus.set_inventory_formspec = function(player, formspec)
  8. minetest.show_formspec(player:get_player_name(), "custom", formspec)
  9. end
  10. minetest.register_on_player_receive_fields(function(player,formname,fields)
  11. if fields.main then
  12. local name = player:get_player_name()
  13. local formspec_armor = armor:get_armor_formspec(name)
  14. if formspec_armor ~= nil then
  15. minetest.show_formspec(player:get_player_name(), "armor", formspec_armor)
  16. end
  17. end
  18. end)
  19. --Bags
  20. minetest.register_tool("lottinventory:small", {
  21. description = "Small Bag",
  22. inventory_image = "bags_small.png",
  23. groups = {bagslots=8},
  24. })
  25. minetest.register_tool("lottinventory:medium", {
  26. description = "Medium Bag",
  27. inventory_image = "bags_medium.png",
  28. groups = {bagslots=16},
  29. })
  30. minetest.register_tool("lottinventory:large", {
  31. description = "Large Bag",
  32. inventory_image = "bags_large.png",
  33. groups = {bagslots=24, forbidden=1},
  34. })
  35. minetest.register_craft({
  36. output = 'lottinventory:small',
  37. recipe = {
  38. {'', 'group:stick', ''},
  39. {'group:wood', 'group:wood', 'group:wood'},
  40. {'group:wood', 'group:wood', 'group:wood'},
  41. }
  42. })
  43. minetest.register_craft({
  44. output = 'lottinventory:medium',
  45. recipe = {
  46. {'', 'group:stick', ''},
  47. {'group:wood', 'lottinventory:small', 'group:wood'},
  48. {'group:wood', 'group:wood', 'group:wood'},
  49. }
  50. })
  51. minetest.register_craft({
  52. output = 'lottinventory:large',
  53. recipe = {
  54. {'', 'default:steel_ingot', ''},
  55. {'group:wood', 'lottinventory:medium', 'group:wood'},
  56. {'group:wood', 'group:wood', 'group:wood'},
  57. }
  58. })
  59. minetest.register_craft({
  60. output = 'lottinventory:crafts_book',
  61. recipe = {
  62. {'group:stick', 'group:stick', 'group:stick'},
  63. {'group:stick', 'default:book', 'group:stick'},
  64. {'group:stick', 'group:stick', 'group:stick'},
  65. }
  66. })
  67. minetest.register_craft({
  68. output = 'lottinventory:cooking_book',
  69. recipe = {
  70. {'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
  71. {'default:coal_lump', 'default:book', 'default:coal_lump'},
  72. {'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
  73. }
  74. })
  75. minetest.register_craft({
  76. output = 'lottinventory:protection_book',
  77. recipe = {
  78. {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  79. {'default:steel_ingot', 'lottinventory:crafts_book', 'default:steel_ingot'},
  80. {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  81. }
  82. })
  83. minetest.register_craft({
  84. output = 'lottinventory:brewing_book',
  85. recipe = {
  86. {'lottpotion:brewer', 'lottinventory:cooking_book'},
  87. }
  88. })
  89. minetest.register_craft({
  90. output = 'lottinventory:potions_book',
  91. recipe = {
  92. {'lottpotion:potion_brewer', 'lottinventory:cooking_book'},
  93. }
  94. })
  95. minetest.register_craft({
  96. output = 'lottinventory:forbidden_crafts_book',
  97. recipe = {
  98. {'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
  99. {'default:gold_ingot', 'lottinventory:protection_book', 'default:gold_ingot'},
  100. {'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
  101. }
  102. })
  103. minetest.register_craft({
  104. output = 'lottinventory:master_book',
  105. recipe = {
  106. {'lottinventory:cooking_book', 'lottinventory:potions_book', 'lottores:tilkal_ingot'},
  107. {'lottinventory:protection_book', 'lottinventory:forbidden_crafts_book', 'lottores:mithril_ingot'},
  108. {'lottinventory:crafts_book', 'lottinventory:brewing_book', 'lottores:tilkal_ingot'},
  109. }
  110. })