Tune steepness. Excavate to vm top

This commit is contained in:
paramat 2016-08-29 03:37:53 +01:00
parent 3b8356eada
commit 7fb407ab1e
4 changed files with 18 additions and 17 deletions

@ -1,7 +1,8 @@
pathv7 0.1.2 by paramat pathv7 0.1.3 by paramat
For Minetest 0.4.14 and later For Minetest 0.4.14 and later
Depends default stairs Depends default stairs
Licenses: Code LGPLv2.1, textures CC BY-SA 3.0 Licenses: Code LGPLv2.1, textures CC BY-SA 3.0
See license.txt for license information
Use with mapgen v7 only. Use with mapgen v7 only.
Creates a worldwide network of paths, bridges and tunnels. Creates a worldwide network of paths, bridges and tunnels.

@ -1,7 +1,7 @@
-- Parameters -- Parameters
local YMAXMINP = -32 -- Maximum minp.y of generated chunks local HSAMP = 0.025 -- Height select amplitude.
local HSAMP = 0.03 -- Height select amplitude. Maximum steepness of paths -- Controls maximum steepness of paths.
-- Mapgen v7 noises -- Mapgen v7 noises
@ -127,7 +127,7 @@ local nbuf_column
-- On generated function -- On generated function
minetest.register_on_generated(function(minp, maxp, seed) minetest.register_on_generated(function(minp, maxp, seed)
if minp.y < -32 or minp.y > YMAXMINP then if minp.y > 0 or maxp.y < 0 then
return return
end end
@ -233,9 +233,9 @@ minetest.register_on_generated(function(minp, maxp, seed)
end end
local tblend = 0.5 + HSAMP * (select - 0.5) local tblend = 0.5 + HSAMP * (select - 0.5)
tblend = math.min(math.max(tblend, 0), 1) tblend = math.min(math.max(tblend, 0), 1)
local tlevel = base * tblend + alt * (1 - tblend) local tlevel = math.floor(base * tblend + alt * (1 - tblend))
-- TODO allow path above -- TODO allow path above
local pathy = math.floor(math.min(math.max(tlevel, 7), 42)) local pathy = math.min(math.max(tlevel, 7), 42)
if (n_patha >= 0 and n_xprepatha < 0) -- detect sign change of noise if (n_patha >= 0 and n_xprepatha < 0) -- detect sign change of noise
or (n_patha < 0 and n_xprepatha >= 0) or (n_patha < 0 and n_xprepatha >= 0)
@ -298,7 +298,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
if tunnel then if tunnel then
excatop = pathy + 5 -- tunnel excatop = pathy + 5 -- tunnel
else else
excatop = y1 -- excavate to chunk top excatop = y1 + 16 -- excavate to vm top
end end
-- place path node brush -- place path node brush

@ -2,7 +2,7 @@ minetest.register_node("pathv7:junglewood", {
description = "Mod jungle wood", description = "Mod jungle wood",
tiles = {"default_junglewood.png"}, tiles = {"default_junglewood.png"},
is_ground_content = false, is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
}) })
@ -10,7 +10,7 @@ minetest.register_node("pathv7:bridgewood", {
description = "Bridge wood", description = "Bridge wood",
tiles = {"pathv7_bridgewood.png"}, tiles = {"pathv7_bridgewood.png"},
is_ground_content = false, is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
}) })
@ -20,7 +20,7 @@ minetest.register_node("pathv7:stairn", { -- stair rising to the north
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -37,7 +37,7 @@ minetest.register_node("pathv7:stairs", {
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -54,7 +54,7 @@ minetest.register_node("pathv7:staire", {
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -71,7 +71,7 @@ minetest.register_node("pathv7:stairw", {
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -88,7 +88,7 @@ minetest.register_node("pathv7:stairne", {
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -105,7 +105,7 @@ minetest.register_node("pathv7:stairnw", {
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -122,7 +122,7 @@ minetest.register_node("pathv7:stairse", {
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -139,7 +139,7 @@ minetest.register_node("pathv7:stairsw", {
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {

BIN
textures/pathv7_path.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B