many worldgen mods and gonna try technic now

This commit is contained in:
tangent committed 2026-09-13 03:30:48 -06:00
1 parent bac6ac94a3
commit 548749cb1a
4811 files changed
+163271 -1

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
Dwarf Fortress is copyright 2018 by Tarn Adams. This mod uses no assets or other copyrighted materials from Dwarf Fortress.
Sounds and textures are under various licenses, see the license.txt file in the /sounds and /textures directories for details.
License for Code
----------------
Copyright (C) 2018 FaceDeer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+44
View File
@@ -0,0 +1,44 @@
minetest.register_alias("dfcaverns:black_cap" , "df_trees:black_cap" )
minetest.register_alias("dfcaverns:black_cap_gills" , "df_trees:black_cap_gills" )
minetest.register_alias("dfcaverns:black_cap_sapling" , "df_trees:black_cap_sapling" )
minetest.register_alias("dfcaverns:black_cap_stem" , "df_trees:black_cap_stem" )
minetest.register_alias("dfcaverns:black_cap_wood" , "df_trees:black_cap_wood" )
minetest.register_alias("dfcaverns:blood_thorn" , "df_trees:blood_thorn" )
minetest.register_alias("dfcaverns:blood_thorn_dead" , "df_trees:blood_thorn_dead" )
minetest.register_alias("dfcaverns:blood_thorn_spike" , "df_trees:blood_thorn_spike" )
minetest.register_alias("dfcaverns:blood_thorn_spike_dead" , "df_trees:blood_thorn_spike_dead" )
minetest.register_alias("dfcaverns:blood_thorn_wood" , "df_trees:blood_thorn_wood" )
minetest.register_alias("dfcaverns:fungiwood" , "df_trees:fungiwood" )
minetest.register_alias("dfcaverns:fungiwood_sapling" , "df_trees:fungiwood_sapling" )
minetest.register_alias("dfcaverns:fungiwood_shelf" , "df_trees:fungiwood_shelf" )
minetest.register_alias("dfcaverns:fungiwood_wood" , "df_trees:fungiwood_wood" )
minetest.register_alias("dfcaverns:goblin_cap" , "df_trees:goblin_cap" )
minetest.register_alias("dfcaverns:goblin_cap_gills" , "df_trees:goblin_cap_gills" )
minetest.register_alias("dfcaverns:goblin_cap_sapling" , "df_trees:goblin_cap_sapling" )
minetest.register_alias("dfcaverns:goblin_cap_stem" , "df_trees:goblin_cap_stem" )
minetest.register_alias("dfcaverns:goblin_cap_stem_wood" , "df_trees:goblin_cap_stem_wood" )
minetest.register_alias("dfcaverns:goblin_cap_wood" , "df_trees:goblin_cap_wood" )
minetest.register_alias("dfcaverns:nether_cap" , "df_trees:nether_cap" )
minetest.register_alias("dfcaverns:nether_cap_gills" , "df_trees:nether_cap_gills" )
minetest.register_alias("dfcaverns:nether_cap_sapling" , "df_trees:nether_cap_sapling" )
minetest.register_alias("dfcaverns:nether_cap_stem" , "df_trees:nether_cap_stem" )
minetest.register_alias("dfcaverns:nether_cap_wood" , "df_trees:nether_cap_wood" )
minetest.register_alias("dfcaverns:spore_tree" , "df_trees:spore_tree" )
minetest.register_alias("dfcaverns:spore_tree_fruiting_body" , "df_trees:spore_tree_fruiting_body" )
minetest.register_alias("dfcaverns:spore_tree_hyphae" , "df_trees:spore_tree_hyphae" )
minetest.register_alias("dfcaverns:spore_tree_ladder" , "df_trees:spore_tree_ladder" )
minetest.register_alias("dfcaverns:spore_tree_sapling" , "df_trees:spore_tree_sapling" )
minetest.register_alias("dfcaverns:spore_tree_wood" , "df_trees:spore_tree_wood" )
minetest.register_alias("dfcaverns:tower_cap" , "df_trees:tower_cap" )
minetest.register_alias("dfcaverns:tower_cap_gills" , "df_trees:tower_cap_gills" )
minetest.register_alias("dfcaverns:tower_cap_sapling" , "df_trees:tower_cap_sapling" )
minetest.register_alias("dfcaverns:tower_cap_stem" , "df_trees:tower_cap_stem" )
minetest.register_alias("dfcaverns:tower_cap_wood" , "df_trees:tower_cap_wood" )
minetest.register_alias("dfcaverns:tunnel_tube" , "df_trees:tunnel_tube" )
minetest.register_alias("dfcaverns:tunnel_tube_fruiting_body" , "df_trees:tunnel_tube_fruiting_body" )
minetest.register_alias("dfcaverns:tunnel_tube_fruiting_body_burning", "df_trees:tunnel_tube_fruiting_body_burning")
minetest.register_alias("dfcaverns:tunnel_tube_sapling" , "df_trees:tunnel_tube_sapling" )
minetest.register_alias("dfcaverns:tunnel_tube_slant_bottom" , "df_trees:tunnel_tube_slant_bottom" )
minetest.register_alias("dfcaverns:tunnel_tube_slant_full" , "df_trees:tunnel_tube_slant_full" )
minetest.register_alias("dfcaverns:tunnel_tube_slant_top" , "df_trees:tunnel_tube_slant_top" )
minetest.register_alias("dfcaverns:tunnel_tube_wood" , "df_trees:tunnel_tube_wood" )
+214
View File
@@ -0,0 +1,214 @@
local S = minetest.get_translator(minetest.get_current_modname())
--stem
minetest.register_node("df_trees:black_cap_stem", {
description = S("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 = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
})
--cap
minetest.register_node("df_trees:black_cap", {
description = S("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 = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
})
--gills
minetest.register_node("df_trees:black_cap_gills", {
description = S("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 = false,
groups = {snappy = 3, leafdecay = 1, flammable = 2, leaves = 1,handy=1, hoey=1, shearsy=1, swordy=1, deco_block=1, dig_by_piston=1, fire_encouragement=15, fire_flammability=30, compostability=30},
sounds = df_dependencies.sound_leaves(),
drawtype = "plantlike",
paramtype = "light",
drop = {
max_items = 1,
items = {
{
items = {'df_trees:black_cap_sapling', 'df_trees:black_cap_gills'},
rarity = 5,
},
{
items = {'df_trees:black_cap_gills'},
}
}
},
after_place_node = df_dependencies.after_place_leaves,
place_param2 = 1, -- Prevent leafdecay for placed nodes
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
})
df_dependencies.register_leafdecay({
trunks = {"df_trees:black_cap"}, -- don't need stem nodes here
leaves = {"df_trees:black_cap_gills"},
radius = 1,
})
-- Wood
minetest.register_craft({
output = 'df_trees:black_cap_wood 4',
recipe = {
{'df_trees:black_cap'},
}
})
minetest.register_craft({
output = 'df_trees:black_cap_wood 4',
recipe = {
{'df_trees:black_cap_stem'},
}
})
minetest.register_craft({
output = df_dependencies.node_name_torch .. ' 8',
recipe = {
{'df_trees:black_cap_gills'},
{'group:stick'},
}
})
if minetest.get_modpath("basic_materials") then
minetest.register_craft({
type = "cooking",
output = "basic_materials:paraffin",
recipe = "df_trees:black_cap_gills",
cooktime = 5,
})
end
minetest.register_node("df_trees:black_cap_wood", {
description = S("Black Cap Planks"),
_doc_items_longdesc = df_trees.doc.black_cap_desc,
_doc_items_usagehelp = df_trees.doc.black_cap_usage,
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"dfcaverns_black_cap_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 5,
_mcl_hardness = 5,
})
df_dependencies.register_all_stairs_and_fences("black_cap_wood", {burntime = 30})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:black_cap_wood",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:black_cap",
burntime = 120,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:black_cap_stem",
burntime = 120,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:black_cap_gills",
burntime = 6,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:black_cap_sapling",
burntime = 6,
})
-- sapling
minetest.register_node("df_trees:black_cap_sapling", {
description = S("Black Cap Spawn"),
_doc_items_longdesc = df_trees.doc.black_cap_desc,
_doc_items_usagehelp = df_trees.doc.black_cap_usage,
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"dfcaverns_black_cap_sapling.png"},
inventory_image = "dfcaverns_black_cap_sapling.png",
wield_image = "dfcaverns_black_cap_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
floodable = true,
selection_box = {
type = "fixed",
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1, light_sensitive_fungus = 11, dig_immediate=3,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
sounds = df_dependencies.sound_leaves(),
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_construct = function(pos)
if df_trees.black_cap_growth_permitted(pos) 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)
if df_farming and df_farming.kill_if_sunlit(pos) then
return
end
minetest.set_node(pos, {name="air"})
df_trees.spawn_black_cap(pos)
end,
})
local c_stem = minetest.get_content_id("df_trees:black_cap_stem")
local c_cap = minetest.get_content_id("df_trees:black_cap")
local c_gills = minetest.get_content_id("df_trees:black_cap_gills")
df_trees.spawn_black_cap = function(pos)
local x, y, z = pos.x, pos.y, pos.z
local stem_height = math.random(1,5)
local cap_radius = math.random(2,3)
local maxy = y + stem_height + 3
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(
{x = x - cap_radius, y = y, z = z - cap_radius},
{x = x + cap_radius, y = maxy + 3, z = z + cap_radius}
)
local area = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
subterrane.giant_mushroom(area:indexp(pos), area, data, c_stem, c_cap, c_gills, stem_height, cap_radius)
vm:set_data(data)
vm:write_to_map()
vm:update_map()
end
df_trees.spawn_black_cap_vm = function(vi, area, data)
local stem_height = math.random(1,5)
local cap_radius = math.random(2,3)
subterrane.giant_mushroom(vi, area, data, c_stem, c_cap, c_gills, stem_height, cap_radius)
end
+342
View File
@@ -0,0 +1,342 @@
--------------------------------------------------
-- Blood thorn
-- Max trunk height 5
-- red with purple mottling
-- High density wood
-- Depth 3
local S = minetest.get_translator(minetest.get_current_modname())
local spike_directions = {
{dir={x=0,y=0,z=1}, facedir=2},
{dir={x=0,y=0,z=-1}, facedir=0},
{dir={x=1,y=0,z=0}, facedir=3},
{dir={x=-1,y=0,z=0}, facedir=1}
}
local spikes = {["df_trees:blood_thorn_spike"] = true, ["df_trees:blood_thorn_spike_dead"] = true}
local blood_thorn_after_dig = function(pos, oldnode, oldmetadata, digger)
for _, spike_dir in pairs(spike_directions) do
local loc = vector.add(pos,spike_dir.dir)
local node = minetest.get_node(loc)
if spikes[node.name] and spike_dir.facedir == node.param2 then
minetest.node_dig(loc, node, digger)
end
end
end
local blood_thorn_min_delay = df_trees.config.blood_thorn_delay_multiplier*df_trees.config.tree_min_growth_delay
local blood_thorn_max_delay = df_trees.config.blood_thorn_delay_multiplier*df_trees.config.tree_max_growth_delay
minetest.register_node("df_trees:blood_thorn", {
description = S("Blood Thorn Stem"),
_doc_items_longdesc = df_trees.doc.blood_thorn_desc,
_doc_items_usagehelp = df_trees.doc.blood_thorn_usage,
tiles = {"dfcaverns_blood_thorn_top.png", "dfcaverns_blood_thorn_top.png",
"dfcaverns_blood_thorn_side.png", "dfcaverns_blood_thorn_side.png", "dfcaverns_blood_thorn_side.png", "dfcaverns_blood_thorn_side.png"},
paramtype2 = "facedir",
paramtype = "light",
groups = {choppy = 3, tree = 1, flammable = 2, light_sensitive_fungus = 11, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5, opaque=1},
_dfcaverns_dead_node = "df_trees:blood_thorn_dead",
sounds = df_dependencies.sound_wood(),
is_ground_content = false,
on_place = minetest.rotate_node,
after_dig_node = blood_thorn_after_dig,
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
on_construct = function(pos)
if not df_trees.blood_thorn_growth_permitted(pos) then
return
end
minetest.get_node_timer(pos):start(math.random(blood_thorn_min_delay, blood_thorn_max_delay))
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
local below = {x=pos.x, y=pos.y-1, z=pos.z}
local below_node = minetest.get_node(below)
while below_node.name == "df_trees:blood_thorn" do
-- if you chop down a bloodthorn it can start growing again
minetest.get_node_timer(below):start(math.random(blood_thorn_min_delay, blood_thorn_max_delay))
below.y = below.y-1
below_node = minetest.get_node(below)
end
end,
on_timer = function(pos, elapsed)
while elapsed > blood_thorn_max_delay do
-- catch up if the block was unloaded for a long time
elapsed = elapsed - blood_thorn_max_delay
if not df_trees.grow_blood_thorn(vector.new(pos), minetest.get_node(pos)) then
return
end
end
if df_trees.grow_blood_thorn(vector.new(pos), minetest.get_node(pos)) then
minetest.get_node_timer(pos):start(math.random(blood_thorn_min_delay, blood_thorn_max_delay))
end
end,
})
minetest.register_node("df_trees:blood_thorn_dead", {
description = S("Dead Blood Thorn Stem"),
_doc_items_longdesc = df_trees.doc.blood_thorn_desc,
_doc_items_usagehelp = df_trees.doc.blood_thorn_usage,
tiles = {"dfcaverns_blood_thorn_top.png^[multiply:#804000", "dfcaverns_blood_thorn_top.png^[multiply:#804000",
"dfcaverns_blood_thorn_side.png^[multiply:#804000"},
paramtype2 = "facedir",
paramtype = "light",
groups = {choppy = 3, tree = 1, flammable = 2, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
is_ground_content = false,
on_place = minetest.rotate_node,
after_dig_node = blood_thorn_after_dig,
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
})
minetest.register_node("df_trees:blood_thorn_spike", {
description = S("Blood Thorn Spike"),
_doc_items_longdesc = df_trees.doc.blood_thorn_spike_desc,
_doc_items_usagehelp = df_trees.doc.blood_thorn_spike_usage,
tiles = {
"dfcaverns_blood_thorn_spike_side.png^[transformR90",
"dfcaverns_blood_thorn_spike_side.png^[transformR270",
"dfcaverns_blood_thorn_spike_side.png",
"dfcaverns_blood_thorn_spike_side.png^[transformR180",
"dfcaverns_blood_thorn_spike_front.png",
"dfcaverns_blood_thorn_spike_front.png"
},
groups = {choppy = 3, flammable = 2, fall_damage_add_percent=100, light_sensitive_fungus = 11, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
_dfcaverns_dead_node = "df_trees:blood_thorn_spike_dead",
sounds = df_dependencies.sound_wood(),
drawtype = "nodebox",
climbable = true,
is_ground_content = false,
damage_per_second = 1,
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.1875, 0.1875, 0.1875, 0.1875, 0.5}, -- base
{-0.125, -0.125, -0.125, 0.125, 0.125, 0.1875}, -- mid
{-0.0625, -0.0625, -0.5, 0.0625, 0.0625, -0.125}, -- tip
}
},
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
})
minetest.register_node("df_trees:blood_thorn_spike_dead", {
description = S("Dead Blood Thorn Spike"),
_doc_items_longdesc = df_trees.doc.blood_thorn_spike_desc,
_doc_items_usagehelp = df_trees.doc.blood_thorn_spike_usage,
tiles = {
"dfcaverns_blood_thorn_spike_side.png^[transformR90^[multiply:#804000",
"dfcaverns_blood_thorn_spike_side.png^[transformR270^[multiply:#804000",
"dfcaverns_blood_thorn_spike_side.png^[multiply:#804000",
"dfcaverns_blood_thorn_spike_side.png^[transformR180^[multiply:#804000",
"dfcaverns_blood_thorn_spike_front.png^[multiply:#804000",
"dfcaverns_blood_thorn_spike_front.png^[multiply:#804000"
},
groups = {choppy = 3, flammable = 2, fall_damage_add_percent=100, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
drawtype = "nodebox",
climbable = true,
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.1875, 0.1875, 0.1875, 0.1875, 0.5}, -- base
{-0.125, -0.125, -0.125, 0.125, 0.125, 0.1875}, -- mid
{-0.0625, -0.0625, -0.5, 0.0625, 0.0625, -0.125}, -- tip
}
},
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
})
--Wood
minetest.register_craft({
output = 'df_trees:blood_thorn_wood 4',
recipe = {
{'df_trees:blood_thorn'},
}
})
minetest.register_craft({
output = 'df_trees:blood_thorn_wood 4',
recipe = {
{'df_trees:blood_thorn_dead'},
}
})
minetest.register_node("df_trees:blood_thorn_wood", {
description = S("Blood Thorn Planks"),
_doc_items_longdesc = df_trees.doc.blood_thorn_desc,
_doc_items_usagehelp = df_trees.doc.blood_thorn_usage,
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"dfcaverns_blood_thorn_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 2,
_mcl_hardness = 1,
})
df_dependencies.register_all_stairs_and_fences("blood_thorn_wood", {burntime = 40})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:blood_thorn_wood",
burntime = 40,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:blood_thorn",
burntime = 150,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:blood_thorn_dead",
burntime = 120,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:blood_thorn_spike",
burntime = 5,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:blood_thorn_spike_dead",
burntime = 5,
})
-- This ensures consistent random maximum to bloodthorn growth
local max_bloodthorn_height = function(pos)
local next_seed = math.floor(math.random() * 2^31)
math.randomseed(pos.x + pos.z * 2 ^ 8)
local output = math.random(3,6)
math.randomseed(next_seed)
return output
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
local height = 0
local max_height = max_bloodthorn_height(pos)
while node.name == "df_trees:blood_thorn" and height < max_height do
height = height + 1
pos.y = pos.y + 1
node = minetest.get_node(pos)
end
if height == 7 or node.name ~= "air" then
return
end
minetest.set_node(pos, {name = "df_trees:blood_thorn"})
local dir = spike_directions[math.random(1,4)]
local spike_pos = vector.add(pos, dir.dir)
if minetest.get_node(spike_pos).name == "air" then
minetest.set_node(spike_pos, {name="df_trees:blood_thorn_spike", param2=dir.facedir})
end
dir = spike_directions[math.random(1,4)]
spike_pos = vector.add(pos, dir.dir)
if minetest.get_node(spike_pos).name == "air" then
minetest.set_node(spike_pos, {name="df_trees:blood_thorn_spike", param2=dir.facedir})
end
return true
end
minetest.register_lbm({
label = "Start timers for bloodthorn nodes that used to depend on the ABM",
name = "df_trees:start_bloodthorn_timers",
nodenames = {"df_trees:blood_thorn"},
run_at_every_load = false,
action = function(pos, node)
minetest.get_node_timer(pos):start(math.random(blood_thorn_min_delay, blood_thorn_max_delay))
end,
})
function df_trees.spawn_blood_thorn(pos)
local height = max_bloodthorn_height(pos)
local x, y, z = pos.x, pos.y, pos.z
local maxy = y + height -- Trunk top
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(
{x = x - 1, y = y, z = z - 1},
{x = x + 1, y = maxy, z = z + 1}
)
local area = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
local data_param2 = vm:get_param2_data()
df_trees.spawn_blood_thorn_vm(area:indexp(pos), area, data, data_param2, height)
vm:set_data(data)
vm:set_param2_data(data_param2)
vm:write_to_map()
vm:update_map()
end
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
local c_blood_thorn = minetest.get_content_id("df_trees:blood_thorn")
local c_blood_thorn_spike = minetest.get_content_id("df_trees:blood_thorn_spike")
local facedir_to_increment = function(direction, area)
if direction == 0 then
return -area.zstride
elseif direction == 1 then
return -1
elseif direction == 2 then
return area.zstride
elseif direction == 3 then
return 1
end
end
df_trees.spawn_blood_thorn_vm = function(vi, area, data, data_param2, height)
local pos = area:position(vi)
if height == nil then height = max_bloodthorn_height(pos) end
for i = 1, height do
local node_id = data[vi]
if node_id == c_air or node_id == c_ignore then
data[vi] = c_blood_thorn
for i = 1, 2 do
local facedir = math.random(1,4)-1
local spike_vi = vi + facedir_to_increment(facedir, area)
if data[spike_vi] == c_air or data[spike_vi] == c_ignore then
data[spike_vi] = c_blood_thorn_spike
data_param2[spike_vi] = facedir
end
end
else
break
end
vi = vi + area.ystride
end
end
+53
View File
@@ -0,0 +1,53 @@
local CONFIG_FILE_PREFIX = "dfcaverns_"
df_trees.config = {}
local print_settingtypes = false
local function setting(stype, name, default, description)
local value
if stype == "bool" then
value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name, default)
elseif stype == "string" then
value = minetest.settings:get(CONFIG_FILE_PREFIX..name)
elseif stype == "int" or stype == "float" then
value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name))
end
if value == nil then
value = default
end
df_trees.config[name] = value
if print_settingtypes then
minetest.debug(CONFIG_FILE_PREFIX..name.." ("..description..") "..stype.." "..tostring(default))
end
end
local trees = {
{name="fungiwood", delay_multiplier = 1},
{name="tunnel_tube", delay_multiplier = 1},
{name="spore_tree", delay_multiplier = 1},
{name="black_cap", delay_multiplier = 1},
{name="nether_cap", delay_multiplier = 1},
{name="goblin_cap", delay_multiplier = 1},
{name="tower_cap", delay_multiplier = 1},
{name="blood_thorn", delay_multiplier = 1},
}
--Trees
setting("int", "tree_min_growth_delay", 2400, "Minimum sapling growth delay")
setting("int", "tree_max_growth_delay", 4800, "Maximum sapling growth delay")
for _, tree in pairs(trees) do
setting("float", tree.name.."_delay_multiplier", tree.delay_multiplier, tree.name.." growth delay multiplier")
end
-- TODO: mineclone settings
if df_dependencies.tnt_boom then
df_trees.config.enable_tnt = minetest.settings:get_bool("enable_tnt")
if df_trees.config.enable_tnt == nil then
-- Default to enabled when in singleplayer
df_trees.config.enable_tnt = minetest.is_singleplayer()
end
end
+71
View File
@@ -0,0 +1,71 @@
df_trees.doc = {}
local nethercap_name = df_dependencies.nethercap_name
if not minetest.get_modpath("doc") then
return
end
local S = minetest.get_translator(minetest.get_current_modname())
-- Trees
df_trees.doc.black_cap_desc = S("The dense black wood of these mushrooms is heavy and hard to work with, and has few remarkable properties.")
df_trees.doc.black_cap_usage = S("Aside from the artistic applications of its particularly dark color, black cap wood is a long-burning fuel source that's as good as coal for some applications. Black cap gills are oily and make for excellent torch fuel.")
df_trees.doc.blood_thorn_desc = S("Blood thorns are the most vicious of underground flora, as befits their harsh environments. Found only in hot, dry caverns with sandy soil far from the surface world's organic bounty, blood thorns seek to supplement their nutrient supply with wickedly barbed hollow spines that actively drain fluids from whatever stray plant or creature they might impale.")
df_trees.doc.blood_thorn_usage = S("When harvested, the central stalk of a blood thorn can be cut into planks and used as wood. It has a purple-red hue that may or may not appeal, depending on one's artistic tastes.")
df_trees.doc.blood_thorn_spike_desc = S("The spikes of a blood thorn can actually remain living long after they're severed from their parent stalk, a testament to their tenacity. As long as they remain alive they will continue to actively drain anything they puncture, though they don't grow.")
df_trees.doc.blood_thorn_spike_usage = S("Living blood thorn spikes remain harmful to creatures that touch them. If killed by bright light, they cause only passive damage to creatures that fall on them (as one would expect from an enormous spike).")
df_trees.doc.fungiwood_desc = S("Thin, irregular layers of spore-producing 'shelves' surround the strong central stalk of the mighty Fungiwood.")
df_trees.doc.fungiwood_usage = S("Fungiwood stalk is strong and very fine-grained, making smooth yellow-tinted lumber when cut. Fungiwood shelf is too fragile to be much use as anything other than fuel.")
df_trees.doc.goblin_cap_desc = S("Massive but squat, mature goblin cap mushrooms are the size of small cottages.")
df_trees.doc.goblin_cap_usage = S("Goblin cap stem and cap material can be cut into wood of two different hues, a subdued cream and a bright orange-red.")
df_trees.doc.nether_cap_desc = S("@1 have an unusual biochemistry that allows them to somehow subsist on ambient heat, in violation of all known laws of thermodynamics. They grow deep underground in frigid, icy caverns that should by all rights be volcanic.", nethercap_name)
df_trees.doc.nether_cap_usage = S("@1 wood, in addition to being a beautiful blue hue, retains the odd heat-draining ability of living icecaps and is able to quickly freeze nearby water solid.", nethercap_name)
df_trees.doc.spore_tree_desc = S("Spore trees have a sturdy 'trunk' that supports a large spongy mesh of branching fibers, with embedded fruiting bodies that produce a copious amount of spores that gently rain down around the spore tree's base.")
df_trees.doc.spore_tree_usage = S("Spore tree trunks can be cut into pale woody planks. The branching fibers and fruiting bodies are only useful as fuel.")
df_trees.doc.tower_cap_desc = S("The king of the fungi, tower cap mushrooms grow to immense proportions.")
df_trees.doc.tower_cap_usage = S("Tower caps are an excellent source of wood.")
df_trees.doc.tunnel_tube_desc = S("Tunnel tubes are hollow, curved fungal growths that support a fruiting body.")
if df_trees.config.enable_tnt then
df_trees.doc.tunnel_tube_usage = S("The trunk of a tunnel tube can be cut and processed to produce plywood-like material. The fruiting body accumulates high-energy compounds that, when ignited, produce a vigorous detonation - a unique adaptation for spreading tunnel tube spawn through the still cavern air.")
else
df_trees.doc.tunnel_tube_usage = S("The trunk of a tunnel tube can be cut and processed to produce plywood-like material.")
end
df_trees.doc.torchspine_desc = S("Torchspines are strange organic formations that are alive only in a technical sense. They \"feed\" on volatile flammable vapors vented up through their structure, growing from combustion residue deposited at their tips.")
df_trees.doc.torchspine_usage = S("A torchspine alternates between active and quiescent phases and emits dim light when active. They can be harvested for torches, and their embers sprout into new torchspines when placed on flammable surfaces.")
df_trees.doc.spindlestem_desc = S("Spindlestems are too big to easily pluck by hand but too small to be called a proper tree. Nevertheless, they are a common and useful resource for underground travelers - particularly their glowing caps.")
df_trees.doc.spindlestem_usage = S("The stem of a Spindlestem is surprisingly sturdy, and despite their thinness they can grow quite tall. They can be used as a wood substitute in many crafting recipes.")
df_trees.doc.spindlestem_cap_white_desc = S("The cap of a Spindlestem, uncontaminated by any symbiotic luminescent microorganisms.")
df_trees.doc.spindlestem_cap_white_usage = S("These things are useless except as weak fuel for a fire.")
df_trees.doc.spindlestem_cap_red_desc = S("The cap of a Spindlestem, glowing a weak red due to symbiotic microorganisms.")
df_trees.doc.spindlestem_cap_red_usage = S("Red Spindlestems are a sign of nearby iron deposits - or perhaps Goblin Caps. Their glowing symbiotes can be extracted as a long-lived light source, though the glow is weak.")
df_trees.doc.spindlestem_cap_green_desc = S("The cap of a Spindlestem, glowing a soft green due to symbiotic microorganisms.")
df_trees.doc.spindlestem_cap_green_usage = S("Green Spindlestems are a sign of nearby copper deposits. Their glowing symbiotes can be extracted as a long-lived light source, though the glow is not strong.")
df_trees.doc.spindlestem_cap_cyan_desc = S("The cap of a Spindlestem, glowing a strong cyan due to symbiotic microorganisms.")
df_trees.doc.spindlestem_cap_cyan_usage = S("Cyan Spindlestems are a sign of both copper and iron deposits nearby. Their glowing symbiotes can be extracted as a long-lived light source.")
df_trees.doc.spindlestem_cap_golden_desc = S("The cap of a Spindlestem, glowing a brilliant yellow due to symbiotic microorganisms.")
df_trees.doc.spindlestem_cap_golden_usage = S("Golden Spindlestems are a sign of rare and magical mineral deposits nearby. Their glowing symbiotes can be extracted as a strong and long-lived light source.")
df_trees.doc.spindlestem_extract_red_desc = S("Living extract from the cap of a red Spindlestem.")
df_trees.doc.spindlestem_extract_red_usage = df_trees.doc.spindlestem_cap_red_usage
df_trees.doc.spindlestem_extract_green_desc = S("Living extract from the cap of a green Spindlestem.")
df_trees.doc.spindlestem_extract_green_usage = df_trees.doc.spindlestem_cap_green_usage
df_trees.doc.spindlestem_extract_cyan_desc = S("Living extract from the cap of a cyan Spindlestem.")
df_trees.doc.spindlestem_extract_cyan_usage = df_trees.doc.spindlestem_cap_cyan_usage
df_trees.doc.spindlestem_extract_golden_desc = S("Living extract from the cap of a yellow Spindlestem.")
df_trees.doc.spindlestem_extract_golden_usage = df_trees.doc.spindlestem_cap_golden_usage
+238
View File
@@ -0,0 +1,238 @@
--------------------------------------------------
-- Fungiwood
-- fine grain
-- Max trunk height 8
-- depth 1-2
local S = minetest.get_translator(minetest.get_current_modname())
minetest.register_node("df_trees:fungiwood", {
description = S("Fungiwood Stem"),
_doc_items_longdesc = df_trees.doc.fungiwood_desc,
_doc_items_usagehelp = df_trees.doc.fungiwood_usage,
tiles = {"dfcaverns_fungiwood.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
on_place = minetest.rotate_node
})
--Wood
minetest.register_craft({
output = 'df_trees:fungiwood_wood 4',
recipe = {
{'df_trees:fungiwood'},
}
})
minetest.register_node("df_trees:fungiwood_wood", {
description = S("Fungiwood Planks"),
_doc_items_longdesc = df_trees.doc.fungiwood_desc,
_doc_items_usagehelp = df_trees.doc.fungiwood_usage,
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"dfcaverns_fungiwood_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 3,
_mcl_hardness = 2,
})
df_dependencies.register_all_stairs_and_fences("fungiwood_wood", {burntime = 7})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:fungiwood_wood",
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:fungiwood",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:fungiwood_shelf",
burntime = 3,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:fungiwood_sapling",
burntime = 2,
})
minetest.register_node("df_trees:fungiwood_shelf",{
description = S("Fungiwood Shelf"),
_doc_items_longdesc = df_trees.doc.fungiwood_desc,
_doc_items_usagehelp = df_trees.doc.fungiwood_usage,
tiles = {"dfcaverns_fungiwood.png", "dfcaverns_fungiwood_shelf_underside.png", "dfcaverns_fungiwood.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, -- NodeBox1
{-0.5, 0.3125, -0.0625, 0.5, 0.375, 0.0625}, -- NodeBox2
{-0.0625, 0.3125, -0.5, 0.0625, 0.375, 0.5}, -- NodeBox3
}
},
is_ground_content = false,
groups = {snappy = 3, leafdecay = 5, flammable = 2, leaves = 1,handy=1, hoey=1, shearsy=1, swordy=1, deco_block=1, dig_by_piston=1, fire_encouragement=15, fire_flammability=30, compostability=30},
drop = {
max_items = 1,
items = {
{items = {"df_trees:fungiwood_sapling"}, rarity = 10},
{items = {"df_trees:fungiwood_shelf"}}
}
},
sounds = df_dependencies.sound_leaves(),
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
after_place_node = df_dependencies.after_place_leaves,
place_param2 = 1, -- Prevent leafdecay for placed nodes
})
df_dependencies.register_leafdecay({
trunks = {"df_trees:fungiwood"},
leaves = {"df_trees:fungiwood_shelf"},
radius = 5,
})
minetest.register_node("df_trees:fungiwood_sapling", {
description = S("Fungiwood Spawn"),
_doc_items_longdesc = df_trees.doc.fungiwood_desc,
_doc_items_usagehelp = df_trees.doc.fungiwood_usage,
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"dfcaverns_fungiwood_sapling.png"},
inventory_image = "dfcaverns_fungiwood_sapling.png",
wield_image = "dfcaverns_fungiwood_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
floodable = true,
selection_box = {
type = "fixed",
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1, light_sensitive_fungus = 11, dig_immediate=3,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
sounds = df_dependencies.sound_leaves(),
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
on_construct = function(pos)
if df_trees.fungiwood_growth_permitted(pos) 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))
end
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,
})
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
local c_fungiwood = minetest.get_content_id("df_trees:fungiwood")
local c_fungiwood_shelf = minetest.get_content_id("df_trees:fungiwood_shelf")
function df_trees.spawn_fungiwood(pos)
local x, y, z = pos.x, pos.y, pos.z
local height = math.random(6, 10)
local maxy = y + height -- Trunk top
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(
{x = x - 3, y = y, z = z - 3},
{x = x + 3, y = maxy, z = z + 3}
)
local area = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
df_trees.spawn_fungiwood_vm(area:indexp(pos), area, data, height)
vm:set_data(data)
vm:write_to_map()
vm:update_map()
end
df_trees.spawn_fungiwood_vm = function(vi, area, data, height)
if height == nil then height = math.random(6, 10) end
local pos = area:position(vi)
local x = pos.x
local y = pos.y
local z = pos.z
local maxy = y + height -- Trunk top
-- Upper branches layer
local dev = 3
for yy = maxy - 2, maxy do
for zz = z - dev, z + dev do
local vi = area:index(x - dev, yy, zz)
local via = area:index(x - dev, yy + 1, zz)
for xx = x - dev, x + dev do
if math.random() < 0.95 - dev * 0.05 then
local node_id = data[vi]
if node_id == c_air or node_id == c_ignore then
data[vi] = c_fungiwood_shelf
end
end
vi = vi + 1
via = via + 1
end
end
dev = dev - 1
end
-- Lower branches layer
local my = 0
for i = 1, 20 do -- Random 2x2 squares of shelf
local xi = x + math.random(-3, 2)
local yy = maxy + math.random(-6, -5)
local zi = z + math.random(-3, 2)
if yy > my then
my = yy
end
for zz = zi, zi+1 do
local vi = area:index(xi, yy, zz)
local via = area:index(xi, yy + 1, zz)
for xx = xi, xi + 1 do
local node_id = data[vi]
if node_id == c_air or node_id == c_ignore then
data[vi] = c_fungiwood_shelf
end
vi = vi + 1
via = via + 1
end
end
end
-- Trunk
for yy = y, maxy do
local vi = area:index(x, yy, z)
local node_id = data[vi]
if node_id == c_air or node_id == c_ignore or
node_id == c_fungiwood_shelf then
data[vi] = c_fungiwood
end
end
end
+322
View File
@@ -0,0 +1,322 @@
local modpath = minetest.get_modpath(minetest.get_current_modname())
local S = minetest.get_translator(minetest.get_current_modname())
local log_location
if minetest.get_modpath("mapgen_helper") and mapgen_helper.log_location_enabled then
log_location = mapgen_helper.log_first_location
end
--stem
minetest.register_node("df_trees:goblin_cap_stem", {
description = S("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 = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, goblin_cap = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_trees.node_sound_tree_soft_fungus_defaults(),
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
--cap
minetest.register_node("df_trees:goblin_cap", {
description = S("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 = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, goblin_cap = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_trees.node_sound_tree_soft_fungus_defaults(),
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
--gills
minetest.register_node("df_trees:goblin_cap_gills", {
description = S("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 = false,
groups = {snappy = 3, leafdecay = 1, flammable = 2, leaves = 1, goblin_cap = 1,handy=1, hoey=1, shearsy=1, swordy=1, deco_block=1, dig_by_piston=1, fire_encouragement=15, fire_flammability=30, compostability=30},
sounds = df_dependencies.sound_leaves(),
drawtype = "plantlike",
paramtype = "light",
drop = {
max_items = 1,
items = {
{
items = {'df_trees:goblin_cap_sapling'},
rarity = 15,
},
{
items = {'df_trees:goblin_cap_gills'},
}
}
},
after_place_node = df_dependencies.after_place_leaves,
place_param2 = 1, -- Prevent leafdecay for placed nodes
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
})
df_dependencies.register_leafdecay({
trunks = {"df_trees:goblin_cap"}, -- don't need stem nodes here
leaves = {"df_trees:goblin_cap_gills"},
radius = 1,
})
--Wood
minetest.register_craft({
output = 'df_trees:goblin_cap_wood 4',
recipe = {
{'df_trees:goblin_cap'},
}
})
minetest.register_craft({
output = 'df_trees:goblin_cap_stem_wood 4',
recipe = {
{'df_trees:goblin_cap_stem'},
}
})
minetest.register_node("df_trees:goblin_cap_wood", {
description = S("Goblin Cap Planks"),
_doc_items_longdesc = df_trees.doc.goblin_cap_desc,
_doc_items_usagehelp = df_trees.doc.goblin_cap_usage,
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"dfcaverns_goblin_cap_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 3,
_mcl_hardness = 2,
})
minetest.register_node("df_trees:goblin_cap_stem_wood", {
description = S("Goblin Cap Stem Planks"),
_doc_items_longdesc = df_trees.doc.goblin_cap_desc,
_doc_items_usagehelp = df_trees.doc.goblin_cap_usage,
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"dfcaverns_goblin_cap_stem_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 3,
_mcl_hardness = 2,
})
df_dependencies.register_all_stairs_and_fences("goblin_cap_wood", {burntime = 12})
df_dependencies.register_all_stairs_and_fences("goblin_cap_stem_wood", {burntime = 7})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:goblin_cap_wood",
burntime = 12,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:goblin_cap_stem_wood",
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:goblin_cap",
burntime = 40,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:goblin_cap_stem",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:goblin_cap_gills",
burntime = 2,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:goblin_cap_sapling",
burntime = 2,
})
local big_goblin_cap_schem = dofile(modpath.."/schematics/goblin_cap_big.lua")
local big_goblin_cap_hut_schem = dofile(modpath.."/schematics/goblin_cap_big_hut.lua")
local bigger_goblin_cap_schem = dofile(modpath.."/schematics/goblin_cap_bigger.lua")
local bigger_goblin_cap_hut_schem = dofile(modpath.."/schematics/goblin_cap_bigger_hut.lua")
-- The hut has a chest and furnace near pos, use this to initialize it
local chest_node = df_dependencies.node_name_chest
local furnace_node = df_dependencies.node_name_furnace
local gold_item = df_dependencies.node_name_gold_ingot
local apple_item = df_dependencies.node_name_apple
local chest_on_construct = minetest.registered_items[chest_node].on_construct
local furnace_on_construct = minetest.registered_items[furnace_node].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, chest_node)
if chest_pos then
chest_on_construct(chest_pos)
local inv = minetest.get_inventory({type="node", pos=chest_pos})
inv:add_item("main", apple_item.." 3")
inv:add_item("main", gold_item.." ".. math.random(1,5))
end
local furnace_pos = minetest.find_node_near({x=pos.x, y=pos.y+1, z=pos.z}, 2, furnace_node)
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"),
_doc_items_longdesc = df_trees.doc.goblin_cap_desc,
_doc_items_usagehelp = df_trees.doc.goblin_cap_usage,
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"dfcaverns_goblin_cap_sapling.png"},
inventory_image = "dfcaverns_goblin_cap_sapling.png",
wield_image = "dfcaverns_goblin_cap_sapling.png",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
walkable = false,
floodable = true,
selection_box = {
type = "fixed",
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1, light_sensitive_fungus = 11, dig_immediate=3,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
sounds = df_dependencies.sound_leaves(),
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
on_construct = function(pos)
if df_trees.goblin_cap_growth_permitted(pos) 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))
end
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"})
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,
})
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")
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
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(
{x = x - cap_radius, y = y, z = z - cap_radius},
{x = x + cap_radius, y = maxy + 3, z = z + cap_radius}
)
local area = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
subterrane.giant_mushroom(area:indexp(pos), area, data, c_stem, c_cap, c_gills, stem_height, cap_radius)
vm:set_data(data)
vm:write_to_map()
vm:update_map()
end
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)
if log_location then log_location("goblin_cap_big", pos) end
elseif math.random() < 0.9 then
mapgen_helper.place_schematic_on_data(data, data_param2, area, pos, bigger_goblin_cap_schem)
if log_location then log_location("goblin_cap_bigger", pos) end
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)
if log_location then log_location("goblin_cap_big_hut", pos) end
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)
if log_location then log_location("goblin_cap_bigger_hut", pos) end
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)
end
+32
View File
@@ -0,0 +1,32 @@
df_trees = {}
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
-- This is used by other mods, leave it exposed
df_trees.node_sound_tree_soft_fungus_defaults = function(table)
table = table or {}
table.footstep = table.footstep or
{name = "dfcaverns_fungus_footstep", gain = 0.3}
df_dependencies.sound_wood(table)
return table
end
--load companion lua files
dofile(modpath.."/config.lua")
dofile(modpath.."/doc.lua")
dofile(modpath.."/aliases.lua")
dofile(modpath.."/blood_thorn.lua")
dofile(modpath.."/fungiwood.lua")
dofile(modpath.."/tunnel_tube.lua")
dofile(modpath.."/spore_tree.lua")
dofile(modpath.."/black_cap.lua")
dofile(modpath.."/nether_cap.lua")
dofile(modpath.."/goblin_cap.lua")
dofile(modpath.."/tower_cap.lua")
dofile(modpath.."/torchspine.lua")
dofile(modpath.."/spindlestem.lua")
dofile(modpath.."/sapling_growth_conditions.lua")
@@ -0,0 +1,236 @@
# textdomain: df_trees
### black_cap.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Black Cap=Schwarze Kappe
Black Cap Gills=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Black Cap Planks=Black Cap Planken
Black Cap Spawn=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Black Cap Stem=Schwarzer Kappenstiel
### blood_thorn.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Blood Thorn Planks=Blutdornbretter
Blood Thorn Spike=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Blood Thorn Stem=Blutdornstamm
Dead Blood Thorn Spike=
Dead Blood Thorn Stem=
### doc.lua ###
@1 have an unusual biochemistry that allows them to somehow subsist on ambient heat, in violation of all known laws of thermodynamics. They grow deep underground in frigid, icy caverns that should by all rights be volcanic.=
@1 wood, in addition to being a beautiful blue hue, retains the odd heat-draining ability of living icecaps and is able to quickly freeze nearby water solid.=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A torchspine alternates between active and quiescent phases and emits dim light when active. They can be harvested for torches, and their embers sprout into new torchspines when placed on flammable surfaces.=Eine Fackel wechselt zwischen aktiver und ruhender Phase und gibt schwaches Licht ab, wenn sie aktiv ist. Sie können für Fackeln geerntet werden, und ihre Glut sprießt auf brennbaren Oberflächen zu neuen Fackelstacheln.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Aside from the artistic applications of its particularly dark color, black cap wood is a long-burning fuel source that's as good as coal for some applications. Black cap gills are oily and make for excellent torch fuel.=Abgesehen von den künstlerischen Anwendungen seiner besonders dunklen Farbe ist Schwarzkappenholz eine langbrennende Brennstoffquelle, die für einige Anwendungen so gut wie Kohle ist. Kiemen mit schwarzer Kappe sind ölig und sorgen für hervorragenden Brennerkraftstoff.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Blood thorns are the most vicious of underground flora, as befits their harsh environments. Found only in hot, dry caverns with sandy soil far from the surface world's organic bounty, blood thorns seek to supplement their nutrient supply with wickedly barbed hollow spines that actively drain fluids from whatever stray plant or creature they might impale.=Blutdornen sind die bösartigste unterirdische Flora, wie es sich für ihre raue Umgebung gehört. Blutdornen kommen nur in heißen, trockenen Höhlen mit sandigem Boden vor, weit entfernt von der organischen Prämie der Oberflächenwelt. Sie versuchen, ihre Nährstoffversorgung durch boshafte, hohle Stacheln zu ergänzen, die aktiv Flüssigkeiten aus streunenden Pflanzen oder Kreaturen ablassen, die sie aufspießen könnten.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cyan Spindlestems are a sign of both copper and iron deposits nearby. Their glowing symbiotes can be extracted as a long-lived light source.=Cyan-Spindelstämme sind ein Zeichen für Kupfer- und Eisenvorkommen in der Nähe. Ihre leuchtenden Symbioten können als langlebige Lichtquelle extrahiert werden.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Fungiwood stalk is strong and very fine-grained, making smooth yellow-tinted lumber when cut. Fungiwood shelf is too fragile to be much use as anything other than fuel.=Der Pilzholzstiel ist stark und sehr feinkörnig, wodurch beim Schneiden glattes, gelb getöntes Holz entsteht. Das Pilzholzregal ist zu zerbrechlich, um als etwas anderes als Kraftstoff verwendet zu werden.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Goblin cap stem and cap material can be cut into wood of two different hues, a subdued cream and a bright orange-red.=Goblin-Kappenstiel und Kappenmaterial können in Holz in zwei verschiedenen Farbtönen geschnitten werden, einer gedämpften Creme und einem leuchtenden Orangerot.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Golden Spindlestems are a sign of rare and magical mineral deposits nearby. Their glowing symbiotes can be extracted as a strong and long-lived light source.=Goldene Spindelstämme sind ein Zeichen für seltene und magische Mineralvorkommen in der Nähe. Ihre leuchtenden Symbioten können als starke und langlebige Lichtquelle extrahiert werden.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Green Spindlestems are a sign of nearby copper deposits. Their glowing symbiotes can be extracted as a long-lived light source, though the glow is not strong.=Grüne Spindelstämme sind ein Zeichen für nahegelegene Kupfervorkommen. Ihre leuchtenden Symbioten können als langlebige Lichtquelle extrahiert werden, obwohl das Leuchten nicht stark ist.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Living blood thorn spikes remain harmful to creatures that touch them. If killed by bright light, they cause only passive damage to creatures that fall on them (as one would expect from an enormous spike).=Lebende Blutdornspitzen bleiben für Kreaturen, die sie berühren, schädlich. Wenn sie durch helles Licht getötet werden, verursachen sie nur passiven Schaden an Kreaturen, die auf sie fallen (wie man es von einer enormen Spitze erwarten würde).
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Living extract from the cap of a cyan Spindlestem.=Lebender Extrakt aus der Kappe eines cyanfarbenen Spindlestems.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Living extract from the cap of a green Spindlestem.=Lebender Extrakt aus der Kappe eines grünen Spindlestems.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Living extract from the cap of a red Spindlestem.=Lebender Extrakt aus der Kappe eines roten Spindlestems.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Living extract from the cap of a yellow Spindlestem.=Lebender Extrakt aus der Kappe eines gelben Spindlestems.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Massive but squat, mature goblin cap mushrooms are the size of small cottages.=Massive, aber gedrungene, reife Koboldkappenpilze haben die Größe kleiner Hütten.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Red Spindlestems are a sign of nearby iron deposits - or perhaps Goblin Caps. Their glowing symbiotes can be extracted as a long-lived light source, though the glow is weak.=Rote Spindelstämme sind ein Zeichen für nahegelegene Eisenvorkommen - oder vielleicht Goblin Caps. Ihre leuchtenden Symbioten können als langlebige Lichtquelle extrahiert werden, obwohl das Leuchten schwach ist.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spindlestems are too big to easily pluck by hand but too small to be called a proper tree. Nevertheless, they are a common and useful resource for underground travelers - particularly their glowing caps.=Spindelstämme sind zu groß, um leicht von Hand gepflückt zu werden, aber zu klein, um als richtiger Baum bezeichnet zu werden. Trotzdem sind sie eine häufige und nützliche Ressource für U-Bahn-Reisende - insbesondere für ihre leuchtenden Kappen.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spore tree trunks can be cut into pale woody planks. The branching fibers and fruiting bodies are only useful as fuel.=Sporenbaumstämme können in blasse Holzbretter geschnitten werden. Die verzweigten Fasern und Fruchtkörper sind nur als Brennstoff nützlich.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spore trees have a sturdy 'trunk' that supports a large spongy mesh of branching fibers, with embedded fruiting bodies that produce a copious amount of spores that gently rain down around the spore tree's base.=Sporenbäume haben einen stabilen "Stamm", der ein großes schwammiges Netz aus verzweigten Fasern trägt, mit eingebetteten Fruchtkörpern, die eine große Menge von Sporen produzieren, die sanft um die Basis des Sporenbaums regnen.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The cap of a Spindlestem, glowing a brilliant yellow due to symbiotic microorganisms.=Die Kappe eines Spindlestems, die aufgrund symbiotischer Mikroorganismen leuchtend gelb leuchtet.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The cap of a Spindlestem, glowing a soft green due to symbiotic microorganisms.=Die Kappe eines Spindlestems, die aufgrund symbiotischer Mikroorganismen sanft grün leuchtet.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The cap of a Spindlestem, glowing a strong cyan due to symbiotic microorganisms.=Die Kappe eines Spindlestems, die aufgrund symbiotischer Mikroorganismen stark cyan leuchtet.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The cap of a Spindlestem, glowing a weak red due to symbiotic microorganisms.=Die Kappe eines Spindlestems, die aufgrund symbiotischer Mikroorganismen schwach rot leuchtet.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The cap of a Spindlestem, uncontaminated by any symbiotic luminescent microorganisms.=Die Kappe eines Spindlestems, die nicht durch symbiotische lumineszierende Mikroorganismen kontaminiert ist.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The dense black wood of these mushrooms is heavy and hard to work with, and has few remarkable properties.=Das dichte schwarze Holz dieser Pilze ist schwer und schwer zu verarbeiten und hat nur wenige bemerkenswerte Eigenschaften.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The king of the fungi, tower cap mushrooms grow to immense proportions.=Der König der Pilze, Turmkappenpilze, wachsen zu immensen Ausmaßen.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The spikes of a blood thorn can actually remain living long after they're severed from their parent stalk, a testament to their tenacity. As long as they remain alive they will continue to actively drain anything they puncture, though they don't grow.=Die Stacheln eines Blutdorns können tatsächlich noch lange leben, nachdem sie von ihrem Elternstiel abgetrennt wurden, ein Beweis für ihre Hartnäckigkeit. Solange sie am Leben bleiben, werden sie weiterhin aktiv alles ablassen, was sie durchstechen, obwohl sie nicht wachsen.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The stem of a Spindlestem is surprisingly sturdy, and despite their thinness they can grow quite tall. They can be used as a wood substitute in many crafting recipes.=Der Stiel eines Spindlestems ist überraschend robust und kann trotz ihrer Dünnheit ziemlich groß werden. Sie können als Holzersatz in vielen Handwerksrezepten verwendet werden.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The trunk of a tunnel tube can be cut and processed to produce plywood-like material.=Der Stamm eines Tunnelrohrs kann geschnitten und zu sperrholzartigem Material verarbeitet werden.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The trunk of a tunnel tube can be cut and processed to produce plywood-like material. The fruiting body accumulates high-energy compounds that, when ignited, produce a vigorous detonation - a unique adaptation for spreading tunnel tube spawn through the still cavern air.=Der Stamm eines Tunnelrohrs kann geschnitten und zu sperrholzartigem Material verarbeitet werden. Der Fruchtkörper sammelt hochenergetische Verbindungen an, die beim Zünden eine heftige Detonation hervorrufen - eine einzigartige Anpassung für die Ausbreitung von Tunnelrohrlaich in der stillen Höhlenluft.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
These things are useless except as weak fuel for a fire.=Diese Dinge sind nutzlos, außer als schwacher Brennstoff für ein Feuer.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Thin, irregular layers of spore-producing 'shelves' surround the strong central stalk of the mighty Fungiwood.=Dünne, unregelmäßige Schichten sporenproduzierender "Regale" umgeben den starken Mittelstiel des mächtigen Pilzwaldes.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Torchspines are strange organic formations that are alive only in a technical sense. They "feed" on volatile flammable vapors vented up through their structure, growing from combustion residue deposited at their tips.=Fackelstacheln sind seltsame organische Formationen, die nur im technischen Sinne leben. Sie "ernähren" sich von flüchtigen brennbaren Dämpfen, die durch ihre Struktur entweichen und aus Verbrennungsrückständen wachsen, die sich an ihren Spitzen ablagern.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tower caps are an excellent source of wood.=Turmkappen sind eine ausgezeichnete Holzquelle.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tunnel tubes are hollow, curved fungal growths that support a fruiting body.=Tunnelrohre sind hohle, gekrümmte Pilzwucherungen, die einen Fruchtkörper stützen.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
When harvested, the central stalk of a blood thorn can be cut into planks and used as wood. It has a purple-red hue that may or may not appeal, depending on one's artistic tastes.=Bei der Ernte kann der zentrale Stiel eines Blutdorns in Bretter geschnitten und als Holz verwendet werden. Es hat einen purpurroten Farbton, der je nach künstlerischem Geschmack ansprechen kann oder nicht.
### fungiwood.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Fungiwood Planks=Fungiwood Planken
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Fungiwood Shelf=Fungiwood Regal
Fungiwood Spawn=
Fungiwood Stem=
### goblin_cap.lua ###
Goblin Cap=
Goblin Cap Gills=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Goblin Cap Planks=Goblin Cap Planken
Goblin Cap Spawn=
Goblin Cap Stem=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Goblin Cap Stem Planks=Goblin Cap Stem Planken
### nether_cap.lua ###
@1 Gills=
@1 Planks=
@1 Spawn=
@1 Stem=
### spindlestem.lua ###
@1 Spindlestem Cap=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
@1 Spindlestem Extract=@1 Spindlestem-Extrakt
Cyan=
Golden=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Green=Grün
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Red=Rot
Spindlestem=
Spindlestem Spawn=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
White=Weiß
### spore_tree.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spore Tree Fruiting Body=Sporenbaum-Fruchtkörper
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spore Tree Hyphae=Sporenbaumhyphen
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spore Tree Ladder=Sporenbaumleiter
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spore Tree Planks=Sporenbaumbretter
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spore Tree Spawn=Sporenbaumlaich
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spore Tree Stem=Sporenbaumstamm
### torchspine.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Torchspine=Fackelrücken
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Torchspine Ember=Fackelglut
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Torchspine Tip=Fackelspitze
### tower_cap.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tower Cap=Turmkappe
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tower Cap Gills=Tower Cap Kiemen
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tower Cap Planks=Turmkappenbretter
Tower Cap Spawn=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tower Cap Stem=Turmkappenstiel
### tunnel_tube.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tunnel Tube=Tunnelrohr
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tunnel Tube Fruiting Body=Tunnelrohr-Fruchtkörper
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tunnel Tube Plies=Tunnelrohrlagen
Tunnel Tube Spawn=
##### not used anymore #####
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Nether cap wood, in addition to being a beautiful blue hue, retains the odd heat-draining ability of living nether caps and is able to quickly freeze nearby water solid.=Netherkappenholz ist nicht nur ein wunderschöner blauer Farbton, sondern behält auch die seltsame Wärmeableitungsfähigkeit lebender Netherkappen bei und kann in der Nähe befindliche Wasserfeststoffe schnell einfrieren.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Nether caps have an unusual biochemistry that allows them to somehow subsist on ambient heat, in violation of all known laws of thermodynamics. They grow deep underground in frigid, icy caverns that should by all rights be volcanic.=Netherkappen haben eine ungewöhnliche Biochemie, die es ihnen ermöglicht, unter Verstoß gegen alle bekannten Gesetze der Thermodynamik von Umgebungswärme zu leben. Sie wachsen tief unter der Erde in kalten, eisigen Höhlen, die auf jeden Fall vulkanisch sein sollten.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Nether Cap Gills=Nether Cap Kiemen
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Nether Cap Planks=Nether Cap Planken
@@ -0,0 +1,210 @@
# textdomain: df_trees
### black_cap.lua ###
Black Cap=Cappello nero
Black Cap Gills=Lamelle di cappello nero
Black Cap Planks=Assi di cappello nero
Black Cap Spawn=Prole di cappello nero
Black Cap Stem=Gambo di cappello nero
### blood_thorn.lua ###
Blood Thorn Planks=Assi di spina del sangue
Blood Thorn Spike=Spuntone di spina del sangue
Blood Thorn Stem=Gambo di spina del sangue
Dead Blood Thorn Spike=Spuntone di spina del sangue morta
Dead Blood Thorn Stem=Gambo di spina del sangue morta
### doc.lua ###
@1 have an unusual biochemistry that allows them to somehow subsist on ambient heat, in violation of all known laws of thermodynamics. They grow deep underground in frigid, icy caverns that should by all rights be volcanic.=
@1 wood, in addition to being a beautiful blue hue, retains the odd heat-draining ability of living icecaps and is able to quickly freeze nearby water solid.=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A torchspine alternates between active and quiescent phases and emits dim light when active. They can be harvested for torches, and their embers sprout into new torchspines when placed on flammable surfaces.=Una torcia alterna le fasi attiva e quiescente ed emette una luce fioca quando è attiva. Possono essere raccolti per le torce e le loro braci germogliano in nuove spine delle torce quando vengono posizionate su superfici infiammabili.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Aside from the artistic applications of its particularly dark color, black cap wood is a long-burning fuel source that's as good as coal for some applications. Black cap gills are oily and make for excellent torch fuel.=A parte le applicazioni artistiche del suo colore particolarmente scuro, il legno del cappello nero è una fonte di combustibile a combustione lunga che è buona come il carbone per alcune applicazioni. Le branchie del cappuccio nero sono oleose e costituiscono un eccellente combustibile per la torcia.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Blood thorns are the most vicious of underground flora, as befits their harsh environments. Found only in hot, dry caverns with sandy soil far from the surface world's organic bounty, blood thorns seek to supplement their nutrient supply with wickedly barbed hollow spines that actively drain fluids from whatever stray plant or creature they might impale.=Le spine di sangue sono le più viziose della flora sotterranea, come si addice ai loro ambienti ostili. Trovate solo in caverne calde e asciutte con terreno sabbioso lontano dalla generosità organica del mondo di superficie, le spine di sangue cercano di integrare il loro apporto di nutrienti con spine cave malvagie che drenano attivamente i fluidi da qualsiasi pianta o creatura vagante che potrebbero impalare.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cyan Spindlestems are a sign of both copper and iron deposits nearby. Their glowing symbiotes can be extracted as a long-lived light source.=Gli spindlestem ciano sono un segno di depositi di rame e ferro nelle vicinanze. I loro simbionti luminosi possono essere estratti come fonte di luce a lunga durata.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Fungiwood stalk is strong and very fine-grained, making smooth yellow-tinted lumber when cut. Fungiwood shelf is too fragile to be much use as anything other than fuel.=Il gambo di legno di fungo è forte e a grana molto fine, quando viene tagliato produce legname liscio di colore giallo. La mensola in legno di fungo è troppo fragile per essere utilizzata come qualcosa di diverso dal carburante.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Goblin cap stem and cap material can be cut into wood of two different hues, a subdued cream and a bright orange-red.=Il gambo e il materiale del cappuccio del goblin possono essere tagliati in legno di due diverse tonalità, una crema tenue e un rosso arancio brillante.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Golden Spindlestems are a sign of rare and magical mineral deposits nearby. Their glowing symbiotes can be extracted as a strong and long-lived light source.=I Golden Spindlestems sono un segno di depositi minerali rari e magici nelle vicinanze. I loro simbionti luminosi possono essere estratti come una fonte di luce forte e di lunga durata.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Green Spindlestems are a sign of nearby copper deposits. Their glowing symbiotes can be extracted as a long-lived light source, though the glow is not strong.=Gli spindlestem verdi sono un segno di depositi di rame nelle vicinanze. I loro simbionti luminosi possono essere estratti come fonte di luce a lunga durata, sebbene il bagliore non sia forte.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Living blood thorn spikes remain harmful to creatures that touch them. If killed by bright light, they cause only passive damage to creatures that fall on them (as one would expect from an enormous spike).=Le punte di spine di sangue vivo rimangono dannose per le creature che le toccano. Se uccisi da una luce intensa, causano solo danni passivi alle creature che cadono su di loro (come ci si aspetterebbe da un enorme picco).
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Living extract from the cap of a cyan Spindlestem.=Estratto vivo dal tappo di uno Spindlestem ciano.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Living extract from the cap of a green Spindlestem.=Estratto vivo dal cappello di uno Spindlestem verde.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Living extract from the cap of a red Spindlestem.=Estratto vivo dal cappello di uno Spindlestem rosso.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Living extract from the cap of a yellow Spindlestem.=Estratto vivo dal cappello di uno Spindlestem giallo.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Massive but squat, mature goblin cap mushrooms are the size of small cottages.=I funghi goblin sono grandi ma tozzi e maturi, hanno le dimensioni di piccoli cottage.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Red Spindlestems are a sign of nearby iron deposits - or perhaps Goblin Caps. Their glowing symbiotes can be extracted as a long-lived light source, though the glow is weak.=I Red Spindlestems sono un segno di depositi di ferro vicini - o forse Goblin Caps. I loro simbionti luminosi possono essere estratti come fonte di luce a lunga durata, anche se il bagliore è debole.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spindlestems are too big to easily pluck by hand but too small to be called a proper tree. Nevertheless, they are a common and useful resource for underground travelers - particularly their glowing caps.=Gli spindlestem sono troppo grandi per essere strappati facilmente a mano ma troppo piccoli per essere definiti un albero vero e proprio. Tuttavia, sono una risorsa comune e utile per i viaggiatori sotterranei, in particolare i loro berretti luminosi.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spore tree trunks can be cut into pale woody planks. The branching fibers and fruiting bodies are only useful as fuel.=I tronchi degli alberi di spore possono essere tagliati in assi legnose chiare. Le fibre ramificate e i corpi fruttiferi sono utili solo come combustibile.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Spore trees have a sturdy 'trunk' that supports a large spongy mesh of branching fibers, with embedded fruiting bodies that produce a copious amount of spores that gently rain down around the spore tree's base.=Gli alberi di spore hanno un robusto "tronco" che sostiene una grande rete spugnosa di fibre ramificate, con corpi fruttiferi incorporati che producono una copiosa quantità di spore che piovono delicatamente intorno alla base dell'albero di spore.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The cap of a Spindlestem, glowing a brilliant yellow due to symbiotic microorganisms.=Il cappuccio di uno Spindlestem, che brilla di un giallo brillante a causa di microrganismi simbiotici.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The cap of a Spindlestem, glowing a soft green due to symbiotic microorganisms.=Il cappuccio di uno Spindlestem, che emette un colore verde tenue a causa di microrganismi simbiotici.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The cap of a Spindlestem, glowing a strong cyan due to symbiotic microorganisms.=Il cappuccio di uno Spindlestem, che emette un forte colore ciano a causa di microrganismi simbiotici.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The cap of a Spindlestem, glowing a weak red due to symbiotic microorganisms.=Il cappuccio di uno Spindlestem, che brilla di un debole rosso a causa di microrganismi simbiotici.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The cap of a Spindlestem, uncontaminated by any symbiotic luminescent microorganisms.=Il cappuccio di uno Spindlestem, incontaminato da eventuali microrganismi luminescenti simbiotici.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The dense black wood of these mushrooms is heavy and hard to work with, and has few remarkable properties.=Il denso legno nero di questi funghi è pesante e difficile da lavorare e ha poche proprietà notevoli.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The king of the fungi, tower cap mushrooms grow to immense proportions.=Il re dei funghi, i funghi con cappuccio a torre crescono in proporzioni immense.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The spikes of a blood thorn can actually remain living long after they're severed from their parent stalk, a testament to their tenacity. As long as they remain alive they will continue to actively drain anything they puncture, though they don't grow.=Le punte di una spina di sangue possono effettivamente rimanere in vita molto tempo dopo essere state separate dal gambo dei genitori, a testimonianza della loro tenacia. Finché rimangono in vita continueranno a drenare attivamente tutto ciò che forano, anche se non crescono.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The stem of a Spindlestem is surprisingly sturdy, and despite their thinness they can grow quite tall. They can be used as a wood substitute in many crafting recipes.=Lo stelo di uno Spindlestem è sorprendentemente robusto e nonostante la loro magrezza possono crescere abbastanza alti. Possono essere usati come sostituti del legno in molte ricette di lavorazione.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The trunk of a tunnel tube can be cut and processed to produce plywood-like material.=Il tronco di un tubo a tunnel può essere tagliato e lavorato per produrre materiale simile al compensato.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The trunk of a tunnel tube can be cut and processed to produce plywood-like material. The fruiting body accumulates high-energy compounds that, when ignited, produce a vigorous detonation - a unique adaptation for spreading tunnel tube spawn through the still cavern air.=Il tronco di un tubo a tunnel può essere tagliato e lavorato per produrre materiale simile al compensato. Il corpo fruttifero accumula composti ad alta energia che, una volta innescati, producono una vigorosa detonazione - un adattamento unico per diffondere le uova del tubo del tunnel attraverso l'aria tranquilla della caverna.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
These things are useless except as weak fuel for a fire.=Queste cose sono inutili se non come combustibile debole per un incendio.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Thin, irregular layers of spore-producing 'shelves' surround the strong central stalk of the mighty Fungiwood.=Strati sottili e irregolari di "mensole" che producono spore circondano il robusto gambo centrale del potente Fungiwood.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Torchspines are strange organic formations that are alive only in a technical sense. They "feed" on volatile flammable vapors vented up through their structure, growing from combustion residue deposited at their tips.=Le torce sono strane formazioni organiche che sono vive solo in senso tecnico. Si "nutrono" di vapori volatili infiammabili emessi attraverso la loro struttura, che crescono dai residui di combustione depositati alle loro estremità.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tower caps are an excellent source of wood.=I cappucci delle torri sono un'ottima fonte di legno.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tunnel tubes are hollow, curved fungal growths that support a fruiting body.=I tubi del tunnel sono escrescenze fungine cave e ricurve che supportano un corpo fruttifero.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
When harvested, the central stalk of a blood thorn can be cut into planks and used as wood. It has a purple-red hue that may or may not appeal, depending on one's artistic tastes.=Quando viene raccolto, il gambo centrale di una spina sanguigna può essere tagliato in assi e usato come legno. Ha una tonalità rosso porpora che può piacere o meno, a seconda dei gusti artistici.
### fungiwood.lua ###
Fungiwood Planks=Assi di fungo di legno
Fungiwood Shelf=Mensola di fungo di legno
Fungiwood Spawn=Prole di fungo di legno
Fungiwood Stem=Gambo di fungo di legno
### goblin_cap.lua ###
Goblin Cap=Cappello di folletto
Goblin Cap Gills=Lamelle di cappello di folletto
Goblin Cap Planks=Assi di cappello di folletto
Goblin Cap Spawn=Prole di cappello di folletto
Goblin Cap Stem=Gambo di cappello di folletto
Goblin Cap Stem Planks=Assi di gambo di cappello di folletto
### nether_cap.lua ###
@1 Gills=Lamelle di @1
@1 Planks=Assi di @1
@1 Spawn=Prole di @1
@1 Stem=Gambo di @1
### spindlestem.lua ###
@1 Spindlestem Cap=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
@1 Spindlestem Extract=@1 Estratto di Spindlestem
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cyan=Ciano
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Golden=D'oro
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Green=Verde
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Red=Rosso
Spindlestem=
Spindlestem Spawn=Prole di albero delle spore
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
White=Bianca
### spore_tree.lua ###
Spore Tree Fruiting Body=Corpo fruttifero dell'albero delle spore
Spore Tree Hyphae=Ife di albero delle spore
Spore Tree Ladder=Ife di albero delle spore
Spore Tree Planks=Assi di albero delle spore
Spore Tree Spawn=Prole di albero delle spore
Spore Tree Stem=Gambo di albero delle spore
### torchspine.lua ###
Torchspine=
Torchspine Ember=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Torchspine Tip=Punta Torchspine
### tower_cap.lua ###
Tower Cap=Cappello a torre
Tower Cap Gills=Lamelle di cappello a torre
Tower Cap Planks=Assi di cappello a torre
Tower Cap Spawn=Prole di cappello a torre
Tower Cap Stem=Gambo di cappello a torre
### tunnel_tube.lua ###
Tunnel Tube=Tubo di galleria
Tunnel Tube Fruiting Body=Corpo fruttifero del tubo di galleria
Tunnel Tube Plies=Strati di tubo di galleria
Tunnel Tube Spawn=Prole di tubo di galleria
##### not used anymore #####
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Nether cap wood, in addition to being a beautiful blue hue, retains the odd heat-draining ability of living nether caps and is able to quickly freeze nearby water solid.=Il legno del cappuccio inferiore, oltre ad essere una bella tonalità blu, conserva la strana capacità di drenaggio del calore dei tappi inferiori viventi ed è in grado di congelare rapidamente l'acqua solida vicina.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Nether caps have an unusual biochemistry that allows them to somehow subsist on ambient heat, in violation of all known laws of thermodynamics. They grow deep underground in frigid, icy caverns that should by all rights be volcanic.=I cappucci inferiori hanno una biochimica insolita che consente loro di sopravvivere in qualche modo al calore ambientale, in violazione di tutte le leggi conosciute della termodinamica. Crescono in profondità nel sottosuolo in caverne gelide che dovrebbero a tutti gli effetti essere vulcaniche.
+157
View File
@@ -0,0 +1,157 @@
# textdomain: df_trees
### black_cap.lua ###
Black Cap=
Black Cap Gills=
Black Cap Planks=
Black Cap Spawn=
Black Cap Stem=
### blood_thorn.lua ###
Blood Thorn Planks=
Blood Thorn Spike=
Blood Thorn Stem=
Dead Blood Thorn Spike=
Dead Blood Thorn Stem=
### doc.lua ###
@1 have an unusual biochemistry that allows them to somehow subsist on ambient heat, in violation of all known laws of thermodynamics. They grow deep underground in frigid, icy caverns that should by all rights be volcanic.=
@1 wood, in addition to being a beautiful blue hue, retains the odd heat-draining ability of living icecaps and is able to quickly freeze nearby water solid.=
A torchspine alternates between active and quiescent phases and emits dim light when active. They can be harvested for torches, and their embers sprout into new torchspines when placed on flammable surfaces.=
Aside from the artistic applications of its particularly dark color, black cap wood is a long-burning fuel source that's as good as coal for some applications. Black cap gills are oily and make for excellent torch fuel.=
Blood thorns are the most vicious of underground flora, as befits their harsh environments. Found only in hot, dry caverns with sandy soil far from the surface world's organic bounty, blood thorns seek to supplement their nutrient supply with wickedly barbed hollow spines that actively drain fluids from whatever stray plant or creature they might impale.=
Cyan Spindlestems are a sign of both copper and iron deposits nearby. Their glowing symbiotes can be extracted as a long-lived light source.=
Fungiwood stalk is strong and very fine-grained, making smooth yellow-tinted lumber when cut. Fungiwood shelf is too fragile to be much use as anything other than fuel.=
Goblin cap stem and cap material can be cut into wood of two different hues, a subdued cream and a bright orange-red.=
Golden Spindlestems are a sign of rare and magical mineral deposits nearby. Their glowing symbiotes can be extracted as a strong and long-lived light source.=
Green Spindlestems are a sign of nearby copper deposits. Their glowing symbiotes can be extracted as a long-lived light source, though the glow is not strong.=
Living blood thorn spikes remain harmful to creatures that touch them. If killed by bright light, they cause only passive damage to creatures that fall on them (as one would expect from an enormous spike).=
Living extract from the cap of a cyan Spindlestem.=
Living extract from the cap of a green Spindlestem.=
Living extract from the cap of a red Spindlestem.=
Living extract from the cap of a yellow Spindlestem.=
Massive but squat, mature goblin cap mushrooms are the size of small cottages.=
Red Spindlestems are a sign of nearby iron deposits - or perhaps Goblin Caps. Their glowing symbiotes can be extracted as a long-lived light source, though the glow is weak.=
Spindlestems are too big to easily pluck by hand but too small to be called a proper tree. Nevertheless, they are a common and useful resource for underground travelers - particularly their glowing caps.=
Spore tree trunks can be cut into pale woody planks. The branching fibers and fruiting bodies are only useful as fuel.=
Spore trees have a sturdy 'trunk' that supports a large spongy mesh of branching fibers, with embedded fruiting bodies that produce a copious amount of spores that gently rain down around the spore tree's base.=
The cap of a Spindlestem, glowing a brilliant yellow due to symbiotic microorganisms.=
The cap of a Spindlestem, glowing a soft green due to symbiotic microorganisms.=
The cap of a Spindlestem, glowing a strong cyan due to symbiotic microorganisms.=
The cap of a Spindlestem, glowing a weak red due to symbiotic microorganisms.=
The cap of a Spindlestem, uncontaminated by any symbiotic luminescent microorganisms.=
The dense black wood of these mushrooms is heavy and hard to work with, and has few remarkable properties.=
The king of the fungi, tower cap mushrooms grow to immense proportions.=
The spikes of a blood thorn can actually remain living long after they're severed from their parent stalk, a testament to their tenacity. As long as they remain alive they will continue to actively drain anything they puncture, though they don't grow.=
The stem of a Spindlestem is surprisingly sturdy, and despite their thinness they can grow quite tall. They can be used as a wood substitute in many crafting recipes.=
The trunk of a tunnel tube can be cut and processed to produce plywood-like material.=
The trunk of a tunnel tube can be cut and processed to produce plywood-like material. The fruiting body accumulates high-energy compounds that, when ignited, produce a vigorous detonation - a unique adaptation for spreading tunnel tube spawn through the still cavern air.=
These things are useless except as weak fuel for a fire.=
Thin, irregular layers of spore-producing 'shelves' surround the strong central stalk of the mighty Fungiwood.=
Torchspines are strange organic formations that are alive only in a technical sense. They "feed" on volatile flammable vapors vented up through their structure, growing from combustion residue deposited at their tips.=
Tower caps are an excellent source of wood.=
Tunnel tubes are hollow, curved fungal growths that support a fruiting body.=
When harvested, the central stalk of a blood thorn can be cut into planks and used as wood. It has a purple-red hue that may or may not appeal, depending on one's artistic tastes.=
### fungiwood.lua ###
Fungiwood Planks=
Fungiwood Shelf=
Fungiwood Spawn=
Fungiwood Stem=
### goblin_cap.lua ###
Goblin Cap=
Goblin Cap Gills=
Goblin Cap Planks=
Goblin Cap Spawn=
Goblin Cap Stem=
Goblin Cap Stem Planks=
### nether_cap.lua ###
@1 Gills=
@1 Planks=
@1 Spawn=
@1 Stem=
### spindlestem.lua ###
@1 Spindlestem Cap=
@1 Spindlestem Extract=
Cyan=
Golden=
Green=
Red=
Spindlestem=
Spindlestem Spawn=
White=
### spore_tree.lua ###
Spore Tree Fruiting Body=
Spore Tree Hyphae=
Spore Tree Ladder=
Spore Tree Planks=
Spore Tree Spawn=
Spore Tree Stem=
### torchspine.lua ###
Torchspine=
Torchspine Ember=
Torchspine Tip=
### tower_cap.lua ###
Tower Cap=
Tower Cap Gills=
Tower Cap Planks=
Tower Cap Spawn=
Tower Cap Stem=
### tunnel_tube.lua ###
Tunnel Tube=
Tunnel Tube Fruiting Body=
Tunnel Tube Plies=
Tunnel Tube Spawn=
+4
View File
@@ -0,0 +1,4 @@
name = df_trees
description = Adds various types of underground fungal "trees". Light kills their saplings, they only grow in the dark.
depends = df_dependencies
optional_depends = doc, basic_materials, df_farming, mapgen_helper, looped_node_sound
@@ -0,0 +1 @@
All tunnel tube models were created by FaceDeer and released under both the MIT license and under the Creative Commons CC0 license.
@@ -0,0 +1,62 @@
# Blender MTL File: 'tunnel tube base.blend'
# Material Count: 6
newmtl Back
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Bottom
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Front
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Left
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Right
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Top
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
@@ -0,0 +1,94 @@
# Blender v2.77 (sub 0) OBJ File: 'tunnel tube base.blend'
# www.blender.org
mtllib tunnel_tube_slant.mtl
o tunnel_tube_slant_Cube.002
v 0.500000 -0.500000 -0.500000
v 0.500000 -0.500000 0.500000
v -0.500000 -0.500000 0.500000
v -0.250000 -0.500000 0.250000
v 0.250000 -0.500000 0.250000
v 0.250000 -0.500000 -0.250000
v -0.250000 -0.500000 -0.250000
v -0.500000 -0.500000 -0.500000
v 0.500000 0.500000 -1.000000
v -0.500000 0.500000 -1.000000
v 0.500000 0.500000 0.000000
v -0.500000 0.500000 -0.000000
v -0.250000 0.500000 -0.250000
v -0.250000 0.500000 -0.750000
v 0.250000 0.500000 -0.750000
v 0.250000 0.500000 -0.250000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.2500 0.7500
vt 0.7500 0.7500
vt 0.7500 0.2500
vt 1.0000 -0.0000
vt -0.0000 0.0000
vt 0.2500 0.2500
vt 1.0000 1.0000
vt 1.0000 0.0000
vt 0.7500 0.2500
vt 0.7500 0.7500
vt 0.2500 0.7500
vt 0.0000 1.0000
vt 0.2500 0.2500
vt -0.0000 0.0000
vt 1.0000 0.0000
vt 1.5000 1.0000
vt 0.5000 1.0000
vt 0.0000 0.0000
vt 1.2500 1.0000
vt 0.7500 1.0000
vt 0.2500 0.0000
vt 0.7500 0.0000
vt 0.5000 1.0000
vt 1.5000 1.0000
vt 1.0000 0.0000
vt 0.7500 1.0000
vt 1.2500 1.0000
vt 0.7500 0.0000
vt 0.2500 0.0000
vt 1.0000 1.0000
vt -0.0000 1.0000
vt 0.7500 1.0000
vt 0.2500 1.0000
vt 0.2500 0.0000
vt 0.0000 0.0000
vt 0.2500 1.0000
vt 0.7500 0.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 0.4472 0.8944
vn 0.0000 -0.4472 -0.8944
g tunnel_tube_slant_Cube.002_Top
usemtl Top
s off
f 9/1/1 10/2/1 14/3/1 15/4/1
f 9/1/1 15/4/1 16/5/1 11/6/1
f 14/3/1 10/2/1 12/7/1 13/8/1
f 11/6/1 16/5/1 13/8/1 12/7/1
g tunnel_tube_slant_Cube.002_Bottom
usemtl Bottom
f 1/9/2 2/10/2 5/11/2 6/12/2
f 1/9/2 6/12/2 7/13/2 8/14/2
f 8/14/2 7/13/2 4/15/2 3/16/2
f 5/11/2 2/10/2 3/16/2 4/15/2
g tunnel_tube_slant_Cube.002_Right
usemtl Right
f 1/17/3 9/18/3 11/19/3 2/20/3
f 14/21/3 13/22/3 4/23/3 7/24/3
g tunnel_tube_slant_Cube.002_Left
usemtl Left
f 3/16/4 12/25/4 10/26/4 8/27/4
f 16/28/4 15/29/4 6/30/4 5/31/4
g tunnel_tube_slant_Cube.002_Front
usemtl Front
f 2/10/5 11/32/5 12/33/5 3/16/5
f 15/34/5 14/35/5 7/36/5 6/30/5
g tunnel_tube_slant_Cube.002_Back
usemtl Back
f 9/1/6 1/17/6 8/37/6 10/2/6
f 13/38/6 16/28/6 5/39/6 4/23/6
@@ -0,0 +1,62 @@
# Blender MTL File: 'tunnel tube base.blend'
# Material Count: 6
newmtl Back
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Bottom
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Front
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Left
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Right
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Top
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
@@ -0,0 +1,94 @@
# Blender v2.77 (sub 0) OBJ File: 'tunnel tube base.blend'
# www.blender.org
mtllib tunnel_tube_slant_2.mtl
o tunnel_tube_slant_Cube.002
v 0.500000 -0.500000 0.000000
v 0.500000 -0.500000 1.000000
v -0.500000 -0.500000 1.000000
v -0.250000 -0.500000 0.750000
v 0.250000 -0.500000 0.750000
v 0.250000 -0.500000 0.250000
v -0.250000 -0.500000 0.250000
v -0.500000 -0.500000 -0.000000
v 0.500000 0.500000 -0.500000
v -0.500000 0.500000 -0.500000
v 0.500000 0.500000 0.500000
v -0.500000 0.500000 0.500000
v -0.250000 0.500000 0.250000
v -0.250000 0.500000 -0.250000
v 0.250000 0.500000 -0.250000
v 0.250000 0.500000 0.250000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.2500 0.7500
vt 0.7500 0.7500
vt 0.7500 0.2500
vt 1.0000 -0.0000
vt -0.0000 0.0000
vt 0.2500 0.2500
vt 1.0000 1.0000
vt 1.0000 0.0000
vt 0.7500 0.2500
vt 0.7500 0.7500
vt 0.2500 0.7500
vt 0.0000 1.0000
vt 0.2500 0.2500
vt -0.0000 0.0000
vt 0.5000 0.0000
vt -0.0000 1.0000
vt -0.5000 0.0000
vt 0.7500 1.0000
vt 0.2500 1.0000
vt -0.2500 0.0000
vt 0.2500 0.0000
vt -0.5000 0.0000
vt 0.0000 1.0000
vt 1.0000 1.0000
vt 0.5000 0.0000
vt 0.2500 1.0000
vt 0.7500 1.0000
vt 0.2500 0.0000
vt -0.2500 0.0000
vt 1.0000 1.0000
vt 0.2500 1.0000
vt 0.7500 0.0000
vt 1.0000 0.0000
vt 0.0000 0.0000
vt 0.7500 1.0000
vt 0.7500 0.0000
vt 0.2500 0.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 0.4472 0.8944
vn 0.0000 -0.4472 -0.8944
g tunnel_tube_slant_Cube.002_Top
usemtl Top
s off
f 9/1/1 10/2/1 14/3/1 15/4/1
f 9/1/1 15/4/1 16/5/1 11/6/1
f 14/3/1 10/2/1 12/7/1 13/8/1
f 11/6/1 16/5/1 13/8/1 12/7/1
g tunnel_tube_slant_Cube.002_Bottom
usemtl Bottom
f 1/9/2 2/10/2 5/11/2 6/12/2
f 1/9/2 6/12/2 7/13/2 8/14/2
f 8/14/2 7/13/2 4/15/2 3/16/2
f 5/11/2 2/10/2 3/16/2 4/15/2
g tunnel_tube_slant_Cube.002_Right
usemtl Right
f 1/17/3 9/1/3 11/18/3 2/19/3
f 14/20/3 13/21/3 4/22/3 7/23/3
g tunnel_tube_slant_Cube.002_Left
usemtl Left
f 3/24/4 12/25/4 10/26/4 8/27/4
f 16/28/4 15/29/4 6/30/4 5/31/4
g tunnel_tube_slant_Cube.002_Front
usemtl Front
f 2/10/5 11/32/5 12/25/5 3/16/5
f 15/29/5 14/33/5 7/23/5 6/34/5
g tunnel_tube_slant_Cube.002_Back
usemtl Back
f 9/1/6 1/35/6 8/36/6 10/2/6
f 13/21/6 16/37/6 5/38/6 4/39/6
@@ -0,0 +1,62 @@
# Blender MTL File: 'tunnel tube base.blend'
# Material Count: 6
newmtl Back
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Bottom
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Front
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Left
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Right
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl Top
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
@@ -0,0 +1,94 @@
# Blender v2.77 (sub 0) OBJ File: 'tunnel tube base.blend'
# www.blender.org
mtllib tunnel_tube_slant_full.mtl
o tunnel_tube_slant_Cube.002
v 0.500000 -0.500000 -0.500000
v 0.500000 -0.500000 0.500000
v -0.500000 -0.500000 0.500000
v -0.250000 -0.500000 0.250000
v 0.250000 -0.500000 0.250000
v 0.250000 -0.500000 -0.250000
v -0.250000 -0.500000 -0.250000
v -0.500000 -0.500000 -0.500000
v 0.500000 0.500000 -1.500000
v -0.500000 0.500000 -1.500000
v 0.500000 0.500000 -0.500000
v -0.500000 0.500000 -0.500000
v -0.250000 0.500000 -0.750000
v -0.250000 0.500000 -1.250000
v 0.250000 0.500000 -1.250000
v 0.250000 0.500000 -0.750000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.2500 0.7500
vt 0.7500 0.7500
vt 0.7500 0.2500
vt 1.0000 -0.0000
vt -0.0000 0.0000
vt 0.2500 0.2500
vt 1.0000 1.0000
vt 1.0000 0.0000
vt 0.7500 0.2500
vt 0.7500 0.7500
vt 0.2500 0.7500
vt 0.0000 1.0000
vt 0.2500 0.2500
vt -0.0000 0.0000
vt 1.0000 0.0000
vt 2.0000 1.0000
vt 1.0000 1.0000
vt 0.0000 0.0000
vt 1.7500 1.0000
vt 1.2500 1.0000
vt 0.2500 0.0000
vt 0.7500 0.0000
vt 1.0000 1.0000
vt 2.0000 1.0000
vt 1.0000 0.0000
vt 1.2500 1.0000
vt 1.7500 1.0000
vt 0.7500 0.0000
vt 0.2500 0.0000
vt -0.0000 1.0000
vt 0.7500 1.2500
vt 0.2500 1.2500
vt 0.2500 0.2500
vt 0.7500 0.2500
vt 0.0000 0.0000
vt 0.2500 1.2500
vt 0.7500 1.2500
vn 0.0000 1.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 0.7071 0.7071
vn 0.0000 -0.7071 -0.7071
g tunnel_tube_slant_Cube.002_Top
usemtl Top
s off
f 9/1/1 10/2/1 14/3/1 15/4/1
f 9/1/1 15/4/1 16/5/1 11/6/1
f 14/3/1 10/2/1 12/7/1 13/8/1
f 11/6/1 16/5/1 13/8/1 12/7/1
g tunnel_tube_slant_Cube.002_Bottom
usemtl Bottom
f 1/9/2 2/10/2 5/11/2 6/12/2
f 1/9/2 6/12/2 7/13/2 8/14/2
f 8/14/2 7/13/2 4/15/2 3/16/2
f 5/11/2 2/10/2 3/16/2 4/15/2
g tunnel_tube_slant_Cube.002_Right
usemtl Right
f 1/17/3 9/18/3 11/19/3 2/20/3
f 14/21/3 13/22/3 4/23/3 7/24/3
g tunnel_tube_slant_Cube.002_Left
usemtl Left
f 3/16/4 12/25/4 10/26/4 8/27/4
f 16/28/4 15/29/4 6/30/4 5/31/4
g tunnel_tube_slant_Cube.002_Front
usemtl Front
f 2/10/5 11/19/5 12/32/5 3/16/5
f 15/33/5 14/34/5 7/35/5 6/36/5
g tunnel_tube_slant_Cube.002_Back
usemtl Back
f 9/1/6 1/17/6 8/37/6 10/2/6
f 13/38/6 16/39/6 5/11/6 4/15/6
+204
View File
@@ -0,0 +1,204 @@
local S = minetest.get_translator(minetest.get_current_modname())
local nethercap_name = df_dependencies.nethercap_name
--stem
minetest.register_node("df_trees:nether_cap_stem", {
description = S("@1 Stem", nethercap_name),
_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 = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1, nether_cap = 1, handy=1,axey=1, building_block=1, material_wood=1},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 0.7,
_mcl_hardness = 0.7,
})
--cap
minetest.register_node("df_trees:nether_cap", {
description = nethercap_name,
_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 = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1, nether_cap = 1, handy=1,axey=1, building_block=1, material_wood=1},
sounds = df_dependencies.sound_wood({footstep = {name = df_dependencies.soundfile_snow_footstep, gain = 0.2},}),
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
--gills
minetest.register_node("df_trees:nether_cap_gills", {
description = S("@1 Gills", nethercap_name),
_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 = false,
light_source = 6,
groups = {snappy = 3, leafdecay = 1, leaves = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1, nether_cap = 1,handy=1, hoey=1, shearsy=1, swordy=1, deco_block=1, dig_by_piston=1},
sounds = df_dependencies.sound_leaves(),
drawtype = "plantlike",
paramtype = "light",
drop = {
max_items = 1,
items = {
{
items = {'df_trees:nether_cap_sapling'},
rarity = 5,
},
{
items = {'df_trees:nether_cap_gills'},
}
}
},
after_place_node = df_dependencies.after_place_leaves,
place_param2 = 1, -- Prevent leafdecay for placed nodes
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
})
df_dependencies.register_leafdecay({
trunks = {"df_trees:nether_cap"}, -- don't need stem nodes here
leaves = {"df_trees:nether_cap_gills"},
radius = 1,
})
--Wood
minetest.register_craft({
output = 'df_trees:nether_cap_wood 4',
recipe = {
{'df_trees:nether_cap'},
}
})
minetest.register_craft({
output = 'df_trees:nether_cap_wood 4',
recipe = {
{'df_trees:nether_cap_stem'},
}
})
minetest.register_node("df_trees:nether_cap_wood", {
description = S("@1 Planks", nethercap_name),
_doc_items_longdesc = df_trees.doc.nether_cap_desc,
_doc_items_usagehelp = df_trees.doc.nether_cap_usage,
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"dfcaverns_nether_cap_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, wood = 1, freezes_water = 1, handy=1,axey=1,building_block=1, material_wood=1},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
df_dependencies.register_all_stairs_and_fences("nether_cap_wood")
-- sapling
minetest.register_node("df_trees:nether_cap_sapling", {
description = S("@1 Spawn", nethercap_name),
_doc_items_longdesc = df_trees.doc.nether_cap_desc,
_doc_items_usagehelp = df_trees.doc.nether_cap_usage,
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"dfcaverns_nether_cap_sapling.png"},
inventory_image = "dfcaverns_nether_cap_sapling.png",
wield_image = "dfcaverns_nether_cap_sapling.png",
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",
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3,
attached_node = 1, sapling = 1, light_sensitive_fungus = 11, dig_immediate=3,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1},
sounds = df_dependencies.sound_leaves(),
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
on_construct = function(pos)
if df_trees.nether_cap_growth_permitted(pos) then
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
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,
})
local c_stem = minetest.get_content_id("df_trees:nether_cap_stem")
local c_cap = minetest.get_content_id("df_trees:nether_cap")
local c_gills = minetest.get_content_id("df_trees:nether_cap_gills")
df_trees.spawn_nether_cap = function(pos)
local x, y, z = pos.x, pos.y, pos.z
local stem_height = math.random(1,3)
local cap_radius = math.random(2,3)
local maxy = y + stem_height + 3
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(
{x = x - cap_radius, y = y, z = z - cap_radius},
{x = x + cap_radius, y = maxy + 3, z = z + cap_radius}
)
local area = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
subterrane.giant_mushroom(area:indexp(pos), area, data, c_stem, c_cap, c_gills, stem_height, cap_radius)
vm:set_data(data)
vm:write_to_map()
vm:update_map()
end
df_trees.spawn_nether_cap_vm = function(vi, area, data)
local stem_height = math.random(1,3)
local cap_radius = math.random(2,3)
subterrane.giant_mushroom(vi, area, data, c_stem, c_cap, c_gills, stem_height, cap_radius)
end
local water = df_dependencies.node_name_water_source
local river_water = df_dependencies.node_name_river_water_source
local ice = df_dependencies.node_name_ice
local water_flowing = df_dependencies.node_name_water_flowing
local river_water_flowing = df_dependencies.node_name_river_water_flowing
local snow = df_dependencies.node_name_snow
minetest.register_abm{
label = "water freezing",
nodenames = {water, river_water,},
neighbors = {"group:freezes_water"},
interval = 1,
chance = 5,
catch_up = true,
action = function(pos)
minetest.swap_node(pos, {name=ice})
end,
}
minetest.register_abm{
label = "flowing water freezing",
nodenames = {water_flowing, river_water_flowing},
neighbors = {"group:freezes_water"},
interval = 1,
chance = 1,
catch_up = true,
action = function(pos)
minetest.swap_node(pos, {name=snow})
end,
}
@@ -0,0 +1,52 @@
-- these methods should indicate whether a sapling placed at pos should bother attempting to grow.
-- check soil conditions and biome here, for example.
local stone_with_coal = df_dependencies.node_name_stone_with_coal
local coalblock = df_dependencies.node_name_coalblock
local is_coal = function(name)
return name == stone_with_coal or name == coalblock
end
df_trees.black_cap_growth_permitted = function(pos)
local below_name = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
return minetest.get_item_group(below_name, "soil") > 0 or is_coal(below_name)
end
df_trees.blood_thorn_growth_permitted = function(pos)
return minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "sand") > 0
end
df_trees.fungiwood_growth_permitted = function(pos)
return minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") > 0
end
df_trees.goblin_cap_growth_permitted = function(pos)
return minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") > 0
end
df_trees.nether_cap_growth_permitted = function(pos)
local below_name = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
return (minetest.get_item_group(below_name, "cools_lava") > 0 or minetest.get_item_group(below_name, "ice") > 0)
and minetest.get_item_group(below_name, "nether_cap") == 0
end
df_trees.spindlestem_growth_permitted = function(pos)
return minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") > 0
end
df_trees.spore_tree_growth_permitted = function(pos)
return minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") > 0
end
df_trees.torchspine_growth_permitted = function(pos)
local below_name = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
return minetest.get_item_group(below_name, "flammable") > 0 or is_coal(below_name)
end
df_trees.tower_cap_growth_permitted = function(pos)
return minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") > 0
end
df_trees.tunnel_tube_growth_permitted = function(pos)
return minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") > 0
end
@@ -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,
}
}
@@ -0,0 +1,254 @@
local n1 = { name = "air", prob = 0 } -- external air
local n2 = { name = "df_trees:goblin_cap" }
local n3 = {name = df_dependencies.node_name_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 = df_dependencies.node_name_door_wood_a or "air", force_place=true }
local n9 = { name = df_dependencies.node_name_door_hidden or "air", force_place=true }
local n10 = { name = df_dependencies.node_name_furnace, param2 = 3, force_place=true }
local n11 = { name = "air", force_place=true } -- internal air
local n12 = { name = df_dependencies.node_name_bed_bottom or "air", force_place=true }
local n13 = { name = "df_trees:goblin_cap_stem", prob = 198, force_place=true } -- possible window holes
local n16 = { name = df_dependencies.node_name_chest, param2 = 3, force_place=true }
local n17 = { name = df_dependencies.node_name_bed_top or "air", force_place=true }
local n18 = { name = df_dependencies.node_name_torch_wall, param2 = 4, force_place=true }
local n19 = { name = "df_trees:goblin_cap_stem" } -- base
local n20 = {name = df_dependencies.node_name_stair_goblin_cap_stem_wood, param2 = 1 }
local n21 = {name = df_dependencies.node_name_stair_goblin_cap_stem_wood, param2 = 3 }
local n22 = {name = df_dependencies.node_name_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 df_dependencies.node_name_stair_goblin_cap_stem_wood then
-- replace stairs with air
n3 = n1
n20 = n1
n21 = n1
n22 = n1
end
local schematic = {
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,
}
}
for index, node in ipairs(schematic.data) do
assert(node.name ~= nil, "undefined node name for index " .. tostring(index) .. " in goblin_cap_big_hut schematic data")
end
return schematic
@@ -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,
}
}
@@ -0,0 +1,314 @@
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 = df_dependencies.node_name_furnace, param2 = 2, force_place=true }
local n9 = { name = "air", force_place=true } -- internal air
local n10 = { name = df_dependencies.node_name_torch_wall, param2 = 3, force_place = true }
local n12 = {name = df_dependencies.node_name_slab_goblin_cap_stem_wood, param2 = 2} -- porch top
local n13 = { name = df_dependencies.node_name_door_wood_a or "air", param2 = 3, force_place = true }
local n14 = { name = df_dependencies.node_name_door_hidden or "air", param2 = 3, force_place = true }
local n15 = n9 -- internal air, but could be a vessel shelf
local n16 = { name = df_dependencies.node_name_bed_top or "air", param2 = 3, force_place = true }
local n17 = { name = df_dependencies.node_name_bed_bottom or "air", param2 = 3, force_place = true }
local n18 = { name = df_dependencies.node_name_chest, force_place = true }
local n19 = { name = df_dependencies.node_name_torch_wall, param2 = 2, force_place = true }
local n20 = {name = df_dependencies.node_name_stair_goblin_cap_stem_wood }
local n21 = {name = df_dependencies.node_name_stair_goblin_cap_stem_wood, param2 = 2 }
local n22 = {name = df_dependencies.node_name_slab_goblin_cap_stem_wood, param2 = 22}
if df_dependencies.node_name_shelf then
-- replace torches with glowing bottles, add vessel shelf
n10 = { name = "df_trees:glowing_bottle_red", force_place=true}
n19 = n10
n15 = { name = df_dependencies.node_name_shelf, param2 = 3, force_place = true }
end
local schematic = {
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,
}
}
for index, node in ipairs(schematic.data) do
assert(node.name ~= nil, "undefined node name for index " .. tostring(index) .. " in goblin_cap_bigger_hut schematic data")
end
return schematic
+10
View File
@@ -0,0 +1,10 @@
dfcaverns_tree_min_growth_delay (Minimum sapling growth delay) int 2400
dfcaverns_tree_max_growth_delay (Maximum sapling growth delay) int 4800
dfcaverns_fungiwood_delay_multiplier (fungiwood growth delay multiplier) float 1
dfcaverns_tunnel_tube_delay_multiplier (tunnel_tube growth delay multiplier) float 1
dfcaverns_spore_tree_delay_multiplier (spore_tree growth delay multiplier) float 1
dfcaverns_black_cap_delay_multiplier (black_cap growth delay multiplier) float 1
dfcaverns_nether_cap_delay_multiplier (nether_cap growth delay multiplier) float 1
dfcaverns_goblin_cap_delay_multiplier (goblin_cap growth delay multiplier) float 1
dfcaverns_tower_cap_delay_multiplier (tower_cap growth delay multiplier) float 1
dfcaverns_blood_thorn_delay_multiplier (blood_thorn growth delay multiplier) float 1
@@ -0,0 +1,5 @@
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
dfcaverns_torchspine_loop is from https://freesound.org/people/PegasusCZ/sounds/569332/ by PegasusCZ under the CC0 public domain license
dfcaverns_torchspine_ignite is from https://freesound.org/people/deleted_user_4772965/sounds/256510/ by Patrick Hunt5 under the CC0 public domain license
+415
View File
@@ -0,0 +1,415 @@
local S = minetest.get_translator(minetest.get_current_modname())
local glass_bottle = df_dependencies.node_name_glass_bottle
-- pre-declare
local get_spindlestem_cap_type
-- Copied from subterrane's features.lua
-- Figured that was nicer than adding a dependency for just this little bit
local function copy_pointed_thing(pointed_thing)
return {
type = pointed_thing.type,
above = pointed_thing.above and vector.copy(pointed_thing.above),
under = pointed_thing.under and vector.copy(pointed_thing.under),
ref = pointed_thing.ref,
}
end
local stem_on_place = function(itemstack, placer, pointed_thing)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
return itemstack
end
if pt.type ~= "node" then
return itemstack
end
local under = minetest.get_node(pt.under)
local above = minetest.get_node(pt.above)
if minetest.is_protected(pt.above, placer:get_player_name()) then
minetest.record_protection_violation(pt.above, placer:get_player_name())
return
end
-- return if any of the nodes is not registered
if not minetest.registered_nodes[under.name] or not minetest.registered_nodes[above.name] then
return itemstack
end
-- check if you can replace the node above the pointed node
if not minetest.registered_nodes[above.name].buildable_to then
return itemstack
end
local new_param2
-- check if pointing at an existing spindlestem
if minetest.get_item_group(under.name, "spindlestem") > 0 then
new_param2 = under.param2
else
new_param2 = math.random(0,3)
end
-- add the node and remove 1 item from the itemstack
local newnode= {name = itemstack:get_name(), param2 = new_param2, param1=0}
local oldnode= minetest.get_node(pt.above)
minetest.add_node(pt.above, newnode)
-- Run script hook
local take_item = true
for _, callback in ipairs(core.registered_on_placenodes) do
-- Deepcopy pos, node and pointed_thing because callback can modify them
local place_to_copy = vector.copy(pt.above)
local newnode_copy = {name=newnode.name, param1=newnode.param1, param2=newnode.param2}
local oldnode_copy = {name=oldnode.name, param1=oldnode.param1, param2=oldnode.param2}
local pointed_thing_copy = copy_pointed_thing(pointed_thing)
if callback(place_to_copy, newnode_copy, placer, oldnode_copy, itemstack, pointed_thing_copy) then
take_item = false
end
end
if not minetest.is_creative_enabled(placer:get_player_name()) and take_item then
itemstack:take_item()
end
return itemstack
end
local growth_delay = function()
return 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
local disp = 0.0625 -- adjusting position a bit
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 = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, spindlestem = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
tiles = {
"dfcaverns_tower_cap.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
node_box = {
type = "fixed",
fixed = {
{-0.0625+disp, -0.5, -0.125+disp, 0.1875+disp, 0.5, 0.25+disp},
{-0.125+disp, -0.5, -0.0625+disp, 0.25+disp, 0.5, 0.1875+disp},
}
},
on_place = stem_on_place,
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:spindlestem_stem",
burntime = 5,
})
local register_spindlestem_type = function(item_suffix, colour_name, colour_code, light_level, extract_color_group)
local cap_item = "df_trees:spindlestem_cap_"..item_suffix
local cap_item_harvested = "df_trees:spindlestem_cap_harvested_"..item_suffix
local cap_def = {
description = S("@1 Spindlestem Cap", colour_name),
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, not_in_creative_inventory = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
tiles = {
"dfcaverns_tower_cap.png^[multiply:#"..colour_code,
"dfcaverns_spindlestem_cap.png^[multiply:#"..colour_code,
"dfcaverns_tower_cap.png^[multiply:#"..colour_code,
"dfcaverns_tower_cap.png^[multiply:#"..colour_code,
"dfcaverns_tower_cap.png^[multiply:#"..colour_code,
"dfcaverns_tower_cap.png^[multiply:#"..colour_code,
},
light_source = light_level,
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
node_box = {
type = "fixed",
fixed = {
{-0.1875+disp, -0.5, -0.3125+disp, 0.3125+disp, -0.3125, 0.4375+disp},
{-0.3125+disp, -0.5, -0.1875+disp, 0.4375+disp, -0.3125, 0.3125+disp},
{-0.0625+disp, -0.1875, -0.0625+disp, 0.1875+disp, -0.125, 0.1875+disp},
{-0.1875+disp, -0.3125, -0.1875+disp, 0.3125+disp, -0.1875, 0.3125+disp},
}
},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
drop = {
-- Maximum number of items to drop
max_items = 1,
-- Choose max_items randomly from this list
items = {
{
items = {cap_item_harvested, "df_trees:spindlestem_seedling"}, -- Items to drop
rarity = 2, -- Probability of dropping is 1 / rarity
},
{
items = {cap_item_harvested, "df_trees:spindlestem_seedling", "df_trees:spindlestem_seedling"}, -- Items to drop
rarity = 2, -- Probability of dropping is 1 / rarity
},
{
items = {cap_item_harvested, "df_trees:spindlestem_seedling", "df_trees:spindlestem_seedling", "df_trees:spindlestem_seedling"}, -- Items to drop
rarity = 2, -- Probability of dropping is 1 / rarity
},
{
items = {cap_item_harvested}, -- Items to drop
rarity = 1, -- Probability of dropping is 1 / rarity
},
},
},
on_place = stem_on_place,
on_timer = function(pos, elapsed)
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)
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(pos)
meta:set_int("spindlestem_to_grow", height)
meta:set_int("spindlestem_delay", delay)
minetest.get_node_timer(pos):start(delay-elapsed)
end
end,
}
local cap_def_harvested = {}
for key, val in pairs(cap_def) do
cap_def_harvested[key] = val
end
cap_def_harvested.groups = {}
for key, val in pairs(cap_def.groups) do
cap_def_harvested.groups[key] = val
end
cap_def_harvested.drop = nil -- harvested caps shouldn't drop spawn
cap_def_harvested.on_timer = nil -- harvested caps shouldn't grow, just in case a timer and node metadata are set up where it's placed
cap_def_harvested.groups.not_in_creative_inventory = nil
minetest.register_node(cap_item, cap_def)
minetest.register_node(cap_item_harvested, cap_def_harvested)
minetest.register_craft({
type = "fuel",
recipe = cap_item_harvested,
burntime = 10,
})
if glass_bottle and light_level > 0 then
local tex = "dfcaverns_vessels_glowing_liquid.png^[multiply:#"..colour_code.."^"..df_dependencies.texture_glass_bottle
local new_light = light_level + math.floor((minetest.LIGHT_MAX-light_level)/2)
local groups = {vessel = 1, dig_immediate = 3, attached_node = 1, material_glass = 1, destroy_by_lava_flow=1}
if extract_color_group then
groups[extract_color_group] = 1
end
minetest.register_node("df_trees:glowing_bottle_"..item_suffix, {
description = S("@1 Spindlestem Extract", colour_name),
drawtype = "plantlike",
_doc_items_longdesc = df_trees.doc["spindlestem_extract_"..item_suffix.."_desc"],
_doc_items_usagehelp = df_trees.doc["spindlestem_extract_"..item_suffix.."_usage"],
tiles = {tex},
inventory_image = tex,
wield_image = tex,
paramtype = "light",
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
},
groups = groups,
sounds = df_dependencies.sound_glass(),
light_source = new_light,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
minetest.register_craft( {
output = "df_trees:glowing_bottle_"..item_suffix.." 3",
type = "shapeless",
recipe = {
glass_bottle,
glass_bottle,
glass_bottle,
cap_item_harvested,
}
})
minetest.register_craft( {
output = glass_bottle,
type = "shapeless",
recipe = {
"df_trees:glowing_bottle_"..item_suffix,
}
})
end
end
minetest.register_node("df_trees:spindlestem_seedling", {
description = S("Spindlestem Spawn"),
_doc_items_longdesc = df_trees.doc.spindlestem_desc,
_doc_items_usagehelp = df_trees.doc.spindlestem_usage,
tiles = {
"dfcaverns_tower_cap.png",
},
groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, light_sensitive_fungus = 11, digtron_on_place=1, dig_immediate=3,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
walkable = false,
floodable = true,
node_box = {
type = "fixed",
fixed = {
{-0.0625 + 0.125, -0.5, -0.125 + 0.125, 0.125 + 0.125, -0.375, 0.0625 + 0.125},
}
},
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
on_place = stem_on_place,
on_construct = function(pos)
if df_trees.spindlestem_growth_permitted(pos) then
minetest.get_node_timer(pos):start(growth_delay())
end
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
df_trees.spawn_spindlestem(pos)
end,
})
df_trees.spawn_spindlestem = function(pos)
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})
local disp = {x=3, y=3, z=3}
local nearby = minetest.find_nodes_in_area(vector.add(pos, disp), vector.subtract(pos, disp), {"group:spindlestem"})
local count = #nearby
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()
local meta = minetest.get_meta(pos)
meta:set_int("spindlestem_to_grow", height)
meta:set_int("spindlestem_delay", delay)
minetest.get_node_timer(pos):start(delay)
end
end
register_spindlestem_type("white", S("White"), "FFFFFF", 0)
register_spindlestem_type("red", S("Red"), "FFC3C3", 3, "color_red")
register_spindlestem_type("green", S("Green"), "C3FFC3", 4, "color_green")
register_spindlestem_type("cyan", S("Cyan"), "C3FFFF", 6, "color_cyan")
register_spindlestem_type("golden", S("Golden"), "FFFFC3", 12, "color_yellow")
local c_air = minetest.get_content_id("air")
local c_stem = minetest.get_content_id("df_trees:spindlestem_stem")
df_trees.spawn_spindlestem_vm = function(vi, area, data, data_param2, c_cap)
if data[vi] ~= c_air then return end
if c_cap == nil then
-- note: this won't account for rock removed by subterrane, so may not be entirely accurate. Good enough!
c_cap = get_spindlestem_cap_type(area:position(vi))
end
local stem_height = math.random(1,3)
local param2 = math.random(1,4)-1
local i = 0
local top = 0
local index
while i <= stem_height do
index = vi + i * area.ystride
if data[index] == c_air then
data[index] = c_stem
data_param2[index] = param2
top = i
else
i = 100
end
i = i + 1
end
index = vi + top * area.ystride
data[index] = c_cap
end
local c_white = minetest.get_content_id("df_trees:spindlestem_cap_white")
local c_red = minetest.get_content_id("df_trees:spindlestem_cap_red")
local c_green = minetest.get_content_id("df_trees:spindlestem_cap_green")
local c_cyan = minetest.get_content_id("df_trees:spindlestem_cap_cyan")
local c_golden = minetest.get_content_id("df_trees:spindlestem_cap_golden")
local iron_nodes = df_dependencies.data_iron_containing_nodes
local copper_nodes = df_dependencies.data_copper_containing_nodes
local mese_nodes = df_dependencies.data_mese_containing_nodes
get_spindlestem_cap_type = function(pos)
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
return c_red
end
local iron = minetest.find_node_near(pos, 5, iron_nodes)
local copper = minetest.find_node_near(pos, 5, copper_nodes)
local mese = minetest.find_node_near(pos, 5, mese_nodes)
local possibilities = {}
if mese then table.insert(possibilities, c_golden) end
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
local pick = math.random(1, #possibilities)
return possibilities[pick]
end
end
+349
View File
@@ -0,0 +1,349 @@
--------------------------------------------------
-- Spore Tree
-- Teal
-- raining spores
-- Max trunk height 5
-- depth 2-3
local S = minetest.get_translator(minetest.get_current_modname())
minetest.register_node("df_trees:spore_tree", {
description = S("Spore Tree Stem"),
_doc_items_longdesc = df_trees.doc.spore_tree_desc,
_doc_items_usagehelp = df_trees.doc.spore_tree_usage,
tiles = {"dfcaverns_spore_tree_top.png", "dfcaverns_spore_tree_top.png", "dfcaverns_spore_tree.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
on_place = minetest.rotate_node,
})
--Wood
minetest.register_craft({
output = "df_trees:spore_tree_wood 4",
recipe = {
{"df_trees:spore_tree"},
}
})
minetest.register_node("df_trees:spore_tree_wood", {
description = S("Spore Tree Planks"),
_doc_items_longdesc = df_trees.doc.spore_tree_desc,
_doc_items_usagehelp = df_trees.doc.spore_tree_usage,
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"dfcaverns_spore_tree_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 3,
_mcl_hardness = 2,
})
df_dependencies.register_all_stairs_and_fences("spore_tree_wood", {burntime = 6})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:spore_tree_wood",
burntime = 6,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:spore_tree",
burntime = 20,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:spore_tree_hyphae",
burntime = 2,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:spore_tree_fruiting_body",
burntime = 2,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:spore_tree_sapling",
burntime = 1,
})
minetest.register_node("df_trees:spore_tree_hyphae", {
description = S("Spore Tree Hyphae"),
_doc_items_longdesc = df_trees.doc.spore_tree_desc,
_doc_items_usagehelp = df_trees.doc.spore_tree_usage,
waving = 1,
tiles = {"dfcaverns_spore_tree.png"},
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1, spore_tree_hyphae = 1,handy=1, hoey=1, shearsy=1, swordy=1, deco_block=1, dig_by_piston=1, fire_encouragement=15, fire_flammability=30, compostability=30},
walkable = false,
climbable = true,
drawtype = "nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625},
{-0.0625, -0.0625, -0.5, 0.0625, 0.0625, 0.5},
{-0.5, -0.0625, -0.0625, 0.5, 0.0625, 0.0625},
}
},
sounds = df_dependencies.sound_leaves(),
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
after_place_node = df_dependencies.after_place_leaves,
place_param2 = 1, -- Prevent leafdecay for placed nodes
})
minetest.register_node("df_trees:spore_tree_fruiting_body", {
description = S("Spore Tree Fruiting Body"),
_doc_items_longdesc = df_trees.doc.spore_tree_desc,
_doc_items_usagehelp = df_trees.doc.spore_tree_usage,
waving = 1,
tiles = {"dfcaverns_spore_tree.png"},
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1, spore_tree_hyphae = 1,handy=1, hoey=1, shearsy=1, swordy=1, deco_block=1, dig_by_piston=1, fire_encouragement=15, fire_flammability=30, compostability=100},
walkable = false,
climbable = true,
_mcl_blast_resistance = 0.7,
_mcl_hardness = 0.7,
drawtype = "nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625},
{-0.0625, -0.0625, -0.5, 0.0625, 0.0625, 0.5},
{-0.5, -0.0625, -0.0625, 0.5, 0.0625, 0.0625},
{-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
}
},
drop = {
max_items = 1,
items = {
{
items = {'df_trees:spore_tree_sapling'},
rarity = 2,
},
{
items = {'df_trees:spore_tree_hyphae'},
}
}
},
sounds = df_dependencies.sound_leaves(),
after_place_node = df_dependencies.after_place_leaves,
place_param2 = 1, -- Prevent leafdecay for placed nodes
})
df_dependencies.register_leafdecay({
trunks = {"df_trees:spore_tree"},
leaves = {"df_trees:spore_tree_hyphae", "df_trees:spore_tree_fruiting_body"},
radius = 3,
})
minetest.register_node("df_trees:spore_tree_sapling", {
description = S("Spore Tree Spawn"),
_doc_items_longdesc = df_trees.doc.spore_tree_desc,
_doc_items_usagehelp = df_trees.doc.spore_tree_usage,
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"dfcaverns_spore_tree_sapling.png"},
inventory_image = "dfcaverns_spore_tree_sapling.png",
wield_image = "dfcaverns_spore_tree_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
floodable = true,
selection_box = {
type = "fixed",
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1, light_sensitive_fungus = 11, dig_immediate=3,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
sounds = df_dependencies.sound_leaves(),
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
on_construct = function(pos)
if df_trees.spore_tree_growth_permitted(pos) 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))
end
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,
})
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
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, 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
if has_fruiting_bodies == nil then has_fruiting_bodies = math.random() < 0.5 end
local pos = area:position(vi)
local x, y, z = pos.x, pos.y, pos.z
local has_fruiting_bodies = true
-- Trunk
for yy = y, y + height - 1 do
local vi = area:index(x, yy, z)
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
-- Force leaves near the trunk
for z_dist = -1, 1 do
for y_dist = -size, 1 do
local vi = area:index(x - 1, y + height + y_dist, z + z_dist)
for x_dist = -1, 1 do
if data[vi] == c_air or data[vi] == c_ignore then
if has_fruiting_bodies and math.random() < 0.3 then
data[vi] = c_spore_pod
else
data[vi] = c_spore_frond
end
data_param2[vi] = 0
end
vi = vi + 1
end
end
end
-- Randomly add fronds in 2x2x2 clusters.
for i = 1, iters do
local clust_x = x + math.random(-size, size - 1)
local clust_y = y + height + math.random(-size, 0)
local clust_z = z + math.random(-size, size - 1)
for xi = 0, 1 do
for yi = 0, 1 do
for zi = 0, 1 do
local vi = area:index(clust_x + xi, clust_y + yi, clust_z + zi)
if data[vi] == c_air or data[vi] == c_ignore then
if has_fruiting_bodies and math.random() < 0.3 then
data[vi] = c_spore_pod
else
data[vi] = c_spore_frond
end
data_param2[vi] = 0
end
end
end
end
end
end
df_trees.spawn_spore_tree = function(pos)
local x, y, z = pos.x, pos.y, pos.z
local height = math.random(4, 5)
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(
{x = x - 2, y = y, z = z - 2},
{x = x + 2, y = y + height + 1, z = z + 2}
)
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, data_param_2)
vm:set_data(data)
vm:set_param2_data(data_param_2)
vm:write_to_map()
vm:update_map()
end
minetest.register_abm{
label = "spore tree raining spores",
nodenames = {"df_trees:spore_tree_fruiting_body"},
interval = 1,
chance = 30,
catch_up = false,
action = function(pos)
minetest.add_particle({
pos = pos,
velocity = {x=math.random() * 0.2 - 0.1, y=-1, z=math.random() * 0.2 - 0.1},
acceleration = {x=0, y=0, z=0},
expirationtime = 3,
size = 10,
collisiondetection = false,
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,
}
minetest.register_craft({
output = 'df_trees:spore_tree_ladder 2',
recipe = {
{'group:spore_tree_hyphae'},
}
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:spore_tree_ladder",
burntime = 1,
})
minetest.register_node("df_trees:spore_tree_ladder", {
description = S("Spore Tree Ladder"),
drawtype = "signlike",
tiles = {"dfcaverns_spore_tree_ladder.png"},
inventory_image = "dfcaverns_spore_tree_ladder.png",
wield_image = "dfcaverns_spore_tree_ladder.png",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
climbable = true,
is_ground_content = false,
selection_box = {
type = "wallmounted",
},
groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2, handy=1,axey=1, attached_node=1, deco_block=1, dig_by_piston=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
legacy_wallmounted = true,
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
})
Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

@@ -0,0 +1,10 @@
All textures not specifically listed here are created by FaceDeer and released under both the MIT license and under the Creative Commons CC0 license.
dfcaverns_blood_thorn - derived from default cactus
dfcaverns_black_cap - derived from default coal block
dfcaverns_goblin_cap - derived from default red coral
dfcaverns_nether_cap_stem - derived from default red coral
dfcaverns_tower_cap - derived from default dead coral
dfcaverns_tunnel_tube - derived from moretrees palm tree bark
dfcaverns_tower_cap_gills - from caverealms mushroom gills
dfcaverns_spore_tree_spores - derived from farming wheat seed
+411
View File
@@ -0,0 +1,411 @@
local S = minetest.get_translator(minetest.get_current_modname())
local torchspine_min_delay = df_trees.config.blood_thorn_delay_multiplier*df_trees.config.tree_min_growth_delay
local torchspine_max_delay = df_trees.config.blood_thorn_delay_multiplier*df_trees.config.tree_max_growth_delay
local looped_node_sound_modpath = minetest.get_modpath("looped_node_sound")
-- Rather than make this whole mod depend on subterrane just for this, I copied and pasted a chunk of stalactite code.
local x_disp = 0.125
local z_disp = 0.125
local function copy_pointed_thing(pointed_thing)
return {
type = pointed_thing.type,
above = pointed_thing.above and vector.copy(pointed_thing.above),
under = pointed_thing.under and vector.copy(pointed_thing.under),
ref = pointed_thing.ref,
}
end
local stal_on_place = function(itemstack, placer, pointed_thing)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
return itemstack
end
if pt.type ~= "node" then
return itemstack
end
local under = minetest.get_node(pt.under)
local above = minetest.get_node(pt.above)
if minetest.is_protected(pt.above, placer:get_player_name()) then
minetest.record_protection_violation(pt.above, placer:get_player_name())
return
end
-- return if any of the nodes is not registered
if not minetest.registered_nodes[under.name] or not minetest.registered_nodes[above.name] then
return itemstack
end
-- check if you can replace the node above the pointed node
if not minetest.registered_nodes[above.name].buildable_to then
return itemstack
end
local new_param2
-- check if pointing at an existing stalactite
if minetest.get_item_group(under.name, "subterrane_stal_align") ~= 0 then
new_param2 = under.param2
else
new_param2 = math.random(0,3)
end
-- add the node and remove 1 item from the itemstack
local newnode= {name = itemstack:get_name(), param2 = new_param2, param1=0}
local oldnode= minetest.get_node(pt.above)
minetest.add_node(pt.above, {name = itemstack:get_name(), param2 = new_param2})
-- Run script hook
local take_item = true
for _, callback in ipairs(core.registered_on_placenodes) do
-- Deepcopy pos, node and pointed_thing because callback can modify them
local place_to_copy = vector.copy(pt.above)
local newnode_copy = {name=newnode.name, param1=newnode.param1, param2=newnode.param2}
local oldnode_copy = {name=oldnode.name, param1=oldnode.param1, param2=oldnode.param2}
local pointed_thing_copy = copy_pointed_thing(pointed_thing)
if callback(place_to_copy, newnode_copy, placer, oldnode_copy, itemstack, pointed_thing_copy) then
take_item = false
end
end
if not minetest.is_creative_enabled(placer:get_player_name()) and take_item then
itemstack:take_item()
end
return itemstack
end
local stal_box_1 = {{-0.0625+x_disp, -0.5, -0.0625+z_disp, 0.0625+x_disp, 0.5, 0.0625+z_disp}}
local stal_box_2 = {{-0.125+x_disp, -0.5, -0.125+z_disp, 0.125+x_disp, 0.5, 0.125+z_disp}}
local stal_box_3 = {{-0.25+x_disp, -0.5, -0.25+z_disp, 0.25+x_disp, 0.5, 0.25+z_disp}}
local stal_box_4 = {{-0.375+x_disp, -0.5, -0.375+z_disp, 0.375+x_disp, 0.5, 0.375+z_disp}}
local torchspine_list = {"df_trees:torchspine_1","df_trees:torchspine_2","df_trees:torchspine_3","df_trees:torchspine_4"}
local grow_torchspine = function(pos)
local param2 = minetest.get_node(pos).param2
if param2 > 3 then
return -- tipped over, don't grow
end
local node_above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
local node_above_def = minetest.registered_nodes[node_above.name]
if not node_above_def.buildable_to then
-- don't grow, but do continue cycling the torch state
minetest.swap_node(pos, {name = "df_trees:torchspine_1", param2 = param2})
minetest.get_node_timer(pos):start(math.random(torchspine_min_delay, torchspine_max_delay))
return
end
local pos_base = vector.new(pos)
local height = 1
for i = 1,3 do
pos_base.y = pos_base.y-1
if minetest.get_item_group(minetest.get_node(pos_base).name, "df_trees_torchspine") > 0 then
height = height + 1
else
break
end
end
if height >= 4 then
-- don't grow, but do continue cycling the torch state
minetest.swap_node(pos, {name = "df_trees:torchspine_1", param2 = param2})
minetest.get_node_timer(pos):start(math.random(torchspine_min_delay, torchspine_max_delay))
return
end
-- place a taller torchspine
pos.y = pos.y + 1
minetest.get_node_timer(pos):start(math.random(torchspine_min_delay, torchspine_max_delay))
for i = 1, height+1 do
minetest.swap_node(pos, {name=torchspine_list[i], param2 = param2})
pos.y = pos.y - 1
end
end
local torch_node = df_dependencies.node_name_torch
minetest.register_node("df_trees:torchspine_1", {
description = S("Torchspine Tip"),
_doc_items_longdesc = df_trees.doc.torchspine_desc,
_doc_items_usagehelp = df_trees.doc.torchspine_usage,
tiles = {"dfcaverns_torchspine_0.5.png", "dfcaverns_torchspine_1.5.png", "dfcaverns_torchspine_1.png"},
groups = {oddly_breakable_by_hand = 1, subterrane_stal_align = 1, flow_through = 1, fall_damage_add_percent = 100, df_trees_torchspine = 1, pickaxey=1, building_block=1, material_stone=1},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
drop = torch_node,
node_box = {
type = "fixed",
fixed = stal_box_1,
},
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
on_place = stal_on_place,
on_punch = function(pos, node, puncher)
if puncher:get_wielded_item():get_name() == torch_node then
minetest.swap_node(pos, {name = "df_trees:torchspine_1_lit", param2 = node.param2})
end
end,
on_timer = function(pos)
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})
minetest.sound_play({pos = pos}, {name="dfcaverns_torchspine_ignite"}, true)
end
minetest.get_node_timer(pos):start(math.random(torchspine_min_delay, torchspine_max_delay))
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
})
minetest.register_node("df_trees:torchspine_1_lit", {
description = S("Torchspine Tip"),
_doc_items_longdesc = df_trees.doc.torchspine_desc,
_doc_items_usagehelp = df_trees.doc.torchspine_usage,
tiles = {df_dependencies.texture_gold_block, "dfcaverns_torchspine_1.5.png", "dfcaverns_torchspine_1_lit.png"},
groups = {oddly_breakable_by_hand = 1, subterrane_stal_align = 1, flow_through = 1, torch = 1, fall_damage_add_percent = 150, smokey = 4, df_trees_torchspine = 1,pickaxey=1, building_block=1, material_stone=1,set_on_fire=3},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
light_source = 8,
is_ground_content = false,
drop = torch_node .. " 2",
node_box = {
type = "fixed",
fixed = stal_box_1,
},
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
on_place = stal_on_place,
on_timer = function(pos)
grow_torchspine(pos)
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
})
if looped_node_sound_modpath then
looped_node_sound.register({
node_list = {"df_trees:torchspine_1_lit"},
sound = "dfcaverns_torchspine_loop",
max_gain = 0.5,
gain_per_node = 0.05,
})
end
minetest.register_node("df_trees:torchspine_2", {
description = S("Torchspine"),
_doc_items_longdesc = df_trees.doc.torchspine_desc,
_doc_items_usagehelp = df_trees.doc.torchspine_usage,
tiles = {"dfcaverns_torchspine_1.5.png", "dfcaverns_torchspine_2.5.png", "dfcaverns_torchspine_2.png"},
groups = {oddly_breakable_by_hand = 1, subterrane_stal_align = 1, flow_through = 1, fall_damage_add_percent = 50, df_trees_torchspine = 1,pickaxey=1, building_block=1, material_stone=1},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
node_box = {
type = "fixed",
fixed = stal_box_2,
},
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
drop = {
max_items = 1,
items = {
{
items = {"df_trees:torchspine_ember"}, -- Items to drop
rarity = 2, -- Probability of dropping is 1 / rarity
},
},
},
on_place = stal_on_place,
})
minetest.register_node("df_trees:torchspine_3", {
description = S("Torchspine"),
_doc_items_longdesc = df_trees.doc.torchspine_desc,
_doc_items_usagehelp = df_trees.doc.torchspine_usage,
tiles = {"dfcaverns_torchspine_2.5.png", "dfcaverns_torchspine_3.5.png", "dfcaverns_torchspine_3.png"},
groups = {oddly_breakable_by_hand = 1, subterrane_stal_align = 1, flow_through = 1, df_trees_torchspine = 1,pickaxey=1, building_block=1, material_stone=1},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
node_box = {
type = "fixed",
fixed = stal_box_3,
},
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
drop = {
max_items = 1,
items = {
{
items = {"df_trees:torchspine_ember"}, -- Items to drop
rarity = 2, -- Probability of dropping is 1 / rarity
},
{
items = {"df_trees:torchspine_ember 2"}, -- Items to drop
rarity = 2, -- Probability of dropping is 1 / rarity
},
},
},
on_place = stal_on_place,
})
minetest.register_node("df_trees:torchspine_4", {
description = S("Torchspine"),
_doc_items_longdesc = df_trees.doc.torchspine_desc,
_doc_items_usagehelp = df_trees.doc.torchspine_usage,
tiles = {"dfcaverns_torchspine_3.5.png", "dfcaverns_torchspine_4.5.png", "dfcaverns_torchspine_4.png"},
groups = {oddly_breakable_by_hand = 1, subterrane_stal_align = 1, flow_through = 1, df_trees_torchspine = 1,pickaxey=1, building_block=1, material_stone=1},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
node_box = {
type = "fixed",
fixed = stal_box_4,
},
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
drop = {
max_items = 1,
items = {
{
items = {"df_trees:torchspine_ember 2"}, -- Items to drop
rarity = 2, -- Probability of dropping is 1 / rarity
},
{
items = {"df_trees:torchspine_ember"}, -- Items to drop
rarity = 1, -- Probability of dropping is 1 / rarity
},
},
}, on_place = stal_on_place,
})
minetest.register_node("df_trees:torchspine_ember", {
description = S("Torchspine Ember"),
_doc_items_longdesc = df_trees.doc.torchspine_desc,
_doc_items_usagehelp = df_trees.doc.torchspine_usage,
tiles = {"dfcaverns_torchspine_0.5.png",},
groups = {oddly_breakable_by_hand = 1, subterrane_stal_align = 1, flow_through = 1,pickaxey=1, building_block=1, material_stone=1,set_on_fire=1},
drawtype = "nodebox",
paramtype = "light",
light_source = 2,
paramtype2 = "facedir",
walkable = false,
is_ground_content = false,
floodable = true,
node_box = {
type = "fixed",
fixed = {
{-0.0625 + x_disp, -0.5, -0.125 + z_disp, 0.125 + x_disp, -0.375, 0.0625 + z_disp},
}
},
_mcl_blast_resistance = 10,
_mcl_hardness = 1,
on_place = stal_on_place,
on_construct = function(pos)
if df_trees.torchspine_growth_permitted(pos) then
minetest.get_node_timer(pos):start(math.random(torchspine_min_delay, torchspine_max_delay))
end
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
on_timer = function(pos)
minetest.swap_node(pos, {name="df_trees:torchspine_1", param2=minetest.get_node(pos).param2})
minetest.get_node_timer(pos):start(math.random(torchspine_min_delay, torchspine_max_delay))
minetest.sound_play({pos = pos}, {name="dfcaverns_torchspine_ignite"}, true)
end,
})
df_trees.spawn_torchspine = function(pos)
local x, y, z = pos.x, pos.y, pos.z
local stem_height = math.random(1,4)
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(
{x = x, y = y, z = z},
{x = x, y = y+height-1, z = z}
)
local area = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
local data_param2 = vm:get_param2_data()
df_trees.spawn_torchspine_vm(vi, area, data, data_param2, height)
vm:set_data(data)
vm:write_to_map()
vm:update_map()
end
local torchspine_c =
{
minetest.get_content_id("df_trees:torchspine_1"),
minetest.get_content_id("df_trees:torchspine_2"),
minetest.get_content_id("df_trees:torchspine_3"),
minetest.get_content_id("df_trees:torchspine_4")
}
local torchspine_lit_c =
{
minetest.get_content_id("df_trees:torchspine_1_lit"),
minetest.get_content_id("df_trees:torchspine_2"),
minetest.get_content_id("df_trees:torchspine_3"),
minetest.get_content_id("df_trees:torchspine_4")
}
df_trees.spawn_torchspine_vm = function(vi, area, data, data_param2, height, lit)
if height == nil then height = math.random(1,4) end
if lit == nil then lit = math.random() < 0.3 end
local param2 = math.random(0,3)
local list
if lit then list = torchspine_lit_c else list = torchspine_c end
for i = 0, height-1 do
if not minetest.registered_nodes[minetest.get_name_from_content_id(data[vi + area.ystride*i])].buildable_to then
height = i
break
end
end
for i = 0, height-1 do
local index = vi + area.ystride*i
data[index] = list[height-i]
data_param2[index] = param2
end
local pos = area:position(vi)
pos.y = pos.y+height-1
local node = minetest.get_node(pos)
minetest.get_node_timer(pos):start(math.random()*3000)
end
minetest.register_lbm({
label = "Start timers for torchspine nodes that used to depend on the ABM",
name = "df_trees:start_torchspine_timers",
nodenames = {"df_trees:torchspine_ember", "df_trees:torchspine_1", "df_trees:torchspine_1_lit"},
run_at_every_load = false,
action = function(pos, node)
minetest.get_node_timer(pos):start(math.random(torchspine_min_delay, torchspine_max_delay))
end,
})
+187
View File
@@ -0,0 +1,187 @@
local S = minetest.get_translator(minetest.get_current_modname())
--stem
minetest.register_node("df_trees:tower_cap_stem", {
description = S("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 = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, tower_cap = 1, tower_cap_trunk = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_trees.node_sound_tree_soft_fungus_defaults(),
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
--cap
minetest.register_node("df_trees:tower_cap", {
description = S("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 = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, tower_cap = 1, tower_cap_trunk = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_trees.node_sound_tree_soft_fungus_defaults(),
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
--gills
minetest.register_node("df_trees:tower_cap_gills", {
description = S("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 = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1, tower_cap = 1,handy=1, hoey=1, shearsy=1, swordy=1, deco_block=1, dig_by_piston=1, fire_encouragement=15, fire_flammability=30, compostability=30},
sounds = df_dependencies.sound_leaves(),
drawtype = "plantlike",
paramtype = "light",
drop = {
max_items = 1,
items = {
{
items = {'df_trees:tower_cap_sapling'},
rarity = 5,
},
{
items = {'df_trees:tower_cap_gills'},
}
}
},
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
after_place_node = df_dependencies.after_place_leaves,
})
df_dependencies.register_leafdecay({
trunks = {"df_trees:tower_cap"}, -- don't need stem nodes here
leaves = {"df_trees:tower_cap_gills"},
radius = 1,
})
--Wood
minetest.register_craft({
output = 'df_trees:tower_cap_wood 4',
recipe = {
{'group:tower_cap_trunk'},
}
})
minetest.register_node("df_trees:tower_cap_wood", {
description = S("Tower Cap Planks"),
_doc_items_longdesc = df_trees.doc.tower_cap_desc,
_doc_items_usagehelp = df_trees.doc.tower_cap_usage,
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"dfcaverns_tower_cap_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 3,
_mcl_hardness = 2,
})
df_dependencies.register_all_stairs_and_fences("tower_cap_wood", {burntime = 7})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:tower_cap_wood",
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:tower_cap",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:tower_cap_stem",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:tower_cap_gills",
burntime = 2,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:tower_cap_sapling",
burntime = 2,
})
-- sapling
minetest.register_node("df_trees:tower_cap_sapling", {
description = S("Tower Cap Spawn"),
_doc_items_longdesc = df_trees.doc.tower_cap_desc,
_doc_items_usagehelp = df_trees.doc.tower_cap_usage,
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"dfcaverns_tower_cap_sapling.png"},
inventory_image = "dfcaverns_tower_cap_sapling.png",
wield_image = "dfcaverns_tower_cap_sapling.png",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
walkable = false,
floodable = true,
selection_box = {
type = "fixed",
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1, light_sensitive_fungus = 11, dig_immediate=3,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
sounds = df_dependencies.sound_leaves(),
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
on_construct = function(pos)
if df_trees.tower_cap_growth_permitted(pos) 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))
end
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,
})
local c_stem = minetest.get_content_id("df_trees:tower_cap_stem")
local c_cap = minetest.get_content_id("df_trees:tower_cap")
local c_gills = minetest.get_content_id("df_trees:tower_cap_gills")
df_trees.spawn_tower_cap = function(pos)
local x, y, z = pos.x, pos.y, pos.z
local stem_height = math.random(4,10)
local cap_radius = math.random(4,6)
local maxy = y + stem_height + 3
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(
{x = x - cap_radius, y = y, z = z - cap_radius},
{x = x + cap_radius, y = maxy + 3, z = z + cap_radius}
)
local area = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
subterrane.giant_mushroom(area:indexp(pos), area, data, c_stem, c_cap, c_gills, stem_height, cap_radius)
vm:set_data(data)
vm:write_to_map()
vm:update_map()
end
df_trees.spawn_tower_cap_vm = function(vi, area, data)
local stem_height = math.random(4,10)
local cap_radius = math.random(4,6)
subterrane.giant_mushroom(vi, area, data, c_stem, c_cap, c_gills, stem_height, cap_radius)
end
+461
View File
@@ -0,0 +1,461 @@
--------------------------------------------------
-- Tunnel tube
-- Magenta
-- curving trunk
-- Max trunk height 8
-- depth 2-3
local S = minetest.get_translator(minetest.get_current_modname())
minetest.register_node("df_trees:tunnel_tube", {
description = S("Tunnel Tube"),
_doc_items_longdesc = df_trees.doc.tunnel_tube_desc,
_doc_items_usagehelp = df_trees.doc.tunnel_tube_usage,
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, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
on_place = minetest.rotate_node,
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
node_box = {
type = "fixed",
fixed = {
{-8/16,-8/16,-8/16,-4/16,8/16,8/16},
{4/16,-8/16,-8/16,8/16,8/16,8/16},
{-4/16,-8/16,-8/16,4/16,8/16,-4/16},
{-4/16,-8/16,8/16,4/16,8/16,4/16},
},
},
})
minetest.register_node("df_trees:tunnel_tube_slant_bottom", {
description = S("Tunnel Tube"),
_doc_items_longdesc = df_trees.doc.tunnel_tube_desc,
_doc_items_usagehelp = df_trees.doc.tunnel_tube_usage,
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",
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
on_place = minetest.rotate_node,
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.625, 0.5, 0.0, 0.375},
{-0.5, 0.0, -0.875, 0.5, 0.5, 0.125},
},
},
collision_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.625, 0.5, 0.0, 0.375},
{-0.5, 0.0, -0.875, 0.5, 0.5, 0.125},
},
},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_node("df_trees:tunnel_tube_slant_top", {
description = S("Tunnel Tube"),
_doc_items_longdesc = df_trees.doc.tunnel_tube_desc,
_doc_items_usagehelp = df_trees.doc.tunnel_tube_usage,
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",
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
on_place = minetest.rotate_node,
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.125, 0.5, 0.0, 0.875},
{-0.5, 0.0, -0.375, 0.5, 0.5, 0.625},
},
},
collision_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.125, 0.5, 0.0, 0.875},
{-0.5, 0.0, -0.375, 0.5, 0.5, 0.625},
},
},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_node("df_trees:tunnel_tube_slant_full", {
description = S("Tunnel Tube"),
_doc_items_longdesc = df_trees.doc.tunnel_tube_desc,
_doc_items_usagehelp = df_trees.doc.tunnel_tube_usage,
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",
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = df_dependencies.sound_wood(),
on_place = minetest.rotate_node,
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.75, 0.5, 0, 0.25},
{-0.5, 0, -1.25, 0.5, 0.5, -0.25},
},
},
collision_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.75, 0.5, 0, 0.25},
{-0.5, 0, -1.25, 0.5, 0.5, -0.25},
},
},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
--Wood
minetest.register_craft({
output = 'df_trees:tunnel_tube_wood 4',
recipe = {
{'df_trees:tunnel_tube'},
}
})
-- Paper
minetest.register_craft({
output = df_dependencies.node_name_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,
_doc_items_usagehelp = df_trees.doc.tunnel_tube_usage,
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"dfcaverns_tunnel_tube_wood_top.png", "dfcaverns_tunnel_tube_wood_top.png", "dfcaverns_tunnel_tube_wood_side.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, handy=1,axey=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 10,
_mcl_hardness = 2,
})
df_dependencies.register_all_stairs_and_fences("tunnel_tube_wood", {burntime = 9})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:tunnel_tube_wood",
burntime = 9,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:tunnel_tube",
burntime = 36,
})
minetest.register_craft({
type = "fuel",
recipe = "df_trees:tunnel_tube_sapling",
burntime = 3,
})
-- TNT
-----------------------------------------------------------------------------------------------------------
local gunpowder = df_dependencies.node_name_gunpowder
local tnt_ignite_sound = df_dependencies.soundfile_tnt_ignite
local tnt_boom = df_dependencies.tnt_boom
if df_trees.config.enable_tnt then
local tnt_radius = tonumber(minetest.settings:get("tnt_radius") or 3) * 2/3
local tnt_def = {radius = tnt_radius, damage_radius = tnt_radius * 2}
local torch_item = df_dependencies.node_name_torch
local drop_items = {
max_items = 1,
items = {
{
items = {'df_trees:tunnel_tube_sapling'},
rarity = 2,
},
}
}
if gunpowder then
drop_items.max_items = 3
table.insert(drop_items.items, {
items = {'df_trees:tunnel_tube_sapling', gunpowder},
rarity = 2,
})
table.insert(drop_items.items, {
items = {'df_trees:tunnel_tube_sapling', gunpowder .. ' 2'},
rarity = 2,
})
end
local on_burn = function(pos)
minetest.swap_node(pos, {name = "df_trees:tunnel_tube_fruiting_body_burning"})
minetest.registered_nodes["df_trees:tunnel_tube_fruiting_body_burning"].on_construct(pos)
end
minetest.register_node("df_trees:tunnel_tube_fruiting_body", {
description = S("Tunnel Tube Fruiting Body"),
_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"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {choppy = 3, oddly_breakable_by_hand=1, flammable = 2, tnt = 1, handy=1, hoey=1, shearsy=1, swordy=1, deco_block=1, dig_by_piston=1, fire_encouragement=15, fire_flammability=30},
sounds = df_dependencies.sound_wood(),
on_place = minetest.rotate_node,
drop = drop_items,
_mcl_blast_resistance = 12,
_mcl_hardness = 2,
on_punch = function(pos, node, puncher)
if puncher:get_wielded_item():get_name() == torch_item then
minetest.swap_node(pos, {name = "df_trees:tunnel_tube_fruiting_body_burning"})
minetest.registered_nodes["df_trees:tunnel_tube_fruiting_body_burning"].on_construct(pos)
minetest.log("action", puncher:get_player_name() .. " ignites " .. node.name .. " at " .. minetest.pos_to_string(pos))
end
end,
on_blast = function(pos, intensity)
minetest.swap_node(pos, {name="air"})
minetest.after(0.1, function()
tnt_boom(pos, tnt_def)
end)
end,
mesecons = {effector =
{action_on =
function(pos)
minetest.swap_node(pos, {name="air"})
tnt_boom(pos, tnt_def)
end
}
},
on_burn = on_burn,
on_ignite = on_burn,
_on_burn = on_burn,
})
minetest.register_node("df_trees:tunnel_tube_fruiting_body_burning", {
description = S("Tunnel Tube Fruiting Body"),
_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 = "",
sounds = df_dependencies.sound_wood(),
_mcl_blast_resistance = 0,
_mcl_hardness = 2,
on_timer = function(pos, elapsed)
minetest.swap_node(pos, {name="air"})
tnt_boom(pos, tnt_def)
end,
on_blast = function(pos)
minetest.swap_node(pos, {name="air"})
minetest.after(0.1, function()
tnt_boom(pos, tnt_def)
end)
end,
on_construct = function(pos)
minetest.sound_play(tnt_ignite_sound, {pos = pos})
minetest.get_node_timer(pos):start(4)
end,
})
else
minetest.register_node("df_trees:tunnel_tube_fruiting_body", {
description = S("Tunnel Tube Fruiting Body"),
_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"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {choppy = 3, oddly_breakable_by_hand=1, flammable = 2,handy=1, hoey=1, shearsy=1, swordy=1, deco_block=1, dig_by_piston=1, fire_encouragement=15, fire_flammability=30},
sounds = df_dependencies.sound_wood(),
on_place = minetest.rotate_node,
_mcl_blast_resistance = 12,
_mcl_hardness = 2,
drop = {
max_items = 3,
items = {
{
items = {'df_trees:tunnel_tube_sapling'},
rarity = 2,
},
{
items = {'df_trees:tunnel_tube_sapling'},
rarity = 2,
},
{
items = {'df_trees:tunnel_tube_sapling'},
rarity = 2,
},
},
},
})
end
-----------------------------------------------------------------------------------------------------------
minetest.register_node("df_trees:tunnel_tube_sapling", {
description = S("Tunnel Tube Spawn"),
_doc_items_longdesc = df_trees.doc.tunnel_tube_desc,
_doc_items_usagehelp = df_trees.doc.tunnel_tube_usage,
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"dfcaverns_tunnel_tube_sapling.png"},
inventory_image = "dfcaverns_tunnel_tube_sapling.png",
wield_image = "dfcaverns_tunnel_tube_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
floodable = true,
selection_box = {
type = "fixed",
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1, light_sensitive_fungus = 11, dig_immediate=3,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
sounds = df_dependencies.sound_leaves(),
_mcl_blast_resistance = 10,
_mcl_hardness = 0.2,
on_construct = function(pos)
if df_trees.tunnel_tube_growth_permitted(pos) 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))
end
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,
})
local tunnel_tube_directions = {
[0] = {x=0,y=0,z=-1},
[1] = {x=-1,y=0,z=0},
[2] = {x=0,y=0,z=1},
[3] = {x=1,y=0,z=0},
}
local tunnel_tube_displacement =
{
[4] = 1,
[5] = 1,
[6] = 2,
[7] = 2,
[8] = 3,
[9] = 3,
}
df_trees.spawn_tunnel_tube = function(pos)
local direction = math.random(1,4)-1 -- serves as both the facedir and the lookup in the direction table
local height = math.random(4,9)
local top_pos = vector.add(pos, vector.multiply(tunnel_tube_directions[direction], tunnel_tube_displacement[height]))
top_pos.y = pos.y + height - 1
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(pos, top_pos)
local area = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
local param2_data = vm:get_param2_data()
df_trees.spawn_tunnel_tube_vm(area:indexp(pos), area, data, param2_data, height, direction)
vm:set_data(data)
vm:set_param2_data(param2_data)
vm:write_to_map()
vm:update_map()
end
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
local c_tunnel_tube = minetest.get_content_id("df_trees:tunnel_tube")
local c_tunnel_tube_bottom = minetest.get_content_id("df_trees:tunnel_tube_slant_bottom")
local c_tunnel_tube_top = minetest.get_content_id("df_trees:tunnel_tube_slant_top")
local c_tunnel_tube_full = minetest.get_content_id("df_trees:tunnel_tube_slant_full")
local c_tunnel_tube_fruiting_body = minetest.get_content_id("df_trees:tunnel_tube_fruiting_body")
-- was simplest to just hardcode these patterns for each height from 4 to 9
-- pattern is displacement, node
local tunnel_tube_patterns =
{
[4] = {{0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_fruiting_body}},
[5] = {{0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_fruiting_body}},
[6] = {{0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_full}, {2, c_tunnel_tube_fruiting_body}},
[7] = {{0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_full}, {2, c_tunnel_tube_fruiting_body}},
[8] = {{0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_full}, {2, c_tunnel_tube_full}, {3, c_tunnel_tube_fruiting_body}},
[9] = {{0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_full}, {2, c_tunnel_tube_full}, {3, c_tunnel_tube_fruiting_body}},
}
df_trees.spawn_tunnel_tube_vm = function(vi, area, data, param2_data, height, direction)
if height == nil then height = math.random(4,9) end
if direction == nil then direction = math.random(1,4)-1 end
local increment
if direction == 0 then
increment = -area.zstride
elseif direction == 1 then
increment = -1
elseif direction == 2 then
increment = area.zstride
elseif direction == 3 then
increment = 1
else
return
end
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
previous_vi = current_vi
data[current_vi] = nodepattern[2]
param2_data[current_vi] = direction
else
data[previous_vi] = c_tunnel_tube_fruiting_body
param2_data[previous_vi] = direction
break
end
vi = vi + area.ystride
end
end