Primordial cavern layer (#12)

* bring in the art assets from ClockGen's "better_caves_modpack" under CC BY 4.0,, code written from scratch.

* update mapgen_helper

* import ClockGen's giant mushroom schematics, make them and giant ferns growable

* add giant jungle mushroom, rough out actual cavern layer code framework

* fungal ceiling decorations

* decorate fungal floor a bit

* update mapgen_helper

* update primordial mushroom schematic placement to ensure it fits

* add giant mycelium fungoidal structure

* add giant mycelium to mapgen

* fix settings for giant mycelium

* make mycelium grow when players aren't present

* allow mycelium growth to pause when it hits unloaded areas

* add a use for giant mycelium

* make giant mushrooms edible, make jungle trees growable

* rough out the jungle biome

* Make a spectrum of jungle growth

* optimize pngs, add is_ground_content to everything

* use custom is_ground_content method

* fix a crash with veinstone, and simplify nvals_cave lookup now that overgen covers the same area

* more fixes for overgen support

* remove unintentional airspace from underside of slade

* fix for overgen crash in level 2

* primordial column material, add sealed shafts to underworld

* add seal block

* Set up puzzle seals to be able to dig a staircase shaft through the slade layer. TODO: the puzzle to guard the trigger.

* puzzle seals now fully functional. Need to add clues for decoding the keys next.

* add a small bit of anti-griefing - the seal breach bell only tolls globally 13 times per activation

* add flowers to the underworld warrior bones

* switch to a different key bell

* fancy up the puzzle seal temples with some custom blocks, add sub-slade grid passages

* add a clue to the seal formspec

* tweak background of inscription 2 so it's less obviously a copy of the background for inscription 1

* switch to compositing to save a few bytes

* fancy up the seal's upper surface with inscriptions to make the formspec feel consistent

* puzzle particle, bones were only spawning on top of structures

* fix ice/oil on level 3, tweak some loot probabilities

* add trail mod support

* remove deprecated files

* boost default plant growth delay, add growing selection boxes

* update map colours

* add named waypoints to the underworld

* try a more efficient way of changing the interiors of columns

* polishing up the Primordial layer

* update guide with some Primordial teasers

* updated magma sea screenshot

* update mapgen_helper and subterrane

* reduce density of megaflora a bit - was too hard to walk through

* spreading_dirt_type depends on light, create my own ABM instead

* add names to the glowing pits and some of the ruins

* separate setting for ruin markers

* record identity of slade-breachers

* make mycelia climbable

* update subterrane

* change surface tunnel detection to allow above-ground stalactites and stalagmites

* add rare thicker Goblin Caps, suitable for use as huts.

* better goblin cap schematics

* update colours

* make it slightly harder to dig down through amethyst sheathing of pits

* fixing up fungus light sensitivity, tree growth code

* fix a few minor bugs

* update deprecated functions

* add various eating sounds

* make mapping kit requirement more flexible

* update spindlestem growth code, remove deprecated functions

* fix leftover undefined variable

* add fireflies to primordial, spread out the post-mapgen node timer for plant matter a bit more.

* fix bones formspec

* add lbm to upgrade old bones

* fix slade undiggability

* make torchspines smokey and manually lightable

* fix drop definitions

* generate dry stalactites in near-surface caverns.

* caverns become far too smokey, alas

* add pitter patter of spore tree spores, alternate paper recipe

* new mapgen_helper metrics

* add smokey back to torchspine now that it can be dialed down a bit

* replace glowstone texture with a new animated one

* switch from ABM to node timer for mapgen mycelium growth

* make mapgen mycelium timer delay configurable

* improve the efficiency of giant mycelium growth using flat node array, fewer dereferences

* remove the smoke from torchspines again - it doesn't dissipate that deep underground

* give slade a more muted, gloomy hue to differentiate it from nether stone

* update screenshots with new slade colors

* update mapgen_helper
This commit is contained in:
FaceDeer
2020-02-12 23:49:17 -07:00
committed by GitHub
parent 12919e9a16
commit 98fb313eb1
221 changed files with 7159 additions and 445 deletions

View File

@ -8,7 +8,7 @@ minetest.register_node("df_trees:black_cap_stem", {
_doc_items_longdesc = df_trees.doc.black_cap_desc,
_doc_items_usagehelp = df_trees.doc.black_cap_usage,
tiles = {"dfcaverns_black_cap_top.png","dfcaverns_black_cap_top.png","dfcaverns_black_cap_side.png",},
is_ground_content = true,
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
})
@ -19,7 +19,7 @@ minetest.register_node("df_trees:black_cap", {
_doc_items_longdesc = df_trees.doc.black_cap_desc,
_doc_items_usagehelp = df_trees.doc.black_cap_usage,
tiles = {"dfcaverns_black_cap_top.png","dfcaverns_black_cap_top.png","dfcaverns_black_cap_side.png^[transformR90",},
is_ground_content = true,
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
})
@ -30,7 +30,7 @@ minetest.register_node("df_trees:black_cap_gills", {
_doc_items_longdesc = df_trees.doc.black_cap_desc,
_doc_items_usagehelp = df_trees.doc.black_cap_usage,
tiles = {"dfcaverns_black_cap_gills.png"},
is_ground_content = true,
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
sounds = default.node_sound_leaves_defaults(),
drawtype = "plantlike",
@ -143,6 +143,7 @@ minetest.register_node("df_trees:black_cap_sapling", {
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
floodable = true,
selection_box = {
type = "fixed",
@ -153,9 +154,15 @@ minetest.register_node("df_trees:black_cap_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(
df_trees.config.black_cap_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.black_cap_delay_multiplier*df_trees.config.tree_max_growth_delay))
local below_node_name = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if minetest.get_item_group(below_node_name, "soil") > 0 or minetest.get_item_group(below_node_name, "coal") > 0 then
minetest.get_node_timer(pos):start(math.random(
df_trees.config.black_cap_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.black_cap_delay_multiplier*df_trees.config.tree_max_growth_delay))
end
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
on_timer = function(pos)

View File

@ -39,6 +39,7 @@ minetest.register_node("df_trees:blood_thorn", {
groups = {choppy = 3, tree = 1, flammable = 2, light_sensitive_fungus = 11},
_dfcaverns_dead_node = "df_trees:blood_thorn_dead",
sounds = default.node_sound_wood_defaults(),
is_ground_content = false,
on_place = minetest.rotate_node,
after_dig_node = blood_thorn_after_dig,
})
@ -53,6 +54,7 @@ minetest.register_node("df_trees:blood_thorn_dead", {
paramtype = "light",
groups = {choppy = 3, tree = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
is_ground_content = false,
on_place = minetest.rotate_node,
after_dig_node = blood_thorn_after_dig,
})
@ -74,6 +76,7 @@ minetest.register_node("df_trees:blood_thorn_spike", {
sounds = default.node_sound_wood_defaults(),
drawtype = "nodebox",
climbable = true,
is_ground_content = false,
damage_per_second = 1,
paramtype = "light",
paramtype2 = "facedir",
@ -103,6 +106,7 @@ minetest.register_node("df_trees:blood_thorn_spike_dead", {
sounds = default.node_sound_wood_defaults(),
drawtype = "nodebox",
climbable = true,
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",
node_box = {
@ -181,6 +185,11 @@ local max_bloodthorn_height = function(pos)
end
function df_trees.grow_blood_thorn(pos, node)
if df_farming and df_farming.kill_if_sunlit(pos) then
return
end
-- node is tipped over
if node.param2 >= 4 then
return
end

View File

@ -7,11 +7,11 @@ local print_settingtypes = false
local function setting(stype, name, default, description)
local value
if stype == "bool" then
value = minetest.setting_getbool(CONFIG_FILE_PREFIX..name)
value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name, default)
elseif stype == "string" then
value = minetest.setting_get(CONFIG_FILE_PREFIX..name)
value = minetest.settings:get(CONFIG_FILE_PREFIX..name)
elseif stype == "int" or stype == "float" then
value = tonumber(minetest.setting_get(CONFIG_FILE_PREFIX..name))
value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name))
end
if value == nil then
value = default

View File

@ -1,7 +0,0 @@
default
intllib?
doc?
moreblocks?
stairs?
vessels?
basic_materials?

View File

@ -1 +0,0 @@
Adds various types of underground fungal "trees". Light kills their saplings, they only grow in the dark.

View File

@ -115,6 +115,7 @@ minetest.register_node("df_trees:fungiwood_sapling", {
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
floodable = true,
selection_box = {
type = "fixed",
@ -125,15 +126,21 @@ minetest.register_node("df_trees:fungiwood_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
local below_node = minetest.get_node(vector.add(pos, {x=0,y=-1,z=0}))
if minetest.get_item_group(below_node.name, "soil") > 0 then
minetest.get_node_timer(pos):start(math.random(
df_trees.config.fungiwood_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.fungiwood_delay_multiplier*df_trees.config.tree_max_growth_delay))
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") == 0 then
return
end
minetest.get_node_timer(pos):start(math.random(
df_trees.config.fungiwood_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.fungiwood_delay_multiplier*df_trees.config.tree_max_growth_delay))
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
on_timer = function(pos)
if df_farming and df_farming.kill_if_sunlit(pos) then
return
end
minetest.set_node(pos, {name="air"})
df_trees.spawn_fungiwood(pos)
end,

View File

@ -8,7 +8,7 @@ minetest.register_node("df_trees:goblin_cap_stem", {
_doc_items_longdesc = df_trees.doc.goblin_cap_desc,
_doc_items_usagehelp = df_trees.doc.goblin_cap_usage,
tiles = {"dfcaverns_goblin_cap_stem.png"},
is_ground_content = true,
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, goblin_cap = 1},
sounds = df_trees.node_sound_tree_soft_fungus_defaults(),
})
@ -19,7 +19,7 @@ minetest.register_node("df_trees:goblin_cap", {
_doc_items_longdesc = df_trees.doc.goblin_cap_desc,
_doc_items_usagehelp = df_trees.doc.goblin_cap_usage,
tiles = {"dfcaverns_goblin_cap.png"},
is_ground_content = true,
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, goblin_cap = 1},
sounds = df_trees.node_sound_tree_soft_fungus_defaults(),
})
@ -30,7 +30,7 @@ minetest.register_node("df_trees:goblin_cap_gills", {
_doc_items_longdesc = df_trees.doc.goblin_cap_desc,
_doc_items_usagehelp = df_trees.doc.goblin_cap_usage,
tiles = {"dfcaverns_goblin_cap_gills.png"},
is_ground_content = true,
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1, goblin_cap = 1},
sounds = default.node_sound_leaves_defaults(),
drawtype = "plantlike",
@ -131,6 +131,57 @@ minetest.register_craft({
burntime = 2,
})
local big_goblin_cap_schem = dofile(MP.."/schematics/goblin_cap_big.lua")
local big_goblin_cap_hut_schem = dofile(MP.."/schematics/goblin_cap_big_hut.lua")
local bigger_goblin_cap_schem = dofile(MP.."/schematics/goblin_cap_bigger.lua")
local bigger_goblin_cap_hut_schem = dofile(MP.."/schematics/goblin_cap_bigger_hut.lua")
-- The hut has a chest and furnace near pos, use this to initialize it
local chest_on_construct = minetest.registered_items["default:chest"].on_construct
local furnace_on_construct = minetest.registered_items["default:furnace"].on_construct
local init_hut = function(pos)
local chest_pos = minetest.find_node_near({x=pos.x, y=pos.y+1, z=pos.z}, 2, "default:chest")
if chest_pos then
chest_on_construct(chest_pos)
local inv = minetest.get_inventory({type="node", pos=chest_pos})
inv:add_item("main", "default:apple 3")
inv:add_item("main", "default:gold_ingot ".. math.random(1,5))
end
local furnace_pos = minetest.find_node_near({x=pos.x, y=pos.y+1, z=pos.z}, 2, "default:furnace")
if furnace_pos then
furnace_on_construct(furnace_pos)
end
end
local init_vessels
if minetest.get_modpath("vessels") then
local vessels_on_construct = minetest.registered_items["vessels:shelf"].on_construct
init_vessels = function(pos)
local vessel_pos = minetest.find_node_near({x=pos.x, y=pos.y+1, z=pos.z}, 2, "vessels:shelf")
if vessel_pos then
vessels_on_construct(vessel_pos)
local inv = minetest.get_inventory({type="node", pos=vessel_pos})
inv:add_item("vessels", "df_trees:glowing_bottle_red "..math.random(50,99))
inv:add_item("vessels", "df_trees:glowing_bottle_green "..math.random(50,99))
inv:add_item("vessels", "df_trees:glowing_bottle_cyan "..math.random(40,99))
inv:add_item("vessels", "df_trees:glowing_bottle_golden "..math.random(30,99))
end
end
end
--local debug_test_hut = function(pos)
-- minetest.set_node(pos, {name="air"})
-- minetest.after(5, init_hut, pos)
-- if math.random() < 0.5 then
-- mapgen_helper.place_schematic(pos, big_goblin_cap_hut_schem, "random")
-- else
-- if init_vessels then
-- minetest.after(5, init_vessels, pos)
-- end
-- mapgen_helper.place_schematic(pos, bigger_goblin_cap_hut_schem, "random")
-- end
--end
-- sapling
minetest.register_node("df_trees:goblin_cap_sapling", {
description = S("Goblin Cap Spawn"),
@ -143,6 +194,7 @@ minetest.register_node("df_trees:goblin_cap_sapling", {
wield_image = "dfcaverns_goblin_cap_sapling.png",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
walkable = false,
floodable = true,
selection_box = {
@ -154,17 +206,33 @@ minetest.register_node("df_trees:goblin_cap_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
local below_node = minetest.get_node(vector.add(pos, {x=0,y=-1,z=0}))
if minetest.get_item_group(below_node.name, "soil") > 0 then
minetest.get_node_timer(pos):start(math.random(
df_trees.config.goblin_cap_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.goblin_cap_delay_multiplier*df_trees.config.tree_max_growth_delay))
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") == 0 then
return
end
minetest.get_node_timer(pos):start(math.random(
df_trees.config.goblin_cap_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.goblin_cap_delay_multiplier*df_trees.config.tree_max_growth_delay))
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
on_timer = function(pos)
if df_farming and df_farming.kill_if_sunlit(pos) then
return
end
minetest.set_node(pos, {name="air"})
df_trees.spawn_goblin_cap(pos)
if minetest.find_node_near({x=pos.x, y=pos.y-1, z=pos.z}, 1, {"group:straw"}) then
if math.random() < 0.5 then
mapgen_helper.place_schematic(pos, big_goblin_cap_schem)
else
mapgen_helper.place_schematic(pos, bigger_goblin_cap_schem)
end
return
else
df_trees.spawn_goblin_cap(pos)
end
end,
})
@ -172,8 +240,35 @@ local c_stem = minetest.get_content_id("df_trees:goblin_cap_stem")
local c_cap = minetest.get_content_id("df_trees:goblin_cap")
local c_gills = minetest.get_content_id("df_trees:goblin_cap_gills")
-- If the farming mod is installed, add the "straw" group to farming straw.
-- This way we just need to check for group:straw to get cave straw as well, without
-- needing a df_farming dependency for this mod.
if minetest.get_modpath("farming") then
local straw_def = minetest.registered_items["farming:straw"]
if straw_def then
local new_groups = {}
for group, val in pairs(straw_def.groups) do
new_groups[group] = val
end
new_groups.straw = 1
minetest.override_item("farming:straw", {
groups = new_groups
})
end
end
df_trees.spawn_goblin_cap = function(pos)
if math.random() < 0.1 then
if math.random() < 0.5 then
mapgen_helper.place_schematic(pos, big_goblin_cap_schem)
else
mapgen_helper.place_schematic(pos, bigger_goblin_cap_schem)
end
return
end
local x, y, z = pos.x, pos.y, pos.z
local stem_height = math.random(1,3)
local cap_radius = math.random(3,6)
local maxy = y + stem_height + 3
@ -193,7 +288,28 @@ df_trees.spawn_goblin_cap = function(pos)
vm:update_map()
end
df_trees.spawn_goblin_cap_vm = function(vi, area, data)
df_trees.spawn_goblin_cap_vm = function(vi, area, data, data_param2)
if math.random() < 0.1 then
local pos = area:position(vi)
if math.random() < 0.5 then
mapgen_helper.place_schematic_on_data(data, data_param2, area, pos, big_goblin_cap_schem)
elseif math.random() < 0.9 then
mapgen_helper.place_schematic_on_data(data, data_param2, area, pos, bigger_goblin_cap_schem)
else
-- easter egg - every once in a while (0.5%), a mapgen Goblin cap is a Smurf house
minetest.after(5, init_hut, pos)
if math.random() < 0.5 then
mapgen_helper.place_schematic_on_data(data, data_param2, area, pos, big_goblin_cap_hut_schem)
else
if init_vessels then
minetest.after(5, init_vessels, pos)
end
mapgen_helper.place_schematic_on_data(data, data_param2, area, pos, bigger_goblin_cap_hut_schem)
end
end
return
end
local stem_height = math.random(1,3)
local cap_radius = math.random(3,6)
subterrane.giant_mushroom(vi, area, data, c_stem, c_cap, c_gills, stem_height, cap_radius)

View File

@ -1,4 +1,4 @@
name = df_trees
description = Adds various types of underground fungal "trees". Light kills their saplings, they only grow in the dark.
depends = default
optional_depends = intllib, doc, moreblocks, stairs, vessels, basic_materials
optional_depends = intllib, doc, moreblocks, stairs, vessels, basic_materials, farming, doors, beds, df_farming

View File

@ -8,8 +8,8 @@ minetest.register_node("df_trees:nether_cap_stem", {
_doc_items_longdesc = df_trees.doc.nether_cap_desc,
_doc_items_usagehelp = df_trees.doc.nether_cap_usage,
tiles = {"dfcaverns_nether_cap_stem.png"},
is_ground_content = true,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1},
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1, nether_cap = 1},
sounds = default.node_sound_wood_defaults(),
})
@ -19,8 +19,8 @@ minetest.register_node("df_trees:nether_cap", {
_doc_items_longdesc = df_trees.doc.nether_cap_desc,
_doc_items_usagehelp = df_trees.doc.nether_cap_usage,
tiles = {"dfcaverns_nether_cap.png"},
is_ground_content = true,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1 },
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1, nether_cap = 1},
sounds = default.node_sound_wood_defaults({
footstep = {name = "default_snow_footstep", gain = 0.2},
}),
@ -32,9 +32,9 @@ minetest.register_node("df_trees:nether_cap_gills", {
_doc_items_longdesc = df_trees.doc.nether_cap_desc,
_doc_items_usagehelp = df_trees.doc.nether_cap_usage,
tiles = {"dfcaverns_nether_cap_gills.png"},
is_ground_content = true,
is_ground_content = false,
light_source = 6,
groups = {snappy = 3, leafdecay = 3, leaves = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1},
groups = {snappy = 3, leafdecay = 3, leaves = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1, nether_cap = 1},
sounds = default.node_sound_leaves_defaults(),
drawtype = "plantlike",
paramtype = "light",
@ -103,6 +103,7 @@ minetest.register_node("df_trees:nether_cap_sapling", {
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
floodable = true, -- nether cap spawn aren't tough enough to freeze water yet
selection_box = {
type = "fixed",
@ -113,12 +114,24 @@ minetest.register_node("df_trees:nether_cap_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
local node_below_name = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if minetest.get_item_group(node_below_name, "cools_lava") == 0 or minetest.get_item_group(node_below_name, "nether_cap") > 0 then
return
end
minetest.get_node_timer(pos):start(math.random(
df_trees.config.nether_cap_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.nether_cap_delay_multiplier*df_trees.config.tree_max_growth_delay))
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
on_timer = function(pos)
if df_farming and df_farming.kill_if_sunlit(pos) then
return
end
minetest.set_node(pos, {name="air"})
df_trees.spawn_nether_cap(pos)
end,

View File

@ -0,0 +1,220 @@
local n1 = { name = "air", prob = 0 } -- external air
local n2 = { name = "df_trees:goblin_cap" }
local n4 = { name = "df_trees:goblin_cap_gills" }
local n6 = { name = "df_trees:goblin_cap_stem" }
return {
yslice_prob = {},
size = {y = 9, x = 11, z = 11},
center_pos = {x=5, y=2, z=5},
data = {
-- z=0, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=5
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=0, y=6
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=5
n1, n1, n2, n2, n2, n4, n2, n2, n2, n1, n1,
-- z=1, y=6
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=1, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=5
n1, n2, n2, n4, n4, n4, n4, n4, n2, n2, n1,
-- z=2, y=6
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=2, y=7
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=2, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=3, y=0
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=3, y=1
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=3, y=2
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=3, y=3
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=3, y=4
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=3, y=5
n1, n2, n4, n4, n6, n6, n6, n4, n4, n2, n1,
-- z=3, y=6
n1, n1, n2, n2, n2, n2, n2, n2, n2, n1, n1,
-- z=3, y=7
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=3, y=8
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=4, y=0
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=4, y=1
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=4, y=2
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=4, y=3
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=4, y=4
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=4, y=5
n1, n2, n4, n6, n6, n6, n6, n6, n4, n2, n1,
-- z=4, y=6
n1, n1, n2, n2, n6, n6, n6, n2, n2, n1, n1,
-- z=4, y=7
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=4, y=8
n1, n1, n1, n1, n2, n2, n2, n1, n1, n1, n1,
-- z=5, y=0
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=5, y=1
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=5, y=2
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=5, y=3
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=5, y=4
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=5, y=5
n2, n4, n4, n6, n6, n6, n6, n6, n4, n4, n2,
-- z=5, y=6
n1, n2, n2, n2, n6, n6, n6, n2, n2, n2, n1,
-- z=5, y=7
n1, n1, n2, n2, n2, n6, n2, n2, n2, n1, n1,
-- z=5, y=8
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=6, y=0
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=6, y=1
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=6, y=2
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=6, y=3
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=6, y=4
n1, n1, n1, n6, n6, n6, n6, n6, n1, n1, n1,
-- z=6, y=5
n1, n2, n4, n6, n6, n6, n6, n6, n4, n2, n1,
-- z=6, y=6
n1, n1, n2, n2, n6, n6, n6, n2, n2, n1, n1,
-- z=6, y=7
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=6, y=8
n1, n1, n1, n1, n2, n2, n2, n1, n1, n1, n1,
-- z=7, y=0
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=7, y=1
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=7, y=2
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=7, y=3
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=7, y=4
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=7, y=5
n1, n2, n4, n4, n6, n6, n6, n4, n4, n2, n1,
-- z=7, y=6
n1, n1, n2, n2, n2, n2, n2, n2, n2, n1, n1,
-- z=7, y=7
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=7, y=8
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=8, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=8, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=8, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=8, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=8, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=8, y=5
n1, n2, n2, n4, n4, n4, n4, n4, n2, n2, n1,
-- z=8, y=6
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=8, y=7
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=8, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=5
n1, n1, n2, n2, n2, n4, n2, n2, n2, n1, n1,
-- z=9, y=6
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=9, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=5
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=10, y=6
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
}
}

View File

@ -0,0 +1,253 @@
local n1 = { name = "air", prob = 0 } -- external air
local n2 = { name = "df_trees:goblin_cap" }
local n3 = {name = "stairs:slab_goblin_cap_stem_wood", param2 = 2} -- porch top
local n4 = { name = "df_trees:goblin_cap_gills" }
local n6 = { name = "df_trees:goblin_cap_stem", force_place=true } -- walls
local n7 = { name = "df_trees:goblin_cap_stem_wood", force_place=true } -- internal floor
local n8 = { name = "doors:door_wood_a", force_place=true }
local n9 = { name = "doors:hidden", force_place=true }
local n10 = { name = "default:furnace", param2 = 3, force_place=true }
local n11 = { name = "air", force_place=true } -- internal air
local n12 = { name = "beds:bed_bottom", force_place=true }
local n13 = { name = "df_trees:goblin_cap_stem", prob = 198, force_place=true } -- possible window holes
local n16 = { name = "default:chest", param2 = 3, force_place=true }
local n17 = { name = "beds:bed_top", force_place=true }
local n18 = { name = "default:torch_wall", param2 = 4, force_place=true }
local n19 = { name = "df_trees:goblin_cap_stem" } -- base
local n20 = {name = "stairs:stair_goblin_cap_stem_wood", param2 = 1 }
local n21 = {name = "stairs:stair_goblin_cap_stem_wood", param2 = 3 }
local n22 = {name = "stairs:slab_goblin_cap_stem_wood", param2 = 22}
if minetest.get_modpath("vessels") then
n18 = { name = "df_trees:glowing_bottle_red", force_place=true}
end
if not minetest.get_modpath("doors") then
-- replace the door with air
n8 = n11
n9 = n11
end
if not minetest.get_modpath("beds") then
--replace the bed with air
n12 = n11
n17 = n11
end
return {
yslice_prob = {},
size = {y = 9, x = 11, z = 11},
center_pos = {x=5, y=2, z=5},
data = {
-- z=0, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=5
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=0, y=6
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=3
n1, n1, n1, n1, n1, n11, n1, n1, n1, n1, n1,
-- z=1, y=4
n1, n1, n1, n1, n1, n11, n1, n1, n1, n1, n1,
-- z=1, y=5
n1, n1, n2, n2, n2, n4, n2, n2, n2, n1, n1,
-- z=1, y=6
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=1, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=0
n1, n1, n1, n22, n1, n1, n1, n22, n1, n1, n1,
-- z=2, y=1
n1, n1, n1, n1, n20, n1, n21, n1, n1, n1, n1,
-- z=2, y=2
n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1,
-- z=2, y=3
n1, n1, n1, n1, n1, n11, n1, n1, n1, n1, n1,
-- z=2, y=4
n1, n1, n1, n1, n1, n11, n1, n1, n1, n1, n1,
-- z=2, y=5
n1, n2, n2, n4, n4, n4, n4, n4, n2, n2, n1,
-- z=2, y=6
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=2, y=7
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=2, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=3, y=0
n1, n1, n1, n3, n19, n19, n19, n3, n1, n1, n1,
-- z=3, y=1
n1, n1, n1, n1, n19, n19, n19, n1, n1, n1, n1,
-- z=3, y=2
n1, n1, n1, n1, n6, n7, n6, n1, n1, n1, n1,
-- z=3, y=3
n1, n1, n1, n1, n6, n8, n6, n1, n1, n1, n1,
-- z=3, y=4
n1, n1, n1, n1, n6, n9, n6, n1, n1, n1, n1,
-- z=3, y=5
n1, n2, n4, n4, n6, n6, n6, n4, n4, n2, n1,
-- z=3, y=6
n1, n1, n2, n2, n2, n2, n2, n2, n2, n1, n1,
-- z=3, y=7
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=3, y=8
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=4, y=0
n1, n1, n1, n19, n19, n19, n19, n19, n1, n1, n1,
-- z=4, y=1
n1, n1, n1, n19, n19, n19, n19, n19, n1, n1, n1,
-- z=4, y=2
n1, n1, n1, n6, n7, n7, n7, n6, n1, n1, n1,
-- z=4, y=3
n1, n1, n1, n6, n10, n11, n11, n6, n1, n1, n1,
-- z=4, y=4
n1, n1, n1, n6, n11, n11, n11, n6, n1, n1, n1,
-- z=4, y=5
n1, n2, n4, n6, n11, n11, n11, n6, n4, n2, n1,
-- z=4, y=6
n1, n1, n2, n2, n6, n6, n6, n2, n2, n1, n1,
-- z=4, y=7
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=4, y=8
n1, n1, n1, n1, n2, n2, n2, n1, n1, n1, n1,
-- z=5, y=0
n1, n1, n1, n19, n19, n19, n19, n19, n1, n1, n1,
-- z=5, y=1
n1, n1, n1, n19, n19, n19, n19, n19, n1, n1, n1,
-- z=5, y=2
n1, n1, n1, n6, n7, n7, n7, n6, n1, n1, n1,
-- z=5, y=3
n1, n1, n1, n6, n11, n11, n12, n6, n1, n1, n1,
-- z=5, y=4
n1, n1, n1, n13, n11, n11, n11, n13, n1, n1, n1,
-- z=5, y=5
n2, n4, n4, n6, n11, n11, n11, n6, n4, n4, n2,
-- z=5, y=6
n1, n2, n2, n2, n6, n11, n6, n2, n2, n2, n1,
-- z=5, y=7
n1, n1, n2, n2, n2, n6, n2, n2, n2, n1, n1,
-- z=5, y=8
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=6, y=0
n1, n1, n1, n19, n19, n19, n19, n19, n1, n1, n1,
-- z=6, y=1
n1, n1, n1, n19, n19, n19, n19, n19, n1, n1, n1,
-- z=6, y=2
n1, n1, n1, n6, n7, n7, n7, n6, n1, n1, n1,
-- z=6, y=3
n1, n1, n1, n6, n16, n11, n17, n6, n1, n1, n1,
-- z=6, y=4
n1, n1, n1, n6, n18, n11, n11, n6, n1, n1, n1,
-- z=6, y=5
n1, n2, n4, n6, n11, n11, n11, n6, n4, n2, n1,
-- z=6, y=6
n1, n1, n2, n2, n6, n6, n6, n2, n2, n1, n1,
-- z=6, y=7
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=6, y=8
n1, n1, n1, n1, n2, n2, n2, n1, n1, n1, n1,
-- z=7, y=0
n1, n1, n1, n1, n19, n19, n19, n1, n1, n1, n1,
-- z=7, y=1
n1, n1, n1, n1, n19, n19, n19, n1, n1, n1, n1,
-- z=7, y=2
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=7, y=3
n1, n1, n1, n1, n6, n6, n6, n1, n1, n1, n1,
-- z=7, y=4
n1, n1, n1, n1, n6, n13, n6, n1, n1, n1, n1,
-- z=7, y=5
n1, n2, n4, n4, n6, n6, n6, n4, n4, n2, n1,
-- z=7, y=6
n1, n1, n2, n2, n2, n2, n2, n2, n2, n1, n1,
-- z=7, y=7
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=7, y=8
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=8, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=8, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=8, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=8, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=8, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=8, y=5
n1, n2, n2, n4, n4, n4, n4, n4, n2, n2, n1,
-- z=8, y=6
n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=8, y=7
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=8, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=5
n1, n1, n2, n2, n2, n4, n2, n2, n2, n1, n1,
-- z=9, y=6
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=9, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=9, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=5
n1, n1, n1, n1, n1, n2, n1, n1, n1, n1, n1,
-- z=10, y=6
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
}
}

View File

@ -0,0 +1,284 @@
local n1 = { name = "air", prob=0 }
local n3 = { name = "df_trees:goblin_cap" }
local n4 = { name = "df_trees:goblin_cap_gills" }
local n5 = { name = "df_trees:goblin_cap_stem" }
return {
yslice_prob = {},
size = {y = 10, x = 13, z = 13},
center_pos = {x=6, y=2, z=6},
data = {
-- z=0, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=6
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=0, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=6
n1, n1, n1, n3, n3, n3, n4, n3, n3, n3, n1, n1, n1,
-- z=1, y=7
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=1, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=6
n1, n1, n3, n4, n4, n4, n4, n4, n4, n4, n3, n1, n1,
-- z=2, y=7
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=2, y=8
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=2, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=3, y=0
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=3, y=1
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=3, y=2
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=3, y=3
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=3, y=4
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=3, y=5
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=3, y=6
n1, n3, n4, n4, n4, n4, n5, n4, n4, n4, n4, n3, n1,
-- z=3, y=7
n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
-- z=3, y=8
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=3, y=9
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=4, y=0
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=4, y=1
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=4, y=2
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=4, y=3
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=4, y=4
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=4, y=5
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=4, y=6
n1, n3, n4, n4, n4, n5, n5, n5, n4, n4, n4, n3, n1,
-- z=4, y=7
n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
-- z=4, y=8
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=4, y=9
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=5, y=0
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=5, y=1
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=5, y=2
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=5, y=3
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=5, y=4
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=5, y=5
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=5, y=6
n1, n3, n4, n4, n5, n5, n5, n5, n5, n4, n4, n3, n1,
-- z=5, y=7
n1, n1, n3, n3, n3, n5, n5, n5, n3, n3, n3, n1, n1,
-- z=5, y=8
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=5, y=9
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=6, y=0
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=6, y=1
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=6, y=2
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=6, y=3
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=6, y=4
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=6, y=5
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=6, y=6
n3, n4, n4, n5, n5, n5, n5, n5, n5, n5, n4, n4, n3,
-- z=6, y=7
n1, n3, n3, n3, n3, n5, n5, n5, n3, n3, n3, n3, n1,
-- z=6, y=8
n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
-- z=6, y=9
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=7, y=0
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=7, y=1
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=7, y=2
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=7, y=3
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=7, y=4
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=7, y=5
n1, n1, n1, n5, n5, n5, n5, n5, n5, n5, n1, n1, n1,
-- z=7, y=6
n1, n3, n4, n4, n5, n5, n5, n5, n5, n4, n4, n3, n1,
-- z=7, y=7
n1, n1, n3, n3, n3, n5, n5, n5, n3, n3, n3, n1, n1,
-- z=7, y=8
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=7, y=9
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=8, y=0
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=8, y=1
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=8, y=2
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=8, y=3
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=8, y=4
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=8, y=5
n1, n1, n1, n1, n5, n5, n5, n5, n5, n1, n1, n1, n1,
-- z=8, y=6
n1, n3, n4, n4, n4, n5, n5, n5, n4, n4, n4, n3, n1,
-- z=8, y=7
n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
-- z=8, y=8
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=8, y=9
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=9, y=0
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=9, y=1
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=9, y=2
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=9, y=3
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=9, y=4
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=9, y=5
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=9, y=6
n1, n3, n4, n4, n4, n4, n5, n4, n4, n4, n4, n3, n1,
-- z=9, y=7
n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
-- z=9, y=8
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=9, y=9
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=10, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=6
n1, n1, n3, n4, n4, n4, n4, n4, n4, n3, n3, n1, n1,
-- z=10, y=7
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=10, y=8
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=10, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=6
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=11, y=7
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=11, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=6
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=12, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
}
}

View File

@ -0,0 +1,320 @@
local n1 = { name = "air" } -- external air
local n2 = { name = "df_trees:goblin_cap_stem"} -- below ground, don't force place these
local n3 = { name = "df_trees:goblin_cap" }
local n4 = { name = "df_trees:goblin_cap_gills" }
local n5 = { name = "df_trees:goblin_cap_stem", force_place = true } -- walls, force place these
local n6 = { name = "df_trees:goblin_cap_stem", prob = 198, force_place=true } -- possible window holes
local n7 = { name = "df_trees:goblin_cap_stem_wood", force_place=true } -- internal floor
local n8 = { name = "default:furnace", param2 = 2, force_place=true }
local n9 = { name = "air", force_place=true } -- internal air
local n10 = { name = "default:torch_wall", param2 = 3, force_place = true }
local n12 = {name = "stairs:slab_goblin_cap_stem_wood", param2 = 2} -- porch top
local n13 = { name = "doors:door_wood_a", param2 = 3, force_place = true }
local n14 = { name = "doors:hidden", param2 = 3, force_place = true }
local n15 = n9 -- internal air, but could be a vessel shelf
local n16 = { name = "beds:bed_top", param2 = 3, force_place = true }
local n17 = { name = "beds:bed_bottom", param2 = 3, force_place = true }
local n18 = { name = "default:chest", force_place = true }
local n19 = { name = "default:torch_wall", param2 = 2, force_place = true }
local n20 = {name = "stairs:stair_goblin_cap_stem_wood" }
local n21 = {name = "stairs:stair_goblin_cap_stem_wood", param2 = 2 }
local n22 = {name = "stairs:slab_goblin_cap_stem_wood", param2 = 22}
if minetest.get_modpath("vessels") then
-- replace torches with glowing bottles, add vessel shelf
n10 = { name = "df_trees:glowing_bottle_red", force_place=true}
n19 = n10
n15 = { name = "vessels:shelf", param2 = 3, force_place = true }
end
if not minetest.get_modpath("doors") then
-- replace the door with air
n13 = n9
n14 = n9
end
if not minetest.get_modpath("beds") then
--replace the bed with air
n16 = n9
n17 = n9
end
return {
yslice_prob = {},
size = {y = 10, x = 13, z = 13},
center_pos = {x=6, y=2, z=6},
data = {
-- z=0, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=6
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=0, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=0, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=6
n1, n1, n1, n3, n3, n3, n4, n3, n3, n3, n1, n1, n1,
-- z=1, y=7
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=1, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=1, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=2, y=6
n1, n1, n3, n4, n4, n4, n4, n4, n4, n4, n3, n1, n1,
-- z=2, y=7
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=2, y=8
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=2, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=3, y=0
n1, n1, n1, n1, n1, n2, n2, n2, n1, n1, n1, n1, n1,
-- z=3, y=1
n1, n1, n1, n1, n1, n2, n2, n2, n1, n1, n1, n1, n1,
-- z=3, y=2
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=3, y=3
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=3, y=4
n1, n1, n1, n1, n1, n5, n6, n5, n1, n1, n1, n1, n1,
-- z=3, y=5
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=3, y=6
n1, n3, n4, n4, n4, n4, n5, n4, n4, n4, n4, n3, n1,
-- z=3, y=7
n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
-- z=3, y=8
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=3, y=9
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=4, y=0
n1, n1, n1, n1, n2, n2, n2, n2, n2, n12, n22, n1, n1,
-- z=4, y=1
n1, n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1, n1,
-- z=4, y=2
n1, n1, n1, n1, n5, n7, n7, n7, n5, n1, n1, n1, n1,
-- z=4, y=3
n1, n1, n1, n1, n5, n8, n9, n9, n5, n1, n1, n1, n1,
-- z=4, y=4
n1, n1, n1, n1, n5, n10, n9, n9, n5, n1, n1, n1, n1,
-- z=4, y=5
n1, n1, n1, n1, n5, n5, n9, n5, n5, n1, n1, n1, n1,
-- z=4, y=6
n1, n3, n4, n4, n4, n5, n5, n5, n4, n4, n4, n3, n1,
-- z=4, y=7
n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
-- z=4, y=8
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=4, y=9
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=5, y=0
n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=5, y=1
n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n20, n1, n1,
-- z=5, y=2
n1, n1, n1, n5, n7, n7, n7, n7, n7, n5, n1, n1, n1,
-- z=5, y=3
n1, n1, n1, n5, n9, n9, n9, n9, n9, n5, n1, n1, n1,
-- z=5, y=4
n1, n1, n1, n5, n9, n9, n9, n9, n9, n5, n1, n1, n1,
-- z=5, y=5
n1, n1, n1, n5, n5, n9, n9, n9, n5, n5, n1, n1, n1,
-- z=5, y=6
n1, n3, n4, n4, n5, n9, n9, n9, n5, n4, n4, n3, n1,
-- z=5, y=7
n1, n1, n3, n3, n3, n5, n5, n5, n3, n3, n3, n1, n1,
-- z=5, y=8
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=5, y=9
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=6, y=0
n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=6, y=1
n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=6, y=2
n1, n1, n1, n5, n7, n7, n7, n7, n7, n7, n12, n1, n1,
-- z=6, y=3
n1, n1, n1, n5, n9, n9, n9, n9, n9, n13, n9, n9, n1,
-- z=6, y=4
n1, n1, n1, n6, n9, n9, n9, n9, n9, n14, n9, n9, n1,
-- z=6, y=5
n1, n1, n1, n5, n9, n9, n9, n9, n9, n5, n1, n1, n1,
-- z=6, y=6
n3, n4, n4, n5, n5, n9, n9, n9, n5, n5, n4, n4, n3,
-- z=6, y=7
n1, n3, n3, n3, n3, n5, n5, n5, n3, n3, n3, n3, n1,
-- z=6, y=8
n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
-- z=6, y=9
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=7, y=0
n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1,
-- z=7, y=1
n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n21, n1, n1,
-- z=7, y=2
n1, n1, n1, n5, n7, n7, n7, n7, n7, n5, n1, n1, n1,
-- z=7, y=3
n1, n1, n1, n5, n15, n9, n9, n9, n9, n5, n1, n1, n1,
-- z=7, y=4
n1, n1, n1, n5, n9, n9, n9, n9, n9, n5, n1, n1, n1,
-- z=7, y=5
n1, n1, n1, n5, n5, n9, n9, n9, n5, n5, n1, n1, n1,
-- z=7, y=6
n1, n3, n4, n4, n5, n9, n9, n9, n5, n4, n4, n3, n1,
-- z=7, y=7
n1, n1, n3, n3, n3, n5, n5, n5, n3, n3, n3, n1, n1,
-- z=7, y=8
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=7, y=9
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=8, y=0
n1, n1, n1, n1, n2, n2, n2, n2, n2, n12, n22, n1, n1,
-- z=8, y=1
n1, n1, n1, n1, n2, n2, n2, n2, n2, n1, n1, n1, n1,
-- z=8, y=2
n1, n1, n1, n1, n5, n7, n7, n7, n5, n1, n1, n1, n1,
-- z=8, y=3
n1, n1, n1, n1, n5, n16, n17, n18, n5, n1, n1, n1, n1,
-- z=8, y=4
n1, n1, n1, n1, n5, n9, n9, n19, n5, n1, n1, n1, n1,
-- z=8, y=5
n1, n1, n1, n1, n5, n5, n9, n5, n5, n1, n1, n1, n1,
-- z=8, y=6
n1, n3, n4, n4, n4, n5, n5, n5, n4, n4, n4, n3, n1,
-- z=8, y=7
n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
-- z=8, y=8
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=8, y=9
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=9, y=0
n1, n1, n1, n1, n1, n2, n2, n2, n1, n1, n1, n1, n1,
-- z=9, y=1
n1, n1, n1, n1, n1, n2, n2, n2, n1, n1, n1, n1, n1,
-- z=9, y=2
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=9, y=3
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=9, y=4
n1, n1, n1, n1, n1, n5, n6, n5, n1, n1, n1, n1, n1,
-- z=9, y=5
n1, n1, n1, n1, n1, n5, n5, n5, n1, n1, n1, n1, n1,
-- z=9, y=6
n1, n3, n4, n4, n4, n4, n5, n4, n4, n4, n4, n3, n1,
-- z=9, y=7
n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
-- z=9, y=8
n1, n1, n1, n1, n3, n3, n3, n3, n3, n1, n1, n1, n1,
-- z=9, y=9
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=10, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=10, y=6
n1, n1, n3, n4, n4, n4, n4, n4, n4, n3, n3, n1, n1,
-- z=10, y=7
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=10, y=8
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=10, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=6
n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
-- z=11, y=7
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=11, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=11, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=0
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=1
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=2
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=3
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=4
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=5
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=6
n1, n1, n1, n1, n1, n1, n3, n1, n1, n1, n1, n1, n1,
-- z=12, y=7
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=8
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
-- z=12, y=9
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
}
}

View File

@ -1 +1,2 @@
dfcaverns_fungus_footstep are from https://freesound.org/people/jakeh111/sounds/60853/ under CC-BY-SA 3.0 in 2008 by jakeh111
dfcaverns_fungus_footstep are from https://freesound.org/people/jakeh111/sounds/60853/ under CC-BY-SA 3.0 in 2008 by jakeh111
dfcaverns_spore_tree_pitter_patter are from https://freesound.org/people/martinimeniscus/sounds/199332/ by martinimeniscus under the CC0 public domain license

View File

@ -46,7 +46,7 @@ local stem_on_place = function(itemstack, placer, pointed_thing)
-- add the node and remove 1 item from the itemstack
minetest.add_node(pt.above, {name = itemstack:get_name(), param2 = new_param2})
if not minetest.setting_getbool("creative_mode") then
if not minetest.settings:get_bool("creative_mode", false) then
itemstack:take_item()
end
return itemstack
@ -64,7 +64,7 @@ minetest.register_node("df_trees:spindlestem_stem", {
description = S("Spindlestem"),
_doc_items_longdesc = df_trees.doc.spindlestem_desc,
_doc_items_usagehelp = df_trees.doc.spindlestem_usage,
is_ground_content = true,
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, spindlestem = 1},
sounds = default.node_sound_wood_defaults(),
tiles = {
@ -95,7 +95,7 @@ local register_spindlestem_type = function(item_suffix, colour_name, colour_code
minetest.register_node(cap_item, {
description = S("@1 Spindlestem Cap", colour_name),
is_ground_content = true,
is_ground_content = false,
_doc_items_longdesc = df_trees.doc["spindlestem_cap_"..item_suffix.."_desc"],
_doc_items_usagehelp = df_trees.doc["spindlestem_cap_"..item_suffix.."_usage"],
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, spindlestem = 1},
@ -149,23 +149,34 @@ local register_spindlestem_type = function(item_suffix, colour_name, colour_code
on_place = stem_on_place,
on_timer = function(pos, elapsed)
local above = vector.add(pos, {x=0,y=1,z=0})
local node_above = minetest.get_node(above)
local above_def = minetest.registered_nodes[node_above.name]
if not above_def or not above_def.buildable_to then
-- can't grow any more, exit
return
end
local meta = minetest.get_meta(pos)
local height = meta:get_int("spindlestem_to_grow")
local delay = meta:get_int("spindlestem_delay")
if delay == 0 then
delay = growth_delay() -- compatibility code to ensure no crash for previous version
end
local node = minetest.get_node(pos)
minetest.set_node(pos, {name="df_trees:spindlestem_stem", param2 = node.param2})
minetest.set_node(above, {name=cap_item, param2 = node.param2})
height = height - 1
while height > 0 and elapsed >= delay do
elapsed = elapsed - delay
local this_pos = pos
pos = vector.add(this_pos, {x=0,y=1,z=0})
local node_above = minetest.get_node(pos)
local above_def = minetest.registered_nodes[node_above.name]
if not above_def or not above_def.buildable_to then
-- can't grow any more, exit
return
end
minetest.set_node(this_pos, {name="df_trees:spindlestem_stem", param2 = node.param2})
minetest.set_node(pos, {name=cap_item, param2 = node.param2})
height = height - 1
end
if height > 0 then
meta = minetest.get_meta(above)
meta = minetest.get_meta(pos)
meta:set_int("spindlestem_to_grow", height)
minetest.get_node_timer(above):start(growth_delay())
meta:set_int("spindlestem_delay", delay)
minetest.get_node_timer(pos):start(delay-elapsed)
end
end,
})
@ -223,13 +234,6 @@ local register_spindlestem_type = function(item_suffix, colour_name, colour_code
end
end
local seedling_construct = function(pos)
local below_node = minetest.get_node(vector.add(pos, {x=0,y=-1,z=0}))
if minetest.get_item_group(below_node.name, "soil") > 0 then
minetest.get_node_timer(pos):start(growth_delay())
end
end
minetest.register_node("df_trees:spindlestem_seedling", {
description = S("Spindlestem Spawn"),
_doc_items_longdesc = df_trees.doc.spindlestem_desc,
@ -241,6 +245,7 @@ minetest.register_node("df_trees:spindlestem_seedling", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
walkable = false,
floodable = true,
node_box = {
@ -251,9 +256,21 @@ minetest.register_node("df_trees:spindlestem_seedling", {
},
on_place = stem_on_place,
on_construct = seedling_construct,
on_construct = function(pos)
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") == 0 then
return
end
minetest.get_node_timer(pos):start(growth_delay())
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
on_timer = function(pos, elapsed)
if df_farming and df_farming.kill_if_sunlit(pos) then
return
end
local cap_item = minetest.get_name_from_content_id(get_spindlestem_cap_type(pos))
local node = minetest.get_node(pos)
minetest.set_node(pos, {name=cap_item, param2 = node.param2})
@ -264,8 +281,10 @@ minetest.register_node("df_trees:spindlestem_seedling", {
local height = math.random(1,3)
if count > 10 then height = height + 2 end -- if there are a lot of nearby spindlestems, grow taller
if height > 0 then
local delay = growth_delay()
meta:set_int("spindlestem_to_grow", height)
minetest.get_node_timer(pos):start(growth_delay())
meta:set_int("spindlestem_delay", delay)
minetest.get_node_timer(pos):start(delay)
end
end,
})
@ -314,7 +333,7 @@ local c_cyan = minetest.get_content_id("df_trees:spindlestem_cap_cyan")
local c_golden = minetest.get_content_id("df_trees:spindlestem_cap_golden")
get_spindlestem_cap_type = function(pos)
if pos.y > -100 or minetest.find_node_near(pos, 15, "group:tower_cap") then
if minetest.find_node_near(pos, 15, "group:tower_cap") then
return c_white
end
if minetest.find_node_near(pos, 15, "group:goblin_cap") then
@ -330,7 +349,6 @@ get_spindlestem_cap_type = function(pos)
if copper then table.insert(possibilities, c_green) end
if iron then table.insert(possibilities, c_red) end
if iron and copper then table.insert(possibilities, c_cyan) end
if #possibilities == 0 then
return c_white
else

View File

@ -157,6 +157,7 @@ minetest.register_node("df_trees:spore_tree_sapling", {
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
floodable = true,
selection_box = {
type = "fixed",
@ -167,15 +168,21 @@ minetest.register_node("df_trees:spore_tree_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
local below_node = minetest.get_node(vector.add(pos, {x=0,y=-1,z=0}))
if minetest.get_item_group(below_node.name, "soil") > 0 then
minetest.get_node_timer(pos):start(math.random(
df_trees.config.spore_tree_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.spore_tree_delay_multiplier*df_trees.config.tree_max_growth_delay))
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") == 0 then
return
end
minetest.get_node_timer(pos):start(math.random(
df_trees.config.spore_tree_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.spore_tree_delay_multiplier*df_trees.config.tree_max_growth_delay))
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
on_timer = function(pos)
if df_farming and df_farming.kill_if_sunlit(pos) then
return
end
minetest.set_node(pos, {name="air"})
df_trees.spawn_spore_tree(pos)
end,
@ -187,7 +194,7 @@ local c_spore_pod = minetest.get_content_id("df_trees:spore_tree_fruiting_body")
local c_tree = minetest.get_content_id("df_trees:spore_tree")
local c_spore_frond = minetest.get_content_id("df_trees:spore_tree_hyphae")
df_trees.spawn_spore_tree_vm = function(vi, area, data, height, size, iters, has_fruiting_bodies)
df_trees.spawn_spore_tree_vm = function(vi, area, data, data_param2, height, size, iters, has_fruiting_bodies)
if height == nil then height = math.random(3,6) end
if size == nil then size = 2 end
if iters == nil then iters = 10 end
@ -204,6 +211,7 @@ df_trees.spawn_spore_tree_vm = function(vi, area, data, height, size, iters, has
local node_id = data[vi]
if node_id == c_air or node_id == c_ignore or node_id == c_spore_frond or node_id == c_spore_pod then
data[vi] = c_tree
data_param2[vi] = 0
end
end
@ -218,6 +226,7 @@ df_trees.spawn_spore_tree_vm = function(vi, area, data, height, size, iters, has
else
data[vi] = c_spore_frond
end
data_param2[vi] = 0
end
vi = vi + 1
end
@ -240,6 +249,7 @@ df_trees.spawn_spore_tree_vm = function(vi, area, data, height, size, iters, has
else
data[vi] = c_spore_frond
end
data_param2[vi] = 0
end
end
end
@ -258,10 +268,12 @@ df_trees.spawn_spore_tree = function(pos)
)
local area = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
local data_param_2 = vm:get_param2_data()
df_trees.spawn_spore_tree_vm(area:indexp(pos), area, data)
df_trees.spawn_spore_tree_vm(area:indexp(pos), area, data, data_param_2)
vm:set_data(data)
vm:set_param2_data(data_param_2)
vm:write_to_map()
vm:update_map()
end
@ -284,7 +296,12 @@ minetest.register_abm{
vertical = false,
texture = "dfcaverns_spore_tree_spores.png",
})
if math.random() < 0.025 then
minetest.sound_play("dfcaverns_spore_tree_pitter_patter", {
pos = pos,
gain = 0.2,
})
end
end,
}
@ -324,4 +341,3 @@ minetest.register_node("df_trees:spore_tree_ladder", {
legacy_wallmounted = true,
sounds = default.node_sound_wood_defaults(),
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 106 B

View File

@ -43,7 +43,7 @@ local stal_on_place = function(itemstack, placer, pointed_thing)
-- add the node and remove 1 item from the itemstack
minetest.add_node(pt.above, {name = itemstack:get_name(), param2 = new_param2})
if not minetest.setting_getbool("creative_mode") then
if not minetest.settings:get_bool("creative_mode", false) then
itemstack:take_item()
end
return itemstack
@ -63,13 +63,18 @@ minetest.register_node("df_trees:torchspine_1", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = true,
drops = "default:torch",
is_ground_content = false,
drop = "default:torch",
node_box = {
type = "fixed",
fixed = stal_box_1,
},
on_place = stal_on_place,
on_punch = function(pos, node, puncher)
if puncher:get_wielded_item():get_name() == "default:torch" then
minetest.swap_node(pos, {name = "df_trees:torchspine_1_lit", param2 = node.param2})
end
end,
})
minetest.register_node("df_trees:torchspine_1_lit", {
@ -81,9 +86,9 @@ minetest.register_node("df_trees:torchspine_1_lit", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
light_source = 6,
is_ground_content = true,
drops = "default:torch 2",
light_source = 8,
is_ground_content = false,
drop = "default:torch 2",
node_box = {
type = "fixed",
fixed = stal_box_1,
@ -100,7 +105,7 @@ minetest.register_node("df_trees:torchspine_2", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = true,
is_ground_content = false,
node_box = {
type = "fixed",
fixed = stal_box_2,
@ -126,7 +131,7 @@ minetest.register_node("df_trees:torchspine_3", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = true,
is_ground_content = false,
node_box = {
type = "fixed",
fixed = stal_box_3,
@ -156,7 +161,7 @@ minetest.register_node("df_trees:torchspine_4", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = true,
is_ground_content = false,
node_box = {
type = "fixed",
fixed = stal_box_4,
@ -187,6 +192,7 @@ minetest.register_node("df_trees:torchspine_ember", {
light_source = 2,
paramtype2 = "facedir",
walkable = false,
is_ground_content = false,
floodable = true,
node_box = {
type = "fixed",
@ -281,11 +287,11 @@ minetest.register_abm{
minetest.register_abm{
label = "torchspine lighting",
nodenames = {"df_trees:torchspine_1"},
interval = 57,
interval = 30,
chance = 10,
catch_up = true,
action = function(pos)
local above_def = minetest.registered_nodes[minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})]
local above_def = minetest.registered_nodes[minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name]
if above_def and above_def.buildable_to then
minetest.swap_node(pos, {name="df_trees:torchspine_1_lit", param2=minetest.get_node(pos).param2})
end
@ -295,7 +301,7 @@ local torchspine_list = {"df_trees:torchspine_1","df_trees:torchspine_2","df_tre
minetest.register_abm{
label = "torchspine growing",
nodenames = {"df_trees:torchspine_1_lit"},
interval = 30,
interval = 37,
chance = 10,
catch_up = true,
action = function(pos)
@ -329,4 +335,4 @@ minetest.register_abm{
minetest.swap_node(dest_list[i], {name=torchspine_list[i], param2=param2})
end
end,
}
}

View File

@ -8,7 +8,7 @@ minetest.register_node("df_trees:tower_cap_stem", {
_doc_items_longdesc = df_trees.doc.tower_cap_desc,
_doc_items_usagehelp = df_trees.doc.tower_cap_usage,
tiles = {"dfcaverns_tower_cap.png"},
is_ground_content = true,
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, tower_cap = 1},
sounds = df_trees.node_sound_tree_soft_fungus_defaults(),
})
@ -19,7 +19,7 @@ minetest.register_node("df_trees:tower_cap", {
_doc_items_longdesc = df_trees.doc.tower_cap_desc,
_doc_items_usagehelp = df_trees.doc.tower_cap_usage,
tiles = {"dfcaverns_tower_cap.png"},
is_ground_content = true,
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, tower_cap = 1},
sounds = df_trees.node_sound_tree_soft_fungus_defaults(),
})
@ -30,7 +30,7 @@ minetest.register_node("df_trees:tower_cap_gills", {
_doc_items_longdesc = df_trees.doc.tower_cap_desc,
_doc_items_usagehelp = df_trees.doc.tower_cap_usage,
tiles = {"dfcaverns_tower_cap_gills.png"},
is_ground_content = true,
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1, tower_cap = 1},
sounds = default.node_sound_leaves_defaults(),
drawtype = "plantlike",
@ -125,6 +125,7 @@ minetest.register_node("df_trees:tower_cap_sapling", {
wield_image = "dfcaverns_tower_cap_sapling.png",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
walkable = false,
floodable = true,
selection_box = {
@ -136,15 +137,21 @@ minetest.register_node("df_trees:tower_cap_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
local below_node = minetest.get_node(vector.add(pos, {x=0,y=-1,z=0}))
if minetest.get_item_group(below_node.name, "soil") > 0 then
minetest.get_node_timer(pos):start(math.random(
df_trees.config.tower_cap_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.tower_cap_delay_multiplier*df_trees.config.tree_max_growth_delay))
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") == 0 then
return
end
minetest.get_node_timer(pos):start(math.random(
df_trees.config.tower_cap_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.tower_cap_delay_multiplier*df_trees.config.tree_max_growth_delay))
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
on_timer = function(pos)
if df_farming and df_farming.kill_if_sunlit(pos) then
return
end
minetest.set_node(pos, {name="air"})
df_trees.spawn_tower_cap(pos)
end,

View File

@ -17,6 +17,7 @@ minetest.register_node("df_trees:tunnel_tube", {
tiles = {"dfcaverns_tunnel_tube.png"},
paramtype2 = "facedir",
drawtype = "nodebox",
is_ground_content = false,
paramtype = "light",
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
@ -40,6 +41,7 @@ minetest.register_node("df_trees:tunnel_tube_slant_bottom", {
tiles = {"dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png"},
paramtype2 = "facedir",
drawtype = "mesh",
is_ground_content = false,
mesh = "tunnel_tube_slant.obj",
paramtype = "light",
drop = "df_trees:tunnel_tube",
@ -70,6 +72,7 @@ minetest.register_node("df_trees:tunnel_tube_slant_top", {
tiles = {"dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png"},
paramtype2 = "facedir",
drawtype = "mesh",
is_ground_content = false,
mesh = "tunnel_tube_slant_2.obj",
paramtype = "light",
drop = "df_trees:tunnel_tube",
@ -99,6 +102,7 @@ minetest.register_node("df_trees:tunnel_tube_slant_full", {
tiles = {"dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png"},
paramtype2 = "facedir",
drawtype = "mesh",
is_ground_content = false,
mesh = "tunnel_tube_slant_full.obj",
paramtype = "light",
drop = "df_trees:tunnel_tube",
@ -129,6 +133,14 @@ minetest.register_craft({
}
})
-- Paper
minetest.register_craft({
output = "default:paper 3",
type = "shapeless",
recipe = {'df_trees:tunnel_tube', 'bucket:bucket_water'},
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}},
})
minetest.register_node("df_trees:tunnel_tube_wood", {
description = S("Tunnel Tube Plies"),
_doc_items_longdesc = df_trees.doc.tunnel_tube_desc,
@ -172,6 +184,7 @@ if df_trees.config.enable_tnt then
_doc_items_usagehelp = df_trees.doc.tunnel_tube_usage,
tiles = {"dfcaverns_tunnel_tube.png^[multiply:#b09090"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {choppy = 3, oddly_breakable_by_hand=1, flammable = 2, tnt = 1,},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node,
@ -227,6 +240,7 @@ if df_trees.config.enable_tnt then
_doc_items_longdesc = df_trees.doc.tunnel_tube_desc,
_doc_items_usagehelp = df_trees.doc.tunnel_tube_usage,
tiles = {"dfcaverns_tunnel_tube.png^[multiply:#b09090"},
is_ground_content = false,
groups = {not_in_creative_inventory = 1,},
light_source = 5,
drop = "",
@ -248,6 +262,7 @@ else
_doc_items_usagehelp = df_trees.doc.tunnel_tube_usage,
tiles = {"dfcaverns_tunnel_tube.png^[multiply:#b09090"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {choppy = 3, oddly_breakable_by_hand=1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node,
@ -285,6 +300,7 @@ minetest.register_node("df_trees:tunnel_tube_sapling", {
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
floodable = true,
selection_box = {
type = "fixed",
@ -295,15 +311,21 @@ minetest.register_node("df_trees:tunnel_tube_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
local below_node = minetest.get_node(vector.add(pos, {x=0,y=-1,z=0}))
if minetest.get_item_group(below_node.name, "soil") > 0 then
minetest.get_node_timer(pos):start(math.random(
df_trees.config.tunnel_tube_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.tunnel_tube_delay_multiplier*df_trees.config.tree_max_growth_delay))
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") == 0 then
return
end
minetest.get_node_timer(pos):start(math.random(
df_trees.config.tunnel_tube_delay_multiplier*df_trees.config.tree_min_growth_delay,
df_trees.config.tunnel_tube_delay_multiplier*df_trees.config.tree_max_growth_delay))
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
on_timer = function(pos)
if df_farming and df_farming.kill_if_sunlit(pos) then
return
end
minetest.set_node(pos, {name="air"})
df_trees.spawn_tunnel_tube(pos)
end,
@ -385,6 +407,10 @@ df_trees.spawn_tunnel_tube_vm = function(vi, area, data, param2_data, height, di
local previous_vi = vi
local pattern = tunnel_tube_patterns[height]
if pattern == nil then
minetest.log("error", "Tunnel tube pattern was nil somehow. height: " .. string(height) .. " location: " .. minetest.pos_to_string(area:position(vi)))
return nil
end
for i, nodepattern in ipairs(pattern) do
local current_vi = vi + nodepattern[1] * increment
if data[current_vi] == c_air or data[current_vi] == c_ignore then