diff --git a/README.md b/README.md index a8f9c7536d2d3eb692f2c2ae16e3acc4fec3b624..413016b54c5618bac98a0302d4c16e7092bd5618 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Ethereal Mapgen mod for Minetest (works on all except v6) - Replaced ethereal:green_dirt with default:dirt_with_grass for mortrees compatibility - Mesa biomes are now topped with dirt with dry grass (redwood saplings grow on dry grass) - Added bonemeal support for moretree's saplings + - Added settings.conf file example so that settings remain after mod update ### 1.21 diff --git a/init.lua b/init.lua index 074394d471cb612ea77e256d1beafe9d6b9eadb5..a228e62019c0e6c8af8bb8b070b50b2dc5271808 100644 --- a/init.lua +++ b/init.lua @@ -43,6 +43,18 @@ ethereal.savannah = 1 -- Dry yellow grass with acacia tree's ethereal.fiery = 1 -- Red grass with lava craters ethereal.sandclay = 1 -- Sand areas with clay underneath ethereal.swamp = 1 -- Swamp areas with vines on tree's, mushrooms, lilly's and clay sand +ethereal.sealife = 1 -- Enable coral and seaweed +ethereal.reefs = 1 -- Enable new coral reefs in default + +local path = minetest.get_modpath("ethereal") + +-- Load new settings if found +local input = io.open(path.."/settings.conf", "r") +if input then + dofile(path .. "/settings.conf") + input:close() + input = nil +end -- Intllib local S @@ -56,8 +68,6 @@ ethereal.intllib = S -- Falling node function ethereal.check_falling = minetest.check_for_falling or nodeupdate -local path = minetest.get_modpath("ethereal") - dofile(path .. "/plantlife.lua") dofile(path .. "/mushroom.lua") dofile(path .. "/onion.lua") diff --git a/mapgen.lua b/mapgen.lua index 7842911fc0ba8ccbd7ed9b5267ff298fd388c2aa..c0eb4c089a339c9a4916dc536d460354e898ab43 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -586,7 +586,7 @@ minetest.register_on_generated(function(minp, maxp) end) -- coral reef (0.4.15 only) -if minetest.registered_nodes["default:coral_orange"] then +if ethereal.reefs == 1 and minetest.registered_nodes["default:coral_orange"] then -- override corals so crystal shovel can pick them up intact minetest.override_item("default:coral_skeleton", {groups = {crumbly = 3}}) diff --git a/sealife.lua b/sealife.lua index 58f856bb28b943c2459b59a6a429de9f1d22a795..08d2f0c4e5013f43fc7338939f11a15c3d2584d9 100644 --- a/sealife.lua +++ b/sealife.lua @@ -136,6 +136,7 @@ minetest.register_node("ethereal:sandy", { }) -- randomly generate coral or seaweed and have seaweed grow up to 14 high +if ethereal.sealife == 1 then minetest.register_abm({ label = "Grow coral/seaweed", nodenames = {"ethereal:sandy"}, @@ -185,3 +186,4 @@ minetest.register_abm({ end, }) +end diff --git a/settings.conf_example b/settings.conf_example new file mode 100644 index 0000000000000000000000000000000000000000..935e958bd09f266f2c1d0d31c35345f485a4f7e2 --- /dev/null +++ b/settings.conf_example @@ -0,0 +1,41 @@ + +--[[ + Ethereal Settings can be changed here and kept even after the mod + has been updated +--]] + +ethereal.leaftype = 0 -- 0 for 2D plantlike, 1 for 3D allfaces +ethereal.leafwalk = false -- true for walkable leaves, false to fall through +ethereal.cavedirt = true -- caves chop through dirt when true +ethereal.torchdrop = true -- torches drop when touching water +ethereal.papyruswalk = true -- papyrus can be walked on +ethereal.lilywalk = true -- waterlilies can be walked on +ethereal.xcraft = true -- allow cheat crafts for cobble->gravel->dirt->sand, ice->snow, dry dirt->desert sand + +-- Set following to 1 to enable biome or 0 to disable +ethereal.glacier = 1 -- Ice glaciers with snow +ethereal.bamboo = 1 -- Bamboo with sprouts +ethereal.mesa = 1 -- Mesa red and orange clay with giant redwood +ethereal.alpine = 1 -- Snowy grass +ethereal.healing = 1 -- Snowy peaks with healing trees +ethereal.snowy = 1 -- Cold grass with pine trees and snow spots +ethereal.frost = 1 -- Blue dirt with blue/pink frost trees +ethereal.grassy = 1 -- Green grass with flowers and trees +ethereal.caves = 1 -- Desert stone ares with huge caverns underneath +ethereal.grayness = 1 -- Grey grass with willow trees +ethereal.grassytwo = 1 -- Sparse trees with old trees and flowers +ethereal.prairie = 1 -- Flowery grass with many plants and flowers +ethereal.jumble = 1 -- Green grass with trees and jungle grass +ethereal.junglee = 1 -- Jungle grass with tall jungle trees +ethereal.desert = 1 -- Desert sand with cactus +ethereal.grove = 1 -- Banana groves and ferns +ethereal.mushroom = 1 -- Purple grass with giant mushrooms +ethereal.sandstone = 1 -- Sandstone with smaller cactus +ethereal.quicksand = 1 -- Quicksand banks +ethereal.plains = 1 -- Dry dirt with scorched trees +ethereal.savannah = 1 -- Dry yellow grass with acacia tree's +ethereal.fiery = 1 -- Red grass with lava craters +ethereal.sandclay = 1 -- Sand areas with clay underneath +ethereal.swamp = 1 -- Swamp areas with vines on tree's, mushrooms, lilly's and clay sand +ethereal.sealife = 1 -- Enable coral and seaweed +ethereal.reefs = 1 -- Enable new coral reefs in default