init.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. --[[
  2. Minetest Ethereal Mod
  3. Created by ChinChow
  4. Updated by TenPlus1
  5. ]]
  6. -- DO NOT change settings below, use the settings.conf file instead
  7. ethereal = {
  8. version = "1.27",
  9. leaftype = 0, -- 0 for 2D plantlike, 1 for 3D allfaces
  10. leafwalk = false, -- true for walkable leaves, false to fall through
  11. cavedirt = true, -- caves chop through dirt when true
  12. torchdrop = true, -- torches drop when touching water
  13. papyruswalk = true, -- papyrus can be walked on
  14. lilywalk = true, -- waterlilies can be walked on
  15. xcraft = true, -- allow cheat crafts for cobble->gravel->dirt->sand, ice->snow, dry dirt->desert sand
  16. glacier = 1, -- Ice glaciers with snow
  17. bamboo = 1, -- Bamboo with sprouts
  18. mesa = 1, -- Mesa red and orange clay with giant redwood
  19. alpine = 1, -- Snowy grass
  20. healing = 1, -- Snowy peaks with healing trees
  21. snowy = 1, -- Cold grass with pine trees and snow spots
  22. frost = 1, -- Blue dirt with blue/pink frost trees
  23. grassy = 1, -- Green grass with flowers and trees
  24. caves = 1, -- Desert stone ares with huge caverns underneath
  25. grayness = 1, -- Grey grass with willow trees
  26. grassytwo = 1, -- Sparse trees with old trees and flowers
  27. prairie = 1, -- Flowery grass with many plants and flowers
  28. jumble = 1, -- Green grass with trees and jungle grass
  29. junglee = 1, -- Jungle grass with tall jungle trees
  30. desert = 1, -- Desert sand with cactus
  31. grove = 1, -- Banana groves and ferns
  32. mushroom = 1, -- Purple grass with giant mushrooms
  33. sandstone = 1, -- Sandstone with smaller cactus
  34. quicksand = 1, -- Quicksand banks
  35. plains = 1, -- Dry dirt with scorched trees
  36. savannah = 1, -- Dry yellow grass with acacia tree's
  37. fiery = 1, -- Red grass with lava craters
  38. sandclay = 1, -- Sand areas with clay underneath
  39. swamp = 1, -- Swamp areas with vines on tree's, mushrooms, lilly's and clay sand
  40. sealife = 1, -- Enable coral and seaweed
  41. reefs = 1, -- Enable new 0.4.15 coral reefs in default
  42. sakura = 1, -- Enable sakura biome with trees
  43. tundra = 1, -- Enable tuntra biome with permafrost
  44. }
  45. local path = minetest.get_modpath("ethereal")
  46. -- Load new settings if found
  47. local input = io.open(path.."/settings.conf", "r")
  48. if input then
  49. dofile(path .. "/settings.conf")
  50. input:close()
  51. input = nil
  52. end
  53. -- Intllib
  54. local S
  55. if minetest.global_exists("intllib") then
  56. if intllib.make_gettext_pair then
  57. -- New method using gettext.
  58. S = intllib.make_gettext_pair()
  59. else
  60. -- Old method using text files.
  61. S = intllib.Getter()
  62. end
  63. else
  64. S = function(s) return s end
  65. end
  66. ethereal.intllib = S
  67. -- Falling node function
  68. ethereal.check_falling = minetest.check_for_falling or nodeupdate
  69. -- creative check
  70. local creative_mode_cache = minetest.settings:get_bool("creative_mode")
  71. function ethereal.check_creative(name)
  72. return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
  73. end
  74. dofile(path .. "/plantlife.lua")
  75. dofile(path .. "/mushroom.lua")
  76. dofile(path .. "/onion.lua")
  77. dofile(path .. "/crystal.lua")
  78. dofile(path .. "/water.lua")
  79. dofile(path .. "/dirt.lua")
  80. dofile(path .. "/food.lua")
  81. dofile(path .. "/wood.lua")
  82. dofile(path .. "/leaves.lua")
  83. dofile(path .. "/sapling.lua")
  84. dofile(path .. "/strawberry.lua")
  85. dofile(path .. "/fishing.lua")
  86. dofile(path .. "/extra.lua")
  87. dofile(path .. "/sealife.lua")
  88. dofile(path .. "/fences.lua")
  89. dofile(path .. "/gates.lua")
  90. dofile(path .. "/mapgen.lua")
  91. dofile(path .. "/compatibility.lua")
  92. dofile(path .. "/stairs.lua")
  93. dofile(path .. "/lucky_block.lua")
  94. -- Set bonemeal aliases
  95. if minetest.get_modpath("bonemeal") then
  96. minetest.register_alias("ethereal:bone", "bonemeal:bone")
  97. minetest.register_alias("ethereal:bonemeal", "bonemeal:bonemeal")
  98. else -- or return to where it came from
  99. minetest.register_alias("ethereal:bone", "default:dirt")
  100. minetest.register_alias("ethereal:bonemeal", "default:dirt")
  101. end
  102. if minetest.get_modpath("xanadu") then
  103. dofile(path .. "/plantpack.lua")
  104. end
  105. print (S("[MOD] Ethereal loaded"))