init.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --print(dump2(xpfw.mod_store))
  2. minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- start loading from "..minetest.get_modpath(minetest.get_current_modname()))
  3. -- Load files
  4. -- remove glooptest ruby, if technic ruby is defined
  5. if glooptest ~= nil and minetest.registered_items["technic_aluminum:ruby"] ~= nil then
  6. if minetest.registered_items["glooptest:mineral_ruby"] ~= nil then
  7. minetest.unregister_item("glooptest:mineral_ruby")
  8. end
  9. end
  10. -- remove glooptest sapphire, if technic sapphire is defined
  11. if glooptest ~= nil and minetest.registered_items["technic_aluminum:sapphire"] ~= nil then
  12. if minetest.registered_items["glooptest:mineral_sapphire"] ~= nil then
  13. minetest.unregister_item("glooptest:mineral_sapphire")
  14. end
  15. end
  16. -- add bags to treasures
  17. if treasures ~= nil and minetest.registered_items["bags:small"] ~= nil then
  18. if minetest.registered_items["bags:small"] ~= nil then
  19. treasures.add_drop("treasures:treasure1",{items="bags:small",rarety=15})
  20. treasures.add_drop("treasures:treasure2",{items="bags:small",rarety=10})
  21. end
  22. end
  23. if treasures ~= nil and minetest.registered_items["bags:medium"] ~= nil then
  24. if minetest.registered_items["bags:medium"] ~= nil then
  25. treasures.add_drop("treasures:treasure3",{items="bags:medium",rarety=15})
  26. treasures.add_drop("treasures:treasure4",{items="bags:medium",rarety=15})
  27. end
  28. end
  29. if treasures ~= nil and minetest.registered_items["bags:big"] ~= nil then
  30. if minetest.registered_items["bags:big"] ~= nil then
  31. treasures.add_drop("treasures:treasure5",{items="bags:big",rarety=15})
  32. end
  33. end
  34. minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- loaded ")