diff options
author | paramat <mat.gregory@virginmedia.com> | 2016-08-29 03:37:53 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2016-08-29 03:37:53 +0100 |
commit | 7fb407ab1edefa40198f1309b24a07c7d26116e8 (patch) | |
tree | bc2eef54f765966716c859a7684d4c84b55b5c54 | |
parent | 3b8356eada29c0425607ed0af5f4da85e118771b (diff) |
Tune steepness. Excavate to vm top
-rw-r--r-- | README.txt | 3 | ||||
-rw-r--r-- | init.lua | 12 | ||||
-rw-r--r-- | nodes.lua | 20 | ||||
-rw-r--r-- | textures/pathv7_path.png | bin | 0 -> 616 bytes |
4 files changed, 18 insertions, 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 Depends default stairs Licenses: Code LGPLv2.1, textures CC BY-SA 3.0 +See license.txt for license information Use with mapgen v7 only. Creates a worldwide network of paths, bridges and tunnels. @@ -1,7 +1,7 @@ -- Parameters -local YMAXMINP = -32 -- Maximum minp.y of generated chunks -local HSAMP = 0.03 -- Height select amplitude. Maximum steepness of paths +local HSAMP = 0.025 -- Height select amplitude. + -- Controls maximum steepness of paths. -- Mapgen v7 noises @@ -127,7 +127,7 @@ local nbuf_column -- On generated function 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 end @@ -233,9 +233,9 @@ minetest.register_on_generated(function(minp, maxp, seed) end local tblend = 0.5 + HSAMP * (select - 0.5) 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 - 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 or (n_patha < 0 and n_xprepatha >= 0) @@ -298,7 +298,7 @@ minetest.register_on_generated(function(minp, maxp, seed) if tunnel then excatop = pathy + 5 -- tunnel else - excatop = y1 -- excavate to chunk top + excatop = y1 + 16 -- excavate to vm top end -- place path node brush @@ -2,7 +2,7 @@ minetest.register_node("pathv7:junglewood", { description = "Mod jungle wood",
tiles = {"default_junglewood.png"},
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(),
})
@@ -10,7 +10,7 @@ minetest.register_node("pathv7:bridgewood", { description = "Bridge wood",
tiles = {"pathv7_bridgewood.png"},
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(),
})
@@ -20,7 +20,7 @@ minetest.register_node("pathv7:stairn", { -- stair rising to the north drawtype = "nodebox",
paramtype = "light",
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 = {
type = "fixed",
fixed = {
@@ -37,7 +37,7 @@ minetest.register_node("pathv7:stairs", { drawtype = "nodebox",
paramtype = "light",
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 = {
type = "fixed",
fixed = {
@@ -54,7 +54,7 @@ minetest.register_node("pathv7:staire", { drawtype = "nodebox",
paramtype = "light",
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 = {
type = "fixed",
fixed = {
@@ -71,7 +71,7 @@ minetest.register_node("pathv7:stairw", { drawtype = "nodebox",
paramtype = "light",
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 = {
type = "fixed",
fixed = {
@@ -88,7 +88,7 @@ minetest.register_node("pathv7:stairne", { drawtype = "nodebox",
paramtype = "light",
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 = {
type = "fixed",
fixed = {
@@ -105,7 +105,7 @@ minetest.register_node("pathv7:stairnw", { drawtype = "nodebox",
paramtype = "light",
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 = {
type = "fixed",
fixed = {
@@ -122,7 +122,7 @@ minetest.register_node("pathv7:stairse", { drawtype = "nodebox",
paramtype = "light",
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 = {
type = "fixed",
fixed = {
@@ -139,7 +139,7 @@ minetest.register_node("pathv7:stairsw", { drawtype = "nodebox",
paramtype = "light",
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 = {
type = "fixed",
fixed = {
diff --git a/textures/pathv7_path.png b/textures/pathv7_path.png Binary files differnew file mode 100644 index 0000000..b57196e --- /dev/null +++ b/textures/pathv7_path.png |