Adjust salt and biome spread.
This commit is contained in:
parent
36597871fb
commit
0ad60d974b
2 changed files with 108 additions and 117 deletions
44
mapgen.lua
44
mapgen.lua
|
@ -236,12 +236,14 @@ function fun_caves.generate(p_minp, p_maxp, seed)
|
|||
local ivm_above = ivm + area.ystride
|
||||
local dy = y - minp.y
|
||||
|
||||
if data[ivm] == node("air") then
|
||||
-------------------
|
||||
local stone_type = node("default:stone")
|
||||
local stone_depth = 1
|
||||
local biome_val = biome_n[index3d]
|
||||
if biome_val < -0.8 then
|
||||
-------------------
|
||||
--biome_val = 0.3
|
||||
-------------------
|
||||
if biome_val < -0.6 then
|
||||
if true then
|
||||
stone_type = node("default:ice")
|
||||
stone_depth = 2
|
||||
|
@ -249,21 +251,24 @@ function fun_caves.generate(p_minp, p_maxp, seed)
|
|||
stone_type = node("fun_caves:thinice")
|
||||
stone_depth = 2
|
||||
end
|
||||
elseif biome_val < -0.7 then
|
||||
elseif biome_val < -0.5 then
|
||||
stone_type = node("fun_caves:stone_with_lichen")
|
||||
elseif biome_val < -0.4 then
|
||||
elseif biome_val < -0.3 then
|
||||
stone_type = node("fun_caves:stone_with_moss")
|
||||
elseif biome_val < 0.1 then
|
||||
elseif biome_val < -0.0 then
|
||||
stone_type = node("fun_caves:stone_with_lichen")
|
||||
elseif biome_val < 0.4 then
|
||||
elseif biome_val < 0.2 then
|
||||
stone_type = node("fun_caves:stone_with_algae")
|
||||
elseif biome_val < 0.55 then
|
||||
elseif biome_val < 0.35 then
|
||||
stone_type = node("fun_caves:stone_with_salt")
|
||||
stone_depth = 2
|
||||
elseif biome_val < 0.7 then
|
||||
if data[ivm] == node("default:stone") then
|
||||
data[ivm] = stone_type
|
||||
end
|
||||
elseif biome_val < 0.5 then
|
||||
stone_type = node("default:sand")
|
||||
stone_depth = 2
|
||||
elseif biome_val < 0.8 then
|
||||
elseif biome_val < 0.6 then
|
||||
stone_type = node("default:coalblock")
|
||||
stone_depth = 2
|
||||
else
|
||||
|
@ -271,21 +276,26 @@ function fun_caves.generate(p_minp, p_maxp, seed)
|
|||
end
|
||||
-- "glow"
|
||||
|
||||
if data[ivm] == node("air") then
|
||||
-- Change stone per biome.
|
||||
if data[ivm_below] == node("default:stone") then
|
||||
if data[ivm_below] == node("default:stone") or (stone_type == node("fun_caves:stone_with_salt") and data[ivm_below] ~= node("fun_caves:stone_with_salt") and data[ivm_below] ~= node("air")) then
|
||||
data[ivm_below] = stone_type
|
||||
if stone_depth == 2 then
|
||||
if stone_type == node("fun_caves:stone_with_salt") and math.random(500) == 1 then
|
||||
data[ivm_below - area.ystride] = node("fun_caves:radioactive_ore")
|
||||
elseif stone_depth == 2 then
|
||||
data[ivm_below - area.ystride] = stone_type
|
||||
end
|
||||
end
|
||||
if data[ivm_above] == node("default:stone") then
|
||||
if data[ivm_above] == node("default:stone") or (stone_type == node("fun_caves:stone_with_salt") and data[ivm_above] ~= node("fun_caves:stone_with_salt") and data[ivm_above] ~= node("air")) then
|
||||
data[ivm_above] = stone_type
|
||||
if stone_depth == 2 then
|
||||
if stone_type == node("fun_caves:stone_with_salt") and math.random(500) == 1 then
|
||||
data[ivm_above - area.ystride] = node("fun_caves:radioactive_ore")
|
||||
elseif stone_depth == 2 then
|
||||
data[ivm_above + area.ystride] = stone_type
|
||||
end
|
||||
end
|
||||
|
||||
if (data[ivm_above] == node("fun_caves:stone_with_lichen") or data[ivm_above] == node("fun_caves:stone_with_moss")) and math.random(1,20) == 1 then
|
||||
if (data[ivm_above] == node("fun_caves:stone_with_lichen") or data[ivm_above] == node("fun_caves:stone_with_moss")) and math.random(1,50) == 1 then
|
||||
data[ivm_above] = node("fun_caves:glowing_fungal_stone")
|
||||
end
|
||||
|
||||
|
@ -327,10 +337,10 @@ function fun_caves.generate(p_minp, p_maxp, seed)
|
|||
elseif data[ivm_below] == node("fun_caves:stone_with_lichen") or data[ivm_above] == node("default:stone") then
|
||||
data[ivm] = node("fun_caves:stalagmite")
|
||||
end
|
||||
elseif data[ivm_below] == node("fun_caves:stone_with_moss") and sr < 100 then
|
||||
elseif data[ivm_below] == node("fun_caves:stone_with_moss") and sr < 90 then
|
||||
data[ivm_below] = node("fun_caves:glowing_fungal_stone")
|
||||
-- vegetation
|
||||
elseif (data[ivm_below] == node("fun_caves:stone_with_lichen") or data[ivm_below] == node("fun_caves:stone_with_algae")) and biome_val >= -0.7 then
|
||||
elseif (data[ivm_below] == node("fun_caves:stone_with_lichen") or data[ivm_below] == node("fun_caves:stone_with_algae")) and biome_val >= -0.5 then
|
||||
if sr < 110 then
|
||||
data[ivm] = node("flowers:mushroom_red")
|
||||
elseif sr < 140 then
|
||||
|
@ -387,7 +397,7 @@ function fun_caves.respawn(player)
|
|||
local biome_n = minetest.get_perlin(biome_noise):get3d({x=pos.x, y=pos.y, z=pos.z})
|
||||
local biome = biome_n
|
||||
|
||||
while biome < -0.3 or biome > 0.3 do
|
||||
while biome < -0.2 or biome > 0.0 do
|
||||
pos.x = pos.x + math.random(20) - 10
|
||||
pos.z = pos.z + math.random(20) - 10
|
||||
|
||||
|
|
113
nodes.lua
113
nodes.lua
|
@ -141,16 +141,9 @@ minetest.register_node("fun_caves:moon_juice", {
|
|||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("fun_caves:moon_glass", {
|
||||
description = "Moon Glass",
|
||||
drawtype = "glasslike",
|
||||
tiles = {"default_glass.png",},
|
||||
inventory_image = minetest.inventorycube("default_glass.png"),
|
||||
is_ground_content = true,
|
||||
light_source = default.LIGHT_MAX,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
local newnode = fun_caves.clone_node("default:glass")
|
||||
newnode.light_source = default.LIGHT_MAX
|
||||
minetest.register_node("fun_caves:moon_glass", newnode)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fun_caves:moon_juice",
|
||||
|
@ -236,46 +229,35 @@ minetest.register_craft({
|
|||
},
|
||||
})
|
||||
|
||||
minetest.register_node("fun_caves:glowing_dirt", {
|
||||
description = "Glowing Dirt",
|
||||
tiles = {"default_dirt.png"},
|
||||
groups = {crumbly = 3, soil = 1},
|
||||
light_source = default.LIGHT_MAX,
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
soil = {
|
||||
newnode = fun_caves.clone_node("default:dirt")
|
||||
newnode.description = "Glowing Dirt"
|
||||
newnode.light_source = default.LIGHT_MAX
|
||||
newnode.soil = {
|
||||
base = "fun_caves:glowing_dirt",
|
||||
dry = "fun_caves:glowing_soil",
|
||||
wet = "fun_caves:glowing_soil_wet"
|
||||
},
|
||||
})
|
||||
}
|
||||
minetest.register_node("fun_caves:glowing_dirt", newnode)
|
||||
|
||||
minetest.register_node("fun_caves:glowing_soil", {
|
||||
description = "Glowing Soil",
|
||||
tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"},
|
||||
drop = "fun_caves:glowing_dirt",
|
||||
groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
light_source = default.LIGHT_MAX,
|
||||
soil = {
|
||||
newnode = fun_caves.clone_node("farming:soil")
|
||||
newnode.description = "Glowing Soil"
|
||||
newnode.light_source = default.LIGHT_MAX
|
||||
newnode.soil = {
|
||||
base = "fun_caves:glowing_dirt",
|
||||
dry = "fun_caves:glowing_soil",
|
||||
wet = "fun_caves:glowing_soil_wet"
|
||||
},
|
||||
})
|
||||
}
|
||||
minetest.register_node("fun_caves:glowing_dirt", newnode)
|
||||
|
||||
minetest.register_node("fun_caves:glowing_soil_wet", {
|
||||
description = "Wet Glowing Soil",
|
||||
tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"},
|
||||
drop = "fun_caves:glowing_dirt",
|
||||
groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
light_source = default.LIGHT_MAX,
|
||||
soil = {
|
||||
newnode = fun_caves.clone_node("farming:soil_wet")
|
||||
newnode.description = "Wet Glowing Soil"
|
||||
newnode.light_source = default.LIGHT_MAX
|
||||
newnode.soil = {
|
||||
base = "fun_caves:glowing_dirt",
|
||||
dry = "fun_caves:glowing_soil",
|
||||
wet = "fun_caves:glowing_soil_wet"
|
||||
},
|
||||
})
|
||||
}
|
||||
minetest.register_node("fun_caves:glowing_dirt", newnode)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fun_caves:glowing_dirt",
|
||||
|
@ -300,51 +282,50 @@ minetest.register_node("fun_caves:thin_ice", {
|
|||
paramtype = "light",
|
||||
})
|
||||
|
||||
minetest.register_node("fun_caves:stone_with_moss", {
|
||||
description = "Cave Stone with Moss",
|
||||
tiles = {"default_stone.png^fun_caves_moss.png"},
|
||||
is_ground_content = true,
|
||||
groups = {stone=1, crumbly=3},
|
||||
drop = 'default:cobble',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
newnode = fun_caves.clone_node("default:stone")
|
||||
newnode.description = "Cave Stone With Moss"
|
||||
newnode.tiles = {"default_stone.png^fun_caves_moss.png"}
|
||||
newnode.groups = {stone=1, crumbly=3}
|
||||
newnode.sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
minetest.register_node("fun_caves:stone_with_moss", newnode)
|
||||
|
||||
minetest.register_node("fun_caves:stone_with_lichen", {
|
||||
description = "Cave Stone with Lichen",
|
||||
tiles = {"default_stone.png^fun_caves_lichen.png"},
|
||||
is_ground_content = true,
|
||||
groups = {stone=1, crumbly=3},
|
||||
drop = 'default:cobble',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
newnode = fun_caves.clone_node("default:stone")
|
||||
newnode.description = "Cave Stone With Lichen"
|
||||
newnode.tiles = {"default_stone.png^fun_caves_lichen.png"}
|
||||
newnode.groups = {stone=1, crumbly=3}
|
||||
newnode.sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
minetest.register_node("fun_caves:stone_with_lichen", newnode)
|
||||
|
||||
minetest.register_node("fun_caves:stone_with_algae", {
|
||||
description = "Cave Stone with Algae",
|
||||
tiles = {"default_stone.png^fun_caves_algae.png"},
|
||||
is_ground_content = true,
|
||||
groups = {stone=1, crumbly=3},
|
||||
drop = 'default:cobble',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
newnode = fun_caves.clone_node("default:stone")
|
||||
newnode.description = "Cave Stone With Algae"
|
||||
newnode.tiles = {"default_stone.png^fun_caves_algae.png"}
|
||||
newnode.groups = {stone=1, crumbly=3}
|
||||
newnode.sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
minetest.register_node("fun_caves:stone_with_algae", newnode)
|
||||
|
||||
minetest.register_node("fun_caves:stone_with_salt", {
|
||||
description = "Cave Stone with Salt",
|
||||
tiles = {"caverealms_salty2.png"},--{"caverealms_salty2.png^caverealms_salty.png", "caverealms_salty2.png", "caverealms_salty2.png^caverealms_salty_side.png"},
|
||||
tiles = {"caverealms_salty2.png"},
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
sunlight_propagates = false,
|
||||
is_ground_content = true,
|
||||
groups = {stone=1, crumbly=3},
|
||||
--light_source = 1,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
newnode = fun_caves.clone_node("fun_caves:stone_with_salt")
|
||||
newnode.description = "Salt With Radioactive Ore"
|
||||
newnode.tiles = {"caverealms_salty2.png^[colorize:#004000:250"}
|
||||
newnode.light_source = 4
|
||||
minetest.register_node("fun_caves:radioactive_ore", newnode)
|
||||
|
||||
|
||||
--Glow Obsidian
|
||||
minetest.register_node("fun_caves:glow_obsidian", {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue