Remove not working mapgen settings and disable mapgen

Unfortunately there is no easy way to create very rare biomes in minetest.
This commit is contained in:
HybridDog 2018-08-07 13:09:02 +02:00
parent 2f91256fbf
commit 52fec01943
3 changed files with 21 additions and 41 deletions

View File

@ -2,18 +2,20 @@
This mod adds mushrooms to minetest. The growing tool can make them giant. This mod adds mushrooms to minetest. The growing tool can make them giant.
**Depends:** see [depends.txt](https://raw.githubusercontent.com/HybridDog/riesenpilz/master/depends.txt) **Depends:** see [depends.txt](https://raw.githubusercontent.com/HybridDog/riesenpilz/master/depends.txt)<br/>
**License:** see [LICENSE.txt](https://raw.githubusercontent.com/HybridDog/riesenpilz/master/LICENSE.txt) **License:** see [LICENSE.txt](https://raw.githubusercontent.com/HybridDog/riesenpilz/master/LICENSE.txt)<br/>
**Download:** [zip](https://github.com/HybridDog/riesenpilz/archive/master.zip), [tar.gz](https://github.com/HybridDog/riesenpilz/archive/master.tar.gz) **Download:** [zip](https://github.com/HybridDog/riesenpilz/archive/master.zip), [tar.gz](https://github.com/HybridDog/riesenpilz/archive/master.tar.gz)<br/>
![I'm a screenshot!](https://cloud.githubusercontent.com/assets/3192173/5332059/421c735a-7e47-11e4-88cc-b9ed90b659a8.png) ![I'm a screenshot!](https://cloud.githubusercontent.com/assets/3192173/5332059/421c735a-7e47-11e4-88cc-b9ed90b659a8.png)
If you got ideas or found bugs, please tell them to me. If you got ideas or found bugs, please tell them to me.
TODO: TODO:
— add more giant mushrooms * add more giant mushrooms
— finish supporting the mushrooms mod * finish supporting the mushrooms mod
— add lava suit * add lava suit
— use visual_scale → crop textures and change nodeboxes (maybe automatically) * use visual_scale → crop textures and change nodeboxes (maybe automatically)
— make the growingtool craftable * make the growingtool craftable
* mapgen: do not use fixed tree stuff
* add settingtypes.txt

View File

@ -77,7 +77,8 @@ function is_toremove(id)
end end
local data, area, pr local data = {}
local area, pr
function riesenpilz_circle(nam, pos, radius, chance) function riesenpilz_circle(nam, pos, radius, chance)
local circle = vector.circle(radius) local circle = vector.circle(radius)
for i = 1,#circle do for i = 1,#circle do
@ -92,25 +93,11 @@ function riesenpilz_circle(nam, pos, radius, chance)
end end
-- perlin noise "hills" are not peaks but looking like sinus curve local nosmooth_rarity = 0.5
local function upper_rarity(rarity) local smooth_rarity_max = 0.6
return math.sign(rarity)*math.sin(math.abs(rarity)*math.pi/2) local smooth_rarity_min = 0.4
end local smooth_rarity_dif = smooth_rarity_max - smooth_rarity_min
local perlin_scale = 500
local rarity = riesenpilz.mapgen_rarity
local riesenpilz_size = riesenpilz.mapgen_size
local nosmooth_rarity = 1-rarity/50
local perlin_scale = riesenpilz_size*100/rarity
local smooth_rarity_max, smooth_rarity_min, smooth_rarity_dif
local smooth = riesenpilz.smooth
if smooth then
local smooth_trans_size = riesenpilz.smooth_trans_size
smooth_rarity_max = upper_rarity(nosmooth_rarity+smooth_trans_size*2/perlin_scale)
smooth_rarity_min = upper_rarity(nosmooth_rarity-smooth_trans_size/perlin_scale)
smooth_rarity_dif = smooth_rarity_max-smooth_rarity_min
end
nosmooth_rarity = upper_rarity(nosmooth_rarity)
local contents_defined local contents_defined
minetest.register_on_generated(function(minp, maxp, seed) minetest.register_on_generated(function(minp, maxp, seed)
@ -158,7 +145,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
local hm_zstride = divs+1 local hm_zstride = divs+1
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
data = vm:get_data() vm:get_data(data)
area = VoxelArea:new{MinEdge=emin, MaxEdge=emax} area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
for p_pos in area:iterp(minp, maxp) do --remove tree stuff for p_pos in area:iterp(minp, maxp) do --remove tree stuff
@ -344,7 +331,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
vm:set_lighting({day=0, night=0}) vm:set_lighting({day=0, night=0})
vm:calc_lighting() vm:calc_lighting()
vm:write_to_map() vm:write_to_map()
data = nil
area = nil area = nil
riesenpilz.inform("data set", 2, t2) riesenpilz.inform("data set", 2, t2)

View File

@ -1,6 +1,7 @@
--This file contains configuration options for riesenpilz mod. --This file contains configuration options for riesenpilz mod.
riesenpilz.enable_mapgen = true -- mapgen size etc. does not work
riesenpilz.enable_mapgen = false
--Generate giant mushroom biomes everywhere --Generate giant mushroom biomes everywhere
riesenpilz.always_generate = false riesenpilz.always_generate = false
@ -8,15 +9,6 @@ riesenpilz.always_generate = false
--Enables smooth transition of biomes. --Enables smooth transition of biomes.
riesenpilz.smooth = true riesenpilz.smooth = true
--rarity in %
riesenpilz.mapgen_rarity = 0.4
--size of the generated... (has an effect to the rarity, too)
riesenpilz.mapgen_size = 200
--approximate size of smooth transitions
riesenpilz.smooth_trans_size = 2
--says some information. --says some information.
riesenpilz.info = true riesenpilz.info = true