Modif biomes

This commit is contained in:
sys4-fr 2018-11-14 22:26:29 +01:00
parent 6120890c5d
commit 794fb251ba
6 changed files with 42 additions and 43 deletions

Binary file not shown.

Binary file not shown.

View File

@ -161,7 +161,7 @@ minetest.register_abm({
-- This finds the sapling under the grown tree. ~ LazyJ
if minetest.get_node(pos).name == "snow:sapling_pine" then
-- This switches the sapling to a tree trunk. ~ LazyJ
minetest.set_node(pos, {name="default:pinetree"})
minetest.set_node(pos, {name="default:pine_tree"})
-- This is more for testing but it may be useful info to some admins when
-- grepping the server logs too. ~ LazyJ
minetest.log("action", "A pine sapling grows into a tree at "..minetest.pos_to_string(pos))

View File

@ -81,7 +81,7 @@ local pine_tree = {
axiom="TABff",
rules_a="[&T+f+ff+ff+ff+f]GA",
rules_b="[&T+f+Gf+Gf+Gf]GB",
trunk="default:pinetree",
trunk="default:pine_tree",
leaves="snow:needles",
angle=90,
iterations=1,
@ -96,7 +96,7 @@ local xmas_tree = {
axiom="TABff",
rules_a="[&T+f+ff+ff+ff+f]GA",
rules_b="[&T+f+Gf+Gf+Gf]GB",
trunk="default:pinetree",
trunk="default:pine_tree",
leaves="snow:needles_decorated",
angle=90,
iterations=1,
@ -149,7 +149,7 @@ end
function snow.voxelmanip_pine(pos,a,data)
local c_snow = minetest.get_content_id("default:snow")
local c_pine_needles = minetest.get_content_id("snow:needles")
local c_pinetree = minetest.get_content_id("default:pinetree")
local c_pinetree = minetest.get_content_id("default:pine_tree")
local c_air = minetest.get_content_id("air")
local perlin1 = minetest.get_perlin(112,3, 0.5, perlin_scale)

View File

@ -22,12 +22,26 @@ minetest.register_biome({
depth_filler = 2,
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 40,
y_min = 2,
y_max = 31000,
heat_point = 20.0,
humidity_point = 70.0,
})
minetest.register_biome({
name = "pine_forest",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 60,
y_max = 31000,
heat_point = 40,
humidity_point = 68,
})
minetest.register_biome({
name = "snow_biome_lush",
node_dust = "default:snow",
@ -37,25 +51,25 @@ minetest.register_biome({
depth_filler = 2,
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 60,
y_min = 2,
y_max = 31000,
heat_point = 10.0,
humidity_point = 70.0,
})
--[[minetest.register_biome({
minetest.register_biome({
name = "snow_biome_alpine",
node_top = "default:stone",
node_top = "default:dirt_with_snow",
depth_top = 1,
node_filler = "default:stone",
y_min = snow.min_height+60,
y_min = 60,
y_max = 31000,
heat_point = 10.0,
humidity_point = 40.0,
})
]]--
minetest.register_biome({
name = "snow_biome_sand",
@ -85,28 +99,28 @@ minetest.register_decoration({
persist = 0.7,
},
y_max = 31000,
y_min = 60,
biomes = {"snowy_grassland", "coniferous_forest", "taiga"},
y_min = 4,
biomes = {"snowy_grassland", "coniferous_forest", "taiga", "snow_biome_alpine"},
schematic = minetest.get_modpath("snow").."/schematics/pine.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = "default:dirt_with_snow",
place_on = {"default:dirt_with_snow", "default:dirt_with_grass"},
sidelen = 16,
noise_params = {
--offset = 0.036,
offset = 0.020,
scale = 0.022,
scale = 0.002,
spread = {x = 250, y = 250, z = 250},
seed = 2861,
octaves = 3,
persist = 0.66
},
y_max = 31000,
y_min = 40,
biomes = {"snow_biome_forest"},
y_min = 4,
biomes = {"snow_biome_forest", "pine_forest"},
schematic = minetest.get_modpath("snow").."/schematics/pine.mts",
flags = "place_center_x, place_center_z",
})
@ -117,7 +131,7 @@ minetest.register_decoration({
sidelen = 16,
fill_ratio = 0.05,
y_max = 31000,
y_min = 60,
y_min = 4,
biomes = {"snow_biome_lush"},
schematic = minetest.get_modpath("snow").."/schematics/pine.mts",
flags = "place_center_x, place_center_z",
@ -209,7 +223,7 @@ minetest.register_decoration({
decoration = "default:snow",
})
--[[minetest.register_decoration({
minetest.register_decoration({
deco_type = "simple",
place_on = "default:stone",
sidelen = 16,
@ -219,4 +233,3 @@ minetest.register_decoration({
biomes = {"snow_biome_alpine"},
decoration = "default:snow",
})
]]

View File

@ -1,15 +1,14 @@
-- NODES
-- Pine Needles
--[[local nodedef = {
description = "Pine Needles",
local nodedef = {
description = "Snow Pine Needles",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"snow_needles.png"},
waving = 1,
paramtype = "light",
groups = {snappy=3},
furnace_burntime = 1,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
@ -24,23 +23,9 @@
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
}
]]--
local nodedef = table.copy(minetest.registered_nodes["default:pine_needles"])
nodedef.tiles = {"snow_needles.png"}
nodedef.drop = {
max_items = 1,
items = {
{
-- player will get sapling with 1/20 chance
items = {'snow:sapling_pine'},
rarity = 20,
},
{
items = {'snow:needles'},
}
}
}
--[[
If christmas_content is enabled, then this next part will override the pine needles' drop code
(in the code section above) and adds Xmas tree saplings to the items that are dropped.
@ -60,7 +45,7 @@ minetest.register_node("snow:needles", table.copy(nodedef))
default.register_leafdecay{
trunks = {"default:pine_tree"},
leaves = {"default:pine_needles", "snow:needles"},
leaves = {"snow:needles", "default:pine_needles"},
radius = 2,
}
@ -114,10 +99,11 @@ nodedef = {
inventory_image = "snow_sapling_pine.png",
wield_image = "snow_sapling_pine.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
groups = {snappy=2,dig_immediate=3},
furnace_burntime = 10,
sounds = default.node_sound_defaults(),
groups = {snappy=2,dig_immediate=3, flammable = 3,
attached_node = 1, sapling = 1},
sounds = default.node_sound_leaves_defaults(),
}
-- Pine Sapling