Adjust setting names and documentation

This commit is contained in:
HybridDog 2020-11-04 18:02:03 +01:00
parent 1fd338ce03
commit 090aa2bfe8
4 changed files with 34 additions and 29 deletions

View File

@ -10,8 +10,13 @@ If you got ideas or found bugs, please tell them to me.
TODO:
* find out fitting values for ruined and hut chance
* add dried, rotten grass roofing nodes for the ruined hut
* fix that http://imgh.us/screenshot_20160305_162901.png
* use the mapgen decoration function instead of habitat to rarely spawn swamp grass
* fix leaves scale
* Test and find reasonable values for probabilities:
* Probability of hut spawning
* Probability of spawning a ruined instead of normal hut
* Perlin noise parameters (default values)
* Make the perlin noise parameters (i.e. biome probabiltiy) configurable
* Add dried, rotten grass roofing nodes for the ruined hut so that it differs
more from the normal hut
* Use the mapgen decoration function instead of habitat to rarely spawn swamp
grass and birches
* Fix leaves scale

View File

@ -1,6 +1,6 @@
if sumpf.info then
if sumpf.log_level > 0 then
function sumpf.inform(msg, spam, t)
if spam <= sumpf.max_spam then
if spam <= sumpf.log_level then
local info
if t then
info = "[sumpf] " .. msg .. (" after ca. %.3g s"):format(
@ -9,7 +9,7 @@ if sumpf.info then
info = "[sumpf] "..msg
end
minetest.log("info", info)
if sumpf.inform_all then
if sumpf.log_to_chat then
minetest.chat_send_all(info)
end
end

View File

@ -7,9 +7,8 @@ local default_settings = {
wet_beaches = true, --swampwater
hut_chance = 50,
spawn_plants = true,
info = true,
inform_all = false, --minetest.is_singleplayer()
max_spam = 2,
log_to_chat = false, --minetest.is_singleplayer()
log_level = 2,
}
for name,dv in pairs(default_settings) do

View File

@ -1,34 +1,35 @@
# Enables swamps mapgen
# Enable swamps mapgen
sumpf.enable_mapgen (enable mapgen) bool true
# Generate swamps everywhere
# Generate swamps everywhere and not just in a few biomes
sumpf.always_generate (always generate) bool false
# Enables smooth transition of biomes.
# Enable smooth transition of biomes
sumpf.smooth (smooth transitions) bool true
# Disable for testing
# Generate plants; this is usually disabled only for testing
sumpf.enable_plants (enable plants) bool true
# Enables swampwater - it might be a bit buggy with mapgen v6.
# Enable swampwater; it might be a bit buggy with mapgen v6
sumpf.swampwater (swampwater) bool true
# adds swampwater near sea (different behaviour)
# Add swampwater near sea (different behaviour than on land)
sumpf.wet_beaches (wet beaches) bool true
# chance of spawning a hut in a mapchunk, set to 0 to disable it
sumpf.hut_chance (hut chance) float 50
# Chance of spawning a hut in a mapchunk, set to 0 to disable it.
# If enabled, a hut spawns with probability 1/k, where k is the value of this
# setting, i.e. 1 means always spawn a hut, 2 means every second time, etc.
sumpf.hut_chance (hut chance) int 50
# habitat stuff
# Use the habitat mod to spawn some plants outside of swamp biomes
sumpf.spawn_plants (spawn plants) bool true
# says some information.
sumpf.info (inform) bool true
# If enabled, show log messages in the chat and not only in debug.txt
sumpf.log_to_chat (inform everyone) bool false
# informs the players too
sumpf.inform_all (inform everyone) bool false
# 1:<a bit of information>
# 2:<acceptable amount of information>
# 3:<lots of text>
sumpf.max_spam (max spam) int 2 1 3
# Specify how much text is printed for debugging purposes
# 0: Disabled
# 1: A bit of information
# 2: Acceptable amount of information
# 3: Lots of text
sumpf.log_level (max spam) int 2 1 3