forked from mtcontrib/plantlife_modpack
Compare commits
3 Commits
ac33f684b2
...
molehills_
Author | SHA1 | Date | |
---|---|---|---|
|
62b6245bd1 | ||
|
c6fd4a12b8 | ||
|
23d04af7d6 |
@@ -1,39 +1,65 @@
|
||||
--Map Generation Stuff
|
||||
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:gravel",
|
||||
"default:stone",
|
||||
"default:permafrost_with_stones"
|
||||
},
|
||||
max_count = 50,
|
||||
rarity = 0,
|
||||
plantlife_limit = -1,
|
||||
check_air = true,
|
||||
random_facedir = {0, 3}
|
||||
},
|
||||
{
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"cavestuff:pebble_1",
|
||||
"cavestuff:pebble_2"
|
||||
}
|
||||
)
|
||||
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:desert_sand",
|
||||
"default:desert_stone"
|
||||
},
|
||||
max_count = 50,
|
||||
rarity = 0,
|
||||
plantlife_limit = -1,
|
||||
check_air = true,
|
||||
random_facedir = {0, 3}
|
||||
},
|
||||
{
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"default:gravel",
|
||||
"default:stone",
|
||||
"default:permafrost_with_stones"
|
||||
},
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.0078125,
|
||||
spread = {
|
||||
y = 100,
|
||||
z = 100,
|
||||
x = 100
|
||||
},
|
||||
seed = 0,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
flags = "absvalue",
|
||||
lacunarity = 2
|
||||
},
|
||||
param2 = 0,
|
||||
flags = "all_floors",
|
||||
deco_type = "simple",
|
||||
param2_max = 3,
|
||||
y_min = -16,
|
||||
y_max = 48
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"cavestuff:desert_pebble_1",
|
||||
"cavestuff:desert_pebble_2"
|
||||
}
|
||||
)
|
||||
},
|
||||
place_on = {
|
||||
"default:desert_sand",
|
||||
"default:desert_stone"
|
||||
},
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.0078125,
|
||||
spread = {
|
||||
y = 100,
|
||||
z = 100,
|
||||
x = 100
|
||||
},
|
||||
seed = 0,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
flags = "absvalue",
|
||||
lacunarity = 2
|
||||
},
|
||||
param2 = 0,
|
||||
flags = "all_floors",
|
||||
deco_type = "simple",
|
||||
param2_max = 3,
|
||||
y_min = -16,
|
||||
y_max = 48
|
||||
})
|
@@ -1,2 +1,2 @@
|
||||
name = cavestuff
|
||||
depends = default,biome_lib
|
||||
depends = default
|
||||
|
@@ -2,13 +2,6 @@
|
||||
-- Idea by Sokomine
|
||||
-- Code & textures by Mossmanikin
|
||||
|
||||
abstract_molehills = {}
|
||||
|
||||
local molehills_rarity = tonumber(minetest.settings:get("molehills_rarity")) or 99.5
|
||||
local molehills_rarity_fertility = tonumber(minetest.settings:get("molehills_rarity_fertility")) or 1
|
||||
local molehills_fertility = tonumber(minetest.settings:get("molehills_fertility")) or -0.6
|
||||
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("molehills")
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@@ -48,29 +41,18 @@ minetest.register_craft({ -- molehills --> dirt
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- GeNeRaTiNG
|
||||
-----------------------------------------------------------------------------------------------
|
||||
abstract_molehills.place_molehill = function(pos)
|
||||
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
|
||||
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z }).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z }).name ~= "air"
|
||||
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z-1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z-1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z-1}).name ~= "air" then
|
||||
minetest.swap_node(right_here, {name="molehills:molehill"})
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
rarity = molehills_rarity,
|
||||
rarity_fertility = molehills_rarity_fertility,
|
||||
plantlife_limit = molehills_fertility,
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"--[[,"air"]]},
|
||||
avoid_radius = 4,
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"molehills:molehill"
|
||||
},
|
||||
abstract_molehills.place_molehill
|
||||
)
|
||||
fill_ratio = 0.002,
|
||||
y_min = 1,
|
||||
y_max = 40,
|
||||
place_on = {
|
||||
"default:dirt_with_grass"
|
||||
},
|
||||
spawn_by = "air",
|
||||
num_spawn_by = 3,
|
||||
deco_type = "simple",
|
||||
flags = "all_floors",
|
||||
})
|
||||
|
@@ -1,2 +1,2 @@
|
||||
name = molehills
|
||||
depends = default, biome_lib
|
||||
depends = default
|
||||
|
@@ -1,8 +0,0 @@
|
||||
#Molehills rarity %
|
||||
molehills_rarity (Molehills rarity %) float 99.5 0 100
|
||||
|
||||
#How much the rarity is reduced by fertility %
|
||||
molehills_rarity_fertility (Molehills rarity fertility reduction %) float 1 0 100
|
||||
|
||||
#Molehills minimum fertility (-1 to +1)
|
||||
molehills_fertility (Molehills minimum fertility) float -0.6 -1 1
|
Reference in New Issue
Block a user