init.lua 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --[[
  2. Ingots - allows the placemant of ingots in the world
  3. Copyright (C) 2018 Skamiz Kazzarch
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  15. ]]--
  16. ingots = {}
  17. local conf = dofile(minetest.get_modpath("ingots").."/conf.lua")
  18. dofile(minetest.get_modpath("ingots").."/api.lua")
  19. --Here you can make individual choices per ingot on which varian will be used.
  20. --To disable the ability of an ingot to be placed just comment out it's registration line.
  21. if minetest.get_modpath("default") then
  22. ingots.register_ingots("default:copper_ingot", "ingot_copper.png", conf.is_big)
  23. ingots.register_ingots("default:tin_ingot", "ingot_tin.png", conf.is_big)
  24. ingots.register_ingots("default:bronze_ingot", "ingot_bronze.png", conf.is_big)
  25. ingots.register_ingots("default:steel_ingot", "ingot_steel.png", conf.is_big)
  26. ingots.register_ingots("default:gold_ingot", "ingot_gold.png", conf.is_big)
  27. end
  28. if minetest.get_modpath("moreores") then
  29. ingots.register_ingots("moreores:silver_ingot", "ingot_silver.png", conf.is_big)
  30. ingots.register_ingots("moreores:mithril_ingot", "ingot_mithril.png", conf.is_big)
  31. if not minetest.registered_items["default:tin_ingot"] then
  32. ingots.register_ingots("moreores:tin_ingot", "ingot_tin.png", conf.is_big)
  33. end
  34. end
  35. if minetest.get_modpath("technic") then
  36. ingots.register_ingots("technic:stainless_steel_ingot", "ingot_stainless_steel.png", conf.is_big)
  37. ingots.register_ingots("technic:carbon_steel_ingot", "ingot_carbon_steel.png", conf.is_big)
  38. ingots.register_ingots("technic:mixed_metal_ingot", "ingot_mixed_metal.png", conf.is_big)
  39. ingots.register_ingots("technic:brass_ingot", "ingot_brass.png", conf.is_big)
  40. ingots.register_ingots("technic:lead_ingot", "ingot_lead.png", conf.is_big)
  41. ingots.register_ingots("technic:zinc_ingot", "ingot_zinc.png", conf.is_big)
  42. ingots.register_ingots("technic:chromium_ingot", "ingot_chromium.png", conf.is_big)
  43. ingots.register_ingots("technic:cast_iron_ingot", "ingot_cast_iron.png", conf.is_big)
  44. end
  45. if minetest.get_modpath("rainbow_ore") then
  46. ingots.register_ingots("rainbow_ore:rainbow_ore_ingot", "ingot_rainbow_ore.png", conf.is_big)
  47. end