mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2024-12-25 18:30:36 +01:00
bypass dependency indirection for df_trees
This commit is contained in:
parent
d476e5b325
commit
a1f99b711f
@ -50,7 +50,7 @@ df_dependencies.mods_required.mcl_stairs = true
|
|||||||
df_dependencies.mods_required.mcl_fences = true
|
df_dependencies.mods_required.mcl_fences = true
|
||||||
df_dependencies.mods_required.mcl_core = true
|
df_dependencies.mods_required.mcl_core = true
|
||||||
|
|
||||||
local node_name_to_stair_properties = function(name, override)
|
local node_name_to_stair_properties = function(name, override_def)
|
||||||
local mod = minetest.get_current_modname()
|
local mod = minetest.get_current_modname()
|
||||||
|
|
||||||
local node_def = minetest.registered_nodes[mod..":"..name]
|
local node_def = minetest.registered_nodes[mod..":"..name]
|
||||||
|
@ -156,7 +156,7 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("fern_wood", {burntime=7})
|
df_dependencies.register_all_stairs_and_fences("fern_wood", {burntime=7})
|
||||||
|
|
||||||
minetest.register_node("df_primordial_items:giant_fern_leaves", {
|
minetest.register_node("df_primordial_items:giant_fern_leaves", {
|
||||||
description = S("Giant Fern Leaves"),
|
description = S("Giant Fern Leaves"),
|
||||||
|
@ -127,7 +127,7 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("primordial_mush_trunk_wood", {burntime = 7})
|
df_dependencies.register_all_stairs_and_fences("primordial_mush_trunk_wood", {burntime = 7})
|
||||||
|
|
||||||
minetest.register_node("df_primordial_items:primordial_mush_cap_wood", {
|
minetest.register_node("df_primordial_items:primordial_mush_cap_wood", {
|
||||||
description = S("Primordial Cap Wood"),
|
description = S("Primordial Cap Wood"),
|
||||||
@ -149,8 +149,7 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("primordial_mush_cap_wood", {burntime=12})
|
df_dependencies.register_all_stairs_and_fences("primordial_mush_cap_wood", {burntime=12})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
@ -8,7 +8,7 @@ minetest.register_node("df_trees:black_cap_stem", {
|
|||||||
tiles = {"dfcaverns_black_cap_top.png","dfcaverns_black_cap_top.png","dfcaverns_black_cap_side.png",},
|
tiles = {"dfcaverns_black_cap_top.png","dfcaverns_black_cap_top.png","dfcaverns_black_cap_side.png",},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
})
|
})
|
||||||
@ -21,7 +21,7 @@ minetest.register_node("df_trees:black_cap", {
|
|||||||
tiles = {"dfcaverns_black_cap_top.png","dfcaverns_black_cap_top.png","dfcaverns_black_cap_side.png^[transformR90",},
|
tiles = {"dfcaverns_black_cap_top.png","dfcaverns_black_cap_top.png","dfcaverns_black_cap_side.png^[transformR90",},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
})
|
})
|
||||||
@ -34,7 +34,7 @@ minetest.register_node("df_trees:black_cap_gills", {
|
|||||||
tiles = {"dfcaverns_black_cap_gills.png"},
|
tiles = {"dfcaverns_black_cap_gills.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {snappy = 3, leafdecay = 1, flammable = 2, leaves = 1},
|
groups = {snappy = 3, leafdecay = 1, flammable = 2, leaves = 1},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drop = {
|
drop = {
|
||||||
@ -49,13 +49,13 @@ minetest.register_node("df_trees:black_cap_gills", {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
after_place_node = df_trees.after_place_leaves,
|
after_place_node = df_dependencies.after_place_leaves,
|
||||||
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
||||||
_mcl_blast_resistance = 0.2,
|
_mcl_blast_resistance = 0.2,
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_leafdecay({
|
df_dependencies.register_leafdecay({
|
||||||
trunks = {"df_trees:black_cap"}, -- don't need stem nodes here
|
trunks = {"df_trees:black_cap"}, -- don't need stem nodes here
|
||||||
leaves = {"df_trees:black_cap_gills"},
|
leaves = {"df_trees:black_cap_gills"},
|
||||||
radius = 1,
|
radius = 1,
|
||||||
@ -77,7 +77,7 @@ minetest.register_craft({
|
|||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = df_trees.node_names.torch .. ' 8',
|
output = df_dependencies.node_name_torch .. ' 8',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'df_trees:black_cap_gills'},
|
{'df_trees:black_cap_gills'},
|
||||||
{'group:stick'},
|
{'group:stick'},
|
||||||
@ -102,12 +102,12 @@ minetest.register_node("df_trees:black_cap_wood", {
|
|||||||
tiles = {"dfcaverns_black_cap_wood.png"},
|
tiles = {"dfcaverns_black_cap_wood.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 5,
|
_mcl_blast_resistance = 5,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("black_cap_wood", {burntime = 30})
|
df_dependencies.register_all_stairs_and_fences("black_cap_wood", {burntime = 30})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
@ -156,7 +156,7 @@ minetest.register_node("df_trees:black_cap_sapling", {
|
|||||||
},
|
},
|
||||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||||
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
_mcl_blast_resistance = 0.5,
|
_mcl_blast_resistance = 0.5,
|
||||||
_mcl_hardness = 0.5,
|
_mcl_hardness = 0.5,
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ minetest.register_node("df_trees:blood_thorn", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {choppy = 3, tree = 1, flammable = 2, light_sensitive_fungus = 11},
|
groups = {choppy = 3, tree = 1, flammable = 2, light_sensitive_fungus = 11},
|
||||||
_dfcaverns_dead_node = "df_trees:blood_thorn_dead",
|
_dfcaverns_dead_node = "df_trees:blood_thorn_dead",
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
on_place = minetest.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
after_dig_node = blood_thorn_after_dig,
|
after_dig_node = blood_thorn_after_dig,
|
||||||
@ -85,7 +85,7 @@ minetest.register_node("df_trees:blood_thorn_dead", {
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {choppy = 3, tree = 1, flammable = 2},
|
groups = {choppy = 3, tree = 1, flammable = 2},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
on_place = minetest.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
after_dig_node = blood_thorn_after_dig,
|
after_dig_node = blood_thorn_after_dig,
|
||||||
@ -107,7 +107,7 @@ minetest.register_node("df_trees:blood_thorn_spike", {
|
|||||||
},
|
},
|
||||||
groups = {choppy = 3, flammable = 2, fall_damage_add_percent=100, light_sensitive_fungus = 11},
|
groups = {choppy = 3, flammable = 2, fall_damage_add_percent=100, light_sensitive_fungus = 11},
|
||||||
_dfcaverns_dead_node = "df_trees:blood_thorn_spike_dead",
|
_dfcaverns_dead_node = "df_trees:blood_thorn_spike_dead",
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
climbable = true,
|
climbable = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
@ -139,7 +139,7 @@ minetest.register_node("df_trees:blood_thorn_spike_dead", {
|
|||||||
"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},
|
groups = {choppy = 3, flammable = 2, fall_damage_add_percent=100},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
climbable = true,
|
climbable = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
@ -181,12 +181,12 @@ minetest.register_node("df_trees:blood_thorn_wood", {
|
|||||||
tiles = {"dfcaverns_blood_thorn_wood.png"},
|
tiles = {"dfcaverns_blood_thorn_wood.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 2,
|
||||||
_mcl_hardness = 1,
|
_mcl_hardness = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("blood_thorn_wood", {burntime = 40})
|
df_dependencies.register_all_stairs_and_fences("blood_thorn_wood", {burntime = 40})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
|
||||||
|
|
||||||
df_trees.sounds = {}
|
|
||||||
|
|
||||||
df_trees.sounds.wood = df_dependencies.sound_wood()
|
|
||||||
df_trees.sounds.leaves = df_dependencies.sound_leaves()
|
|
||||||
df_trees.sounds.nethercap_wood = df_dependencies.sound_wood({
|
|
||||||
footstep = {name = df_dependencies.soundfile_snow_footstep, gain = 0.2},
|
|
||||||
})
|
|
||||||
df_trees.sounds.glass = df_dependencies.sound_glass()
|
|
||||||
|
|
||||||
df_trees.node_names = {}
|
|
||||||
|
|
||||||
df_trees.node_names.apple = df_dependencies.node_name_apple
|
|
||||||
df_trees.node_names.bed_bottom = df_dependencies.node_name_bed_bottom
|
|
||||||
df_trees.node_names.bed_top = df_dependencies.node_name_bed_top
|
|
||||||
df_trees.node_names.chest = df_dependencies.node_name_chest
|
|
||||||
df_trees.node_names.coalblock = df_dependencies.node_name_coalblock
|
|
||||||
df_trees.node_names.furnace = df_dependencies.node_name_furnace
|
|
||||||
df_trees.node_names.gold_ingot = df_dependencies.node_name_gold_ingot
|
|
||||||
df_trees.node_names.ice = df_dependencies.node_name_ice
|
|
||||||
df_trees.node_names.paper = df_dependencies.node_name_paper
|
|
||||||
df_trees.node_names.river_water_flowing = df_dependencies.node_name_river_water_flowing
|
|
||||||
df_trees.node_names.river_water_source = df_dependencies.node_name_river_water_source
|
|
||||||
df_trees.node_names.snow = df_dependencies.node_name_snow
|
|
||||||
df_trees.node_names.stone_with_coal = df_dependencies.node_name_stone_with_coal
|
|
||||||
df_trees.node_names.torch = df_dependencies.node_name_torch
|
|
||||||
df_trees.node_names.torch_wall = df_dependencies.node_name_torch_wall
|
|
||||||
df_trees.node_names.water_flowing = df_dependencies.node_name_water_flowing
|
|
||||||
df_trees.node_names.water_source = df_dependencies.node_name_water_source
|
|
||||||
df_trees.node_names.door_wood_a = df_dependencies.node_name_door_wood_a
|
|
||||||
df_trees.node_names.door_hidden = df_dependencies.node_name_door_hidden
|
|
||||||
df_trees.node_names.shelf = df_dependencies.node_name_shelf
|
|
||||||
|
|
||||||
df_trees.textures = {}
|
|
||||||
df_trees.textures.gold_block = df_dependencies.texture_gold_block
|
|
||||||
|
|
||||||
df_trees.register = {}
|
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences = df_dependencies.register_all_stairs_and_fences
|
|
||||||
|
|
||||||
-- this stuff is only for during initialization
|
|
||||||
minetest.after(0, function()
|
|
||||||
df_trees.sounds = nil
|
|
||||||
df_trees.node_names = nil
|
|
||||||
df_trees.textures = nil
|
|
||||||
df_trees.register = nil
|
|
||||||
end)
|
|
||||||
|
|
||||||
df_trees.iron_containing_nodes = df_dependencies.data_iron_containing_nodes
|
|
||||||
df_trees.copper_containing_nodes = df_dependencies.data_copper_containing_nodes
|
|
||||||
df_trees.mese_containing_nodes = df_dependencies.data_mese_containing_nodes
|
|
||||||
|
|
||||||
df_trees.after_place_leaves = df_dependencies.after_place_leaves
|
|
||||||
df_trees.register_leafdecay = df_dependencies.register_leafdecay
|
|
||||||
|
|
||||||
-- 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
|
|
@ -15,7 +15,7 @@ minetest.register_node("df_trees:fungiwood", {
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
|
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 2,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
|
|
||||||
@ -39,12 +39,12 @@ minetest.register_node("df_trees:fungiwood_wood", {
|
|||||||
tiles = {"dfcaverns_fungiwood_wood.png"},
|
tiles = {"dfcaverns_fungiwood_wood.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 3,
|
_mcl_blast_resistance = 3,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("fungiwood_wood", {burntime = 7})
|
df_dependencies.register_all_stairs_and_fences("fungiwood_wood", {burntime = 7})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
@ -92,15 +92,15 @@ minetest.register_node("df_trees:fungiwood_shelf",{
|
|||||||
{items = {"df_trees:fungiwood_shelf"}}
|
{items = {"df_trees:fungiwood_shelf"}}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
_mcl_blast_resistance = 0.5,
|
_mcl_blast_resistance = 0.5,
|
||||||
_mcl_hardness = 0.5,
|
_mcl_hardness = 0.5,
|
||||||
|
|
||||||
after_place_node = df_trees.after_place_leaves,
|
after_place_node = df_dependencies.after_place_leaves,
|
||||||
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_leafdecay({
|
df_dependencies.register_leafdecay({
|
||||||
trunks = {"df_trees:fungiwood"},
|
trunks = {"df_trees:fungiwood"},
|
||||||
leaves = {"df_trees:fungiwood_shelf"},
|
leaves = {"df_trees:fungiwood_shelf"},
|
||||||
radius = 5,
|
radius = 5,
|
||||||
@ -126,7 +126,7 @@ minetest.register_node("df_trees:fungiwood_sapling", {
|
|||||||
},
|
},
|
||||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||||
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
_mcl_blast_resistance = 0.2,
|
_mcl_blast_resistance = 0.2,
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ minetest.register_node("df_trees:goblin_cap_gills", {
|
|||||||
tiles = {"dfcaverns_goblin_cap_gills.png"},
|
tiles = {"dfcaverns_goblin_cap_gills.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {snappy = 3, leafdecay = 1, flammable = 2, leaves = 1, goblin_cap = 1},
|
groups = {snappy = 3, leafdecay = 1, flammable = 2, leaves = 1, goblin_cap = 1},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drop = {
|
drop = {
|
||||||
@ -55,13 +55,13 @@ minetest.register_node("df_trees:goblin_cap_gills", {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
after_place_node = df_trees.after_place_leaves,
|
after_place_node = df_dependencies.after_place_leaves,
|
||||||
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
||||||
_mcl_blast_resistance = 0.2,
|
_mcl_blast_resistance = 0.2,
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_leafdecay({
|
df_dependencies.register_leafdecay({
|
||||||
trunks = {"df_trees:goblin_cap"}, -- don't need stem nodes here
|
trunks = {"df_trees:goblin_cap"}, -- don't need stem nodes here
|
||||||
leaves = {"df_trees:goblin_cap_gills"},
|
leaves = {"df_trees:goblin_cap_gills"},
|
||||||
radius = 1,
|
radius = 1,
|
||||||
@ -91,7 +91,7 @@ minetest.register_node("df_trees:goblin_cap_wood", {
|
|||||||
tiles = {"dfcaverns_goblin_cap_wood.png"},
|
tiles = {"dfcaverns_goblin_cap_wood.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 3,
|
_mcl_blast_resistance = 3,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
@ -105,13 +105,13 @@ minetest.register_node("df_trees:goblin_cap_stem_wood", {
|
|||||||
tiles = {"dfcaverns_goblin_cap_stem_wood.png"},
|
tiles = {"dfcaverns_goblin_cap_stem_wood.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 3,
|
_mcl_blast_resistance = 3,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("goblin_cap_wood", {burntime = 12})
|
df_dependencies.register_all_stairs_and_fences("goblin_cap_wood", {burntime = 12})
|
||||||
df_trees.register.all_stairs_and_fences("goblin_cap_stem_wood", {burntime = 7})
|
df_dependencies.register_all_stairs_and_fences("goblin_cap_stem_wood", {burntime = 7})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
@ -150,10 +150,10 @@ local bigger_goblin_cap_schem = dofile(modpath.."/schematics/goblin_cap_bigger.l
|
|||||||
local bigger_goblin_cap_hut_schem = dofile(modpath.."/schematics/goblin_cap_bigger_hut.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
|
-- The hut has a chest and furnace near pos, use this to initialize it
|
||||||
local chest_node = df_trees.node_names.chest
|
local chest_node = df_dependencies.node_name_chest
|
||||||
local furnace_node = df_trees.node_names.furnace
|
local furnace_node = df_dependencies.node_name_furnace
|
||||||
local gold_item = df_trees.node_names.gold_ingot
|
local gold_item = df_dependencies.node_name_gold_ingot
|
||||||
local apple_item = df_trees.node_names.apple
|
local apple_item = df_dependencies.node_name_apple
|
||||||
|
|
||||||
local chest_on_construct = minetest.registered_items[chest_node].on_construct
|
local chest_on_construct = minetest.registered_items[chest_node].on_construct
|
||||||
local furnace_on_construct = minetest.registered_items[furnace_node].on_construct
|
local furnace_on_construct = minetest.registered_items[furnace_node].on_construct
|
||||||
@ -221,7 +221,7 @@ minetest.register_node("df_trees:goblin_cap_sapling", {
|
|||||||
},
|
},
|
||||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||||
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
_mcl_blast_resistance = 0.2,
|
_mcl_blast_resistance = 0.2,
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
|
|
||||||
|
@ -3,9 +3,17 @@ df_trees = {}
|
|||||||
local modname = minetest.get_current_modname()
|
local modname = minetest.get_current_modname()
|
||||||
local modpath = minetest.get_modpath(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
|
--load companion lua files
|
||||||
dofile(modpath.."/config.lua")
|
dofile(modpath.."/config.lua")
|
||||||
dofile(modpath.."/dependencies.lua")
|
|
||||||
dofile(modpath.."/doc.lua")
|
dofile(modpath.."/doc.lua")
|
||||||
dofile(modpath.."/aliases.lua")
|
dofile(modpath.."/aliases.lua")
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ minetest.register_node("df_trees:nether_cap_stem", {
|
|||||||
tiles = {"dfcaverns_nether_cap_stem.png"},
|
tiles = {"dfcaverns_nether_cap_stem.png"},
|
||||||
is_ground_content = false,
|
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},
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1, nether_cap = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 0.7,
|
_mcl_blast_resistance = 0.7,
|
||||||
_mcl_hardness = 0.7,
|
_mcl_hardness = 0.7,
|
||||||
})
|
})
|
||||||
@ -28,7 +28,7 @@ minetest.register_node("df_trees:nether_cap", {
|
|||||||
tiles = {"dfcaverns_nether_cap.png"},
|
tiles = {"dfcaverns_nether_cap.png"},
|
||||||
is_ground_content = false,
|
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},
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1, nether_cap = 1},
|
||||||
sounds = df_trees.sounds.nethercap_wood,
|
sounds = df_dependencies.sound_wood({footstep = {name = df_dependencies.soundfile_snow_footstep, gain = 0.2},}),
|
||||||
_mcl_blast_resistance = 0.5,
|
_mcl_blast_resistance = 0.5,
|
||||||
_mcl_hardness = 0.5,
|
_mcl_hardness = 0.5,
|
||||||
})
|
})
|
||||||
@ -42,7 +42,7 @@ minetest.register_node("df_trees:nether_cap_gills", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
light_source = 6,
|
light_source = 6,
|
||||||
groups = {snappy = 3, leafdecay = 1, leaves = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1, nether_cap = 1},
|
groups = {snappy = 3, leafdecay = 1, leaves = 1, puts_out_fire = 1, cools_lava = 1, freezes_water = 1, nether_cap = 1},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drop = {
|
drop = {
|
||||||
@ -57,13 +57,13 @@ minetest.register_node("df_trees:nether_cap_gills", {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
after_place_node = df_trees.after_place_leaves,
|
after_place_node = df_dependencies.after_place_leaves,
|
||||||
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
||||||
_mcl_blast_resistance = 0.1,
|
_mcl_blast_resistance = 0.1,
|
||||||
_mcl_hardness = 0.1,
|
_mcl_hardness = 0.1,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_leafdecay({
|
df_dependencies.register_leafdecay({
|
||||||
trunks = {"df_trees:nether_cap"}, -- don't need stem nodes here
|
trunks = {"df_trees:nether_cap"}, -- don't need stem nodes here
|
||||||
leaves = {"df_trees:nether_cap_gills"},
|
leaves = {"df_trees:nether_cap_gills"},
|
||||||
radius = 1,
|
radius = 1,
|
||||||
@ -93,12 +93,12 @@ minetest.register_node("df_trees:nether_cap_wood", {
|
|||||||
tiles = {"dfcaverns_nether_cap_wood.png"},
|
tiles = {"dfcaverns_nether_cap_wood.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, wood = 1, freezes_water = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, wood = 1, freezes_water = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 0.5,
|
_mcl_blast_resistance = 0.5,
|
||||||
_mcl_hardness = 0.5,
|
_mcl_hardness = 0.5,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("nether_cap_wood")
|
df_dependencies.register_all_stairs_and_fences("nether_cap_wood")
|
||||||
|
|
||||||
-- sapling
|
-- sapling
|
||||||
minetest.register_node("df_trees:nether_cap_sapling", {
|
minetest.register_node("df_trees:nether_cap_sapling", {
|
||||||
@ -121,7 +121,7 @@ minetest.register_node("df_trees:nether_cap_sapling", {
|
|||||||
},
|
},
|
||||||
groups = {snappy = 2, dig_immediate = 3,
|
groups = {snappy = 2, dig_immediate = 3,
|
||||||
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
_mcl_blast_resistance = 0.1,
|
_mcl_blast_resistance = 0.1,
|
||||||
_mcl_hardness = 0.1,
|
_mcl_hardness = 0.1,
|
||||||
|
|
||||||
@ -177,12 +177,12 @@ df_trees.spawn_nether_cap_vm = function(vi, area, data)
|
|||||||
subterrane.giant_mushroom(vi, area, data, c_stem, c_cap, c_gills, stem_height, cap_radius)
|
subterrane.giant_mushroom(vi, area, data, c_stem, c_cap, c_gills, stem_height, cap_radius)
|
||||||
end
|
end
|
||||||
|
|
||||||
local water = df_trees.node_names.water_source
|
local water = df_dependencies.node_name_water_source
|
||||||
local river_water = df_trees.node_names.river_water_source
|
local river_water = df_dependencies.node_name_river_water_source
|
||||||
local ice = df_trees.node_names.ice
|
local ice = df_dependencies.node_name_ice
|
||||||
local water_flowing = df_trees.node_names.water_flowing
|
local water_flowing = df_dependencies.node_name_water_flowing
|
||||||
local river_water_flowing = df_trees.node_names.river_water_flowing
|
local river_water_flowing = df_dependencies.node_name_river_water_flowing
|
||||||
local snow = df_trees.node_names.snow
|
local snow = df_dependencies.node_name_snow
|
||||||
|
|
||||||
minetest.register_abm{
|
minetest.register_abm{
|
||||||
label = "water freezing",
|
label = "water freezing",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
-- these methods should indicate whether a sapling placed at pos should bother attempting to grow.
|
-- these methods should indicate whether a sapling placed at pos should bother attempting to grow.
|
||||||
-- check soil conditions and biome here, for example.
|
-- check soil conditions and biome here, for example.
|
||||||
|
|
||||||
local stone_with_coal = df_trees.node_names.stone_with_coal
|
local stone_with_coal = df_dependencies.node_name_stone_with_coal
|
||||||
local coalblock = df_trees.node_names.coalblock
|
local coalblock = df_dependencies.node_name_coalblock
|
||||||
local is_coal = function(name)
|
local is_coal = function(name)
|
||||||
return name == stone_with_coal or name == coalblock
|
return name == stone_with_coal or name == coalblock
|
||||||
end
|
end
|
||||||
|
@ -4,15 +4,15 @@ local n3 = {name = df_dependencies.node_name_slab_goblin_cap_stem_wood, param2 =
|
|||||||
local n4 = { name = "df_trees:goblin_cap_gills" }
|
local n4 = { name = "df_trees:goblin_cap_gills" }
|
||||||
local n6 = { name = "df_trees:goblin_cap_stem", force_place=true } -- walls
|
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 n7 = { name = "df_trees:goblin_cap_stem_wood", force_place=true } -- internal floor
|
||||||
local n8 = { name = df_trees.node_names.door_wood_a or "air", force_place=true }
|
local n8 = { name = df_dependencies.node_name_door_wood_a or "air", force_place=true }
|
||||||
local n9 = { name = df_trees.node_names.door_hidden or "air", force_place=true }
|
local n9 = { name = df_dependencies.node_name_door_hidden or "air", force_place=true }
|
||||||
local n10 = { name = df_trees.node_names.furnace, param2 = 3, 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 n11 = { name = "air", force_place=true } -- internal air
|
||||||
local n12 = { name = df_trees.node_names.bed_bottom or "air", force_place=true }
|
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 n13 = { name = "df_trees:goblin_cap_stem", prob = 198, force_place=true } -- possible window holes
|
||||||
local n16 = { name = df_trees.node_names.chest, param2 = 3, force_place=true }
|
local n16 = { name = df_dependencies.node_name_chest, param2 = 3, force_place=true }
|
||||||
local n17 = { name = df_trees.node_names.bed_top or "air", force_place=true }
|
local n17 = { name = df_dependencies.node_name_bed_top or "air", force_place=true }
|
||||||
local n18 = { name = df_trees.node_names.torch_wall, param2 = 4, 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 n19 = { name = "df_trees:goblin_cap_stem" } -- base
|
||||||
|
|
||||||
local n20 = {name = df_dependencies.node_name_stair_goblin_cap_stem_wood, param2 = 1 }
|
local n20 = {name = df_dependencies.node_name_stair_goblin_cap_stem_wood, param2 = 1 }
|
||||||
|
@ -5,26 +5,26 @@ local n4 = { name = "df_trees:goblin_cap_gills" }
|
|||||||
local n5 = { name = "df_trees:goblin_cap_stem", force_place = true } -- walls, force place these
|
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 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 n7 = { name = "df_trees:goblin_cap_stem_wood", force_place=true } -- internal floor
|
||||||
local n8 = { name = df_trees.node_names.furnace, param2 = 2, force_place=true }
|
local n8 = { name = df_dependencies.node_name_furnace, param2 = 2, force_place=true }
|
||||||
local n9 = { name = "air", force_place=true } -- internal air
|
local n9 = { name = "air", force_place=true } -- internal air
|
||||||
local n10 = { name = df_trees.node_names.torch_wall, param2 = 3, force_place = true }
|
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 n12 = {name = df_dependencies.node_name_slab_goblin_cap_stem_wood, param2 = 2} -- porch top
|
||||||
local n13 = { name = df_trees.node_names.door_wood_a or "air", param2 = 3, force_place = true }
|
local n13 = { name = df_dependencies.node_name_door_wood_a or "air", param2 = 3, force_place = true }
|
||||||
local n14 = { name = df_trees.node_names.door_hidden 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 n15 = n9 -- internal air, but could be a vessel shelf
|
||||||
local n16 = { name = df_trees.node_names.bed_top or "air", param2 = 3, force_place = true }
|
local n16 = { name = df_dependencies.node_name_bed_top or "air", param2 = 3, force_place = true }
|
||||||
local n17 = { name = df_trees.node_names.bed_bottom 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_trees.node_names.chest, force_place = true }
|
local n18 = { name = df_dependencies.node_name_chest, force_place = true }
|
||||||
local n19 = { name = df_trees.node_names.torch_wall, param2 = 2, 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 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 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}
|
local n22 = {name = df_dependencies.node_name_slab_goblin_cap_stem_wood, param2 = 22}
|
||||||
|
|
||||||
if df_trees.node_names.shelf then
|
if df_dependencies.node_name_shelf then
|
||||||
-- replace torches with glowing bottles, add vessel shelf
|
-- replace torches with glowing bottles, add vessel shelf
|
||||||
n10 = { name = "df_trees:glowing_bottle_red", force_place=true}
|
n10 = { name = "df_trees:glowing_bottle_red", force_place=true}
|
||||||
n19 = n10
|
n19 = n10
|
||||||
n15 = { name = df_trees.node_names.shelf, param2 = 3, force_place = true }
|
n15 = { name = df_dependencies.node_name_shelf, param2 = 3, force_place = true }
|
||||||
end
|
end
|
||||||
|
|
||||||
if not minetest.get_modpath("stairs") then
|
if not minetest.get_modpath("stairs") then
|
||||||
|
@ -64,7 +64,7 @@ minetest.register_node("df_trees:spindlestem_stem", {
|
|||||||
_doc_items_usagehelp = df_trees.doc.spindlestem_usage,
|
_doc_items_usagehelp = df_trees.doc.spindlestem_usage,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, spindlestem = 1},
|
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, spindlestem = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
tiles = {
|
tiles = {
|
||||||
"dfcaverns_tower_cap.png",
|
"dfcaverns_tower_cap.png",
|
||||||
},
|
},
|
||||||
@ -100,7 +100,7 @@ local register_spindlestem_type = function(item_suffix, colour_name, colour_code
|
|||||||
_doc_items_longdesc = df_trees.doc["spindlestem_cap_"..item_suffix.."_desc"],
|
_doc_items_longdesc = df_trees.doc["spindlestem_cap_"..item_suffix.."_desc"],
|
||||||
_doc_items_usagehelp = df_trees.doc["spindlestem_cap_"..item_suffix.."_usage"],
|
_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},
|
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, spindlestem = 1, not_in_creative_inventory = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
tiles = {
|
tiles = {
|
||||||
"dfcaverns_tower_cap.png^[multiply:#"..colour_code,
|
"dfcaverns_tower_cap.png^[multiply:#"..colour_code,
|
||||||
"dfcaverns_spindlestem_cap.png^[multiply:#"..colour_code,
|
"dfcaverns_spindlestem_cap.png^[multiply:#"..colour_code,
|
||||||
@ -230,7 +230,7 @@ local register_spindlestem_type = function(item_suffix, colour_name, colour_code
|
|||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
||||||
},
|
},
|
||||||
groups = groups,
|
groups = groups,
|
||||||
sounds = df_trees.sounds.glass,
|
sounds = df_dependencies.sound_glass(),
|
||||||
light_source = new_light,
|
light_source = new_light,
|
||||||
_mcl_blast_resistance = 0.5,
|
_mcl_blast_resistance = 0.5,
|
||||||
_mcl_hardness = 0.5,
|
_mcl_hardness = 0.5,
|
||||||
@ -359,6 +359,10 @@ 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_cyan = minetest.get_content_id("df_trees:spindlestem_cap_cyan")
|
||||||
local c_golden = minetest.get_content_id("df_trees:spindlestem_cap_golden")
|
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)
|
get_spindlestem_cap_type = function(pos)
|
||||||
if minetest.find_node_near(pos, 15, "group:tower_cap") then
|
if minetest.find_node_near(pos, 15, "group:tower_cap") then
|
||||||
return c_white
|
return c_white
|
||||||
@ -367,9 +371,9 @@ get_spindlestem_cap_type = function(pos)
|
|||||||
return c_red
|
return c_red
|
||||||
end
|
end
|
||||||
|
|
||||||
local iron = minetest.find_node_near(pos, 5, df_trees.iron_containing_nodes)
|
local iron = minetest.find_node_near(pos, 5, iron_nodes)
|
||||||
local copper = minetest.find_node_near(pos, 5, df_trees.copper_containing_nodes)
|
local copper = minetest.find_node_near(pos, 5, copper_nodes)
|
||||||
local mese = minetest.find_node_near(pos, 5, df_trees.mese_containing_nodes)
|
local mese = minetest.find_node_near(pos, 5, mese_nodes)
|
||||||
local possibilities = {}
|
local possibilities = {}
|
||||||
|
|
||||||
if mese then table.insert(possibilities, c_golden) end
|
if mese then table.insert(possibilities, c_golden) end
|
||||||
|
@ -16,7 +16,7 @@ minetest.register_node("df_trees:spore_tree", {
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 2,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
|
|
||||||
@ -40,12 +40,12 @@ minetest.register_node("df_trees:spore_tree_wood", {
|
|||||||
tiles = {"dfcaverns_spore_tree_wood.png"},
|
tiles = {"dfcaverns_spore_tree_wood.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 3,
|
_mcl_blast_resistance = 3,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("spore_tree_wood", {burntime = 6})
|
df_dependencies.register_all_stairs_and_fences("spore_tree_wood", {burntime = 6})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
@ -94,11 +94,11 @@ minetest.register_node("df_trees:spore_tree_hyphae", {
|
|||||||
{-0.5, -0.0625, -0.0625, 0.5, 0.0625, 0.0625},
|
{-0.5, -0.0625, -0.0625, 0.5, 0.0625, 0.0625},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
_mcl_blast_resistance = 0.2,
|
_mcl_blast_resistance = 0.2,
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
|
|
||||||
after_place_node = df_trees.after_place_leaves,
|
after_place_node = df_dependencies.after_place_leaves,
|
||||||
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -139,13 +139,13 @@ minetest.register_node("df_trees:spore_tree_fruiting_body", {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
|
|
||||||
after_place_node = df_trees.after_place_leaves,
|
after_place_node = df_dependencies.after_place_leaves,
|
||||||
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_leafdecay({
|
df_dependencies.register_leafdecay({
|
||||||
trunks = {"df_trees:spore_tree"},
|
trunks = {"df_trees:spore_tree"},
|
||||||
leaves = {"df_trees:spore_tree_hyphae", "df_trees:spore_tree_fruiting_body"},
|
leaves = {"df_trees:spore_tree_hyphae", "df_trees:spore_tree_fruiting_body"},
|
||||||
radius = 3,
|
radius = 3,
|
||||||
@ -171,7 +171,7 @@ minetest.register_node("df_trees:spore_tree_sapling", {
|
|||||||
},
|
},
|
||||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||||
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
_mcl_blast_resistance = 0.2,
|
_mcl_blast_resistance = 0.2,
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ minetest.register_node("df_trees:spore_tree_ladder", {
|
|||||||
},
|
},
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
|
groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
|
||||||
legacy_wallmounted = true,
|
legacy_wallmounted = true,
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 1,
|
_mcl_blast_resistance = 1,
|
||||||
_mcl_hardness = 1,
|
_mcl_hardness = 1,
|
||||||
})
|
})
|
||||||
|
@ -99,7 +99,7 @@ local grow_torchspine = function(pos)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local torch_node = df_trees.node_names.torch
|
local torch_node = df_dependencies.node_name_torch
|
||||||
|
|
||||||
minetest.register_node("df_trees:torchspine_1", {
|
minetest.register_node("df_trees:torchspine_1", {
|
||||||
description = S("Torchspine Tip"),
|
description = S("Torchspine Tip"),
|
||||||
@ -143,7 +143,7 @@ minetest.register_node("df_trees:torchspine_1_lit", {
|
|||||||
description = S("Torchspine Tip"),
|
description = S("Torchspine Tip"),
|
||||||
_doc_items_longdesc = df_trees.doc.torchspine_desc,
|
_doc_items_longdesc = df_trees.doc.torchspine_desc,
|
||||||
_doc_items_usagehelp = df_trees.doc.torchspine_usage,
|
_doc_items_usagehelp = df_trees.doc.torchspine_usage,
|
||||||
tiles = {df_trees.textures.gold_block, "dfcaverns_torchspine_1.5.png", "dfcaverns_torchspine_1_lit.png"},
|
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},
|
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},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
@ -34,7 +34,7 @@ minetest.register_node("df_trees:tower_cap_gills", {
|
|||||||
tiles = {"dfcaverns_tower_cap_gills.png"},
|
tiles = {"dfcaverns_tower_cap_gills.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1, tower_cap = 1},
|
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1, tower_cap = 1},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drop = {
|
drop = {
|
||||||
@ -51,10 +51,10 @@ minetest.register_node("df_trees:tower_cap_gills", {
|
|||||||
},
|
},
|
||||||
_mcl_blast_resistance = 0.2,
|
_mcl_blast_resistance = 0.2,
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
after_place_node = df_trees.after_place_leaves,
|
after_place_node = df_dependencies.after_place_leaves,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_leafdecay({
|
df_dependencies.register_leafdecay({
|
||||||
trunks = {"df_trees:tower_cap"}, -- don't need stem nodes here
|
trunks = {"df_trees:tower_cap"}, -- don't need stem nodes here
|
||||||
leaves = {"df_trees:tower_cap_gills"},
|
leaves = {"df_trees:tower_cap_gills"},
|
||||||
radius = 1,
|
radius = 1,
|
||||||
@ -77,12 +77,12 @@ minetest.register_node("df_trees:tower_cap_wood", {
|
|||||||
tiles = {"dfcaverns_tower_cap_wood.png"},
|
tiles = {"dfcaverns_tower_cap_wood.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 3,
|
_mcl_blast_resistance = 3,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("tower_cap_wood", {burntime = 7})
|
df_dependencies.register_all_stairs_and_fences("tower_cap_wood", {burntime = 7})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
@ -131,7 +131,7 @@ minetest.register_node("df_trees:tower_cap_sapling", {
|
|||||||
},
|
},
|
||||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||||
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
_mcl_blast_resistance = 0.2,
|
_mcl_blast_resistance = 0.2,
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ minetest.register_node("df_trees:tunnel_tube", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2},
|
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
on_place = minetest.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 2,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
@ -46,7 +46,7 @@ minetest.register_node("df_trees:tunnel_tube_slant_bottom", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drop = "df_trees:tunnel_tube",
|
drop = "df_trees:tunnel_tube",
|
||||||
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2},
|
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
on_place = minetest.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -78,7 +78,7 @@ minetest.register_node("df_trees:tunnel_tube_slant_top", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drop = "df_trees:tunnel_tube",
|
drop = "df_trees:tunnel_tube",
|
||||||
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2},
|
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
on_place = minetest.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -110,7 +110,7 @@ minetest.register_node("df_trees:tunnel_tube_slant_full", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drop = "df_trees:tunnel_tube",
|
drop = "df_trees:tunnel_tube",
|
||||||
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2},
|
groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
on_place = minetest.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -140,7 +140,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
-- Paper
|
-- Paper
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = df_trees.node_names.paper .. " 3",
|
output = df_dependencies.node_name_paper .. " 3",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {'df_trees:tunnel_tube', 'bucket:bucket_water'},
|
recipe = {'df_trees:tunnel_tube', 'bucket:bucket_water'},
|
||||||
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}},
|
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}},
|
||||||
@ -155,12 +155,12 @@ minetest.register_node("df_trees:tunnel_tube_wood", {
|
|||||||
tiles = {"dfcaverns_tunnel_tube_wood_top.png", "dfcaverns_tunnel_tube_wood_top.png", "dfcaverns_tunnel_tube_wood_side.png"},
|
tiles = {"dfcaverns_tunnel_tube_wood_top.png", "dfcaverns_tunnel_tube_wood_top.png", "dfcaverns_tunnel_tube_wood_side.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 10,
|
_mcl_blast_resistance = 10,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register.all_stairs_and_fences("tunnel_tube_wood", {burntime = 9})
|
df_dependencies.register_all_stairs_and_fences("tunnel_tube_wood", {burntime = 9})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
@ -189,7 +189,7 @@ if df_trees.config.enable_tnt then
|
|||||||
|
|
||||||
local tnt_radius = tonumber(minetest.settings:get("tnt_radius") or 3) * 2/3
|
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 tnt_def = {radius = tnt_radius, damage_radius = tnt_radius * 2}
|
||||||
local torch_item = df_trees.node_names.torch
|
local torch_item = df_dependencies.node_name_torch
|
||||||
|
|
||||||
local on_burn = function(pos)
|
local on_burn = function(pos)
|
||||||
minetest.swap_node(pos, {name = "df_trees:tunnel_tube_fruiting_body_burning"})
|
minetest.swap_node(pos, {name = "df_trees:tunnel_tube_fruiting_body_burning"})
|
||||||
@ -204,7 +204,7 @@ if df_trees.config.enable_tnt then
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 3, oddly_breakable_by_hand=1, flammable = 2, tnt = 1,},
|
groups = {choppy = 3, oddly_breakable_by_hand=1, flammable = 2, tnt = 1,},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
on_place = minetest.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 3,
|
max_items = 3,
|
||||||
@ -261,7 +261,7 @@ if df_trees.config.enable_tnt then
|
|||||||
groups = {not_in_creative_inventory = 1,},
|
groups = {not_in_creative_inventory = 1,},
|
||||||
light_source = 5,
|
light_source = 5,
|
||||||
drop = "",
|
drop = "",
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
_mcl_blast_resistance = 0,
|
_mcl_blast_resistance = 0,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
@ -288,7 +288,7 @@ else
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 3, oddly_breakable_by_hand=1, flammable = 2},
|
groups = {choppy = 3, oddly_breakable_by_hand=1, flammable = 2},
|
||||||
sounds = df_trees.sounds.wood,
|
sounds = df_dependencies.sound_wood(),
|
||||||
on_place = minetest.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
_mcl_blast_resistance = 12,
|
_mcl_blast_resistance = 12,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
@ -334,7 +334,7 @@ minetest.register_node("df_trees:tunnel_tube_sapling", {
|
|||||||
},
|
},
|
||||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||||
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
attached_node = 1, sapling = 1, light_sensitive_fungus = 11},
|
||||||
sounds = df_trees.sounds.leaves,
|
sounds = df_dependencies.sound_leaves(),
|
||||||
_mcl_blast_resistance = 10,
|
_mcl_blast_resistance = 10,
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user