summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-02-10 18:35:16 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2017-02-10 18:35:16 +0000
commit68d69fb9327a80a1e755ca2a1eec185453401e29 (patch)
tree3ae2cd72b1e058a228bd1e4dac356080bf00c92e
parentde078f3ce3752dade2654db4d1f4c66186a0c723 (diff)
Added settings.conf example for permanent settings
-rw-r--r--README.md1
-rw-r--r--init.lua14
-rw-r--r--mapgen.lua2
-rw-r--r--sealife.lua2
-rw-r--r--settings.conf_example41
5 files changed, 57 insertions, 3 deletions
diff --git a/README.md b/README.md
index a8f9c75..413016b 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 074394d..a228e62 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 7842911..c0eb4c0 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 58f856b..08d2f0c 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 0000000..935e958
--- /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