mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-24 09:10:19 +01:00
default fences using dfcaverns wood
also adding flora group to all plants, making spongestone drop dirt, and adding fuel recipes for primordial wood types
This commit is contained in:
parent
1b402a2403
commit
f23d4115bd
@ -18,7 +18,7 @@ local register_cave_wheat = function(number)
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
floodable = true,
|
floodable = true,
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1},
|
||||||
sounds = df_farming.sounds.leaves,
|
sounds = df_farming.sounds.leaves,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -16,7 +16,7 @@ local register_dimple_cup = function(number)
|
|||||||
floodable = true,
|
floodable = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, color_blue = 1, light_sensitive_fungus = 11, flower = 1},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, color_blue = 1, light_sensitive_fungus = 11, flower = 1, flora = 1},
|
||||||
sounds = df_farming.sounds.leaves,
|
sounds = df_farming.sounds.leaves,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -69,7 +69,7 @@ local def = {
|
|||||||
floodable = true,
|
floodable = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, color_blue = 1, light_sensitive_fungus = 11, flower = 1},
|
groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, color_blue = 1, light_sensitive_fungus = 11, flower = 1, flora = 1},
|
||||||
sounds = df_farming.sounds.leaves,
|
sounds = df_farming.sounds.leaves,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -18,7 +18,7 @@ local register_pig_tail = function(number)
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
floodable = true,
|
floodable = true,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1},
|
||||||
sounds = df_farming.sounds.leaves,
|
sounds = df_farming.sounds.leaves,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -15,7 +15,7 @@ minetest.register_node("df_farming:dead_fungus", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
floodable = true,
|
floodable = true,
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, flow_through = 1},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, flow_through = 1, flora = 1},
|
||||||
sounds = df_farming.sounds.leaves,
|
sounds = df_farming.sounds.leaves,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -49,7 +49,7 @@ minetest.register_node("df_farming:cavern_fungi", {
|
|||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
floodable = true,
|
floodable = true,
|
||||||
light_source = 6,
|
light_source = 6,
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flow_through = 1},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flow_through = 1, flora = 1},
|
||||||
sounds = df_farming.sounds.leaves,
|
sounds = df_farming.sounds.leaves,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -62,7 +62,7 @@ minetest.register_node("df_farming:plump_helmet_spawn", {
|
|||||||
tiles = {
|
tiles = {
|
||||||
"dfcaverns_plump_helmet_cap.png",
|
"dfcaverns_plump_helmet_cap.png",
|
||||||
},
|
},
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, digtron_on_place=1},
|
groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, digtron_on_place=1, flora = 1},
|
||||||
_dfcaverns_next_stage = "df_farming:plump_helmet_1",
|
_dfcaverns_next_stage = "df_farming:plump_helmet_1",
|
||||||
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -96,7 +96,7 @@ minetest.register_node("df_farming:plump_helmet_1", {
|
|||||||
"dfcaverns_plump_helmet_cap.png",
|
"dfcaverns_plump_helmet_cap.png",
|
||||||
"dfcaverns_plump_helmet_cap.png^[lowpart:5:dfcaverns_plump_helmet_stem.png",
|
"dfcaverns_plump_helmet_cap.png^[lowpart:5:dfcaverns_plump_helmet_stem.png",
|
||||||
},
|
},
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 1, digtron_on_place=1},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 1, digtron_on_place=1, flora = 1},
|
||||||
_dfcaverns_next_stage = "df_farming:plump_helmet_2",
|
_dfcaverns_next_stage = "df_farming:plump_helmet_2",
|
||||||
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -137,7 +137,7 @@ minetest.register_node("df_farming:plump_helmet_2", {
|
|||||||
"dfcaverns_plump_helmet_cap.png",
|
"dfcaverns_plump_helmet_cap.png",
|
||||||
"dfcaverns_plump_helmet_cap.png^[lowpart:15:dfcaverns_plump_helmet_stem.png",
|
"dfcaverns_plump_helmet_cap.png^[lowpart:15:dfcaverns_plump_helmet_stem.png",
|
||||||
},
|
},
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 2, digtron_on_place=1},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 2, digtron_on_place=1, flora = 1},
|
||||||
_dfcaverns_next_stage = "df_farming:plump_helmet_3",
|
_dfcaverns_next_stage = "df_farming:plump_helmet_3",
|
||||||
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -176,7 +176,7 @@ minetest.register_node("df_farming:plump_helmet_3", {
|
|||||||
"dfcaverns_plump_helmet_cap.png",
|
"dfcaverns_plump_helmet_cap.png",
|
||||||
"dfcaverns_plump_helmet_cap.png^[lowpart:35:dfcaverns_plump_helmet_stem.png",
|
"dfcaverns_plump_helmet_cap.png^[lowpart:35:dfcaverns_plump_helmet_stem.png",
|
||||||
},
|
},
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 3, digtron_on_place=1},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 3, digtron_on_place=1, flora = 1},
|
||||||
_dfcaverns_next_stage = "df_farming:plump_helmet_4",
|
_dfcaverns_next_stage = "df_farming:plump_helmet_4",
|
||||||
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -215,7 +215,7 @@ minetest.register_node("df_farming:plump_helmet_4", {
|
|||||||
"dfcaverns_plump_helmet_cap.png",
|
"dfcaverns_plump_helmet_cap.png",
|
||||||
"dfcaverns_plump_helmet_cap.png^[lowpart:40:dfcaverns_plump_helmet_stem.png",
|
"dfcaverns_plump_helmet_cap.png^[lowpart:40:dfcaverns_plump_helmet_stem.png",
|
||||||
},
|
},
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 4, digtron_on_place=1},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 4, digtron_on_place=1, flora = 1},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -271,7 +271,7 @@ minetest.register_node("df_farming:plump_helmet_4_picked", {
|
|||||||
"dfcaverns_plump_helmet_cap.png",
|
"dfcaverns_plump_helmet_cap.png",
|
||||||
"dfcaverns_plump_helmet_cap.png^[lowpart:40:dfcaverns_plump_helmet_stem.png",
|
"dfcaverns_plump_helmet_cap.png^[lowpart:40:dfcaverns_plump_helmet_stem.png",
|
||||||
},
|
},
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 4, digtron_on_place=1},
|
groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 4, digtron_on_place=1, flora = 1},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
@ -18,7 +18,7 @@ local register_quarry_bush = function(number)
|
|||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
floodable = true,
|
floodable = true,
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1},
|
||||||
sounds = df_farming.sounds.leaves,
|
sounds = df_farming.sounds.leaves,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -16,7 +16,7 @@ local register_sweet_pod = function(number)
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
floodable = true,
|
floodable = true,
|
||||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11},
|
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1},
|
||||||
sounds = df_farming.sounds.leaves,
|
sounds = df_farming.sounds.leaves,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -138,6 +138,7 @@ minetest.register_node("df_mapitems:spongestone", {
|
|||||||
_doc_items_longdesc = df_mapitems.doc.sponge_stone_desc,
|
_doc_items_longdesc = df_mapitems.doc.sponge_stone_desc,
|
||||||
_doc_items_usagehelp = df_mapitems.doc.sponge_stone_usage,
|
_doc_items_usagehelp = df_mapitems.doc.sponge_stone_usage,
|
||||||
tiles = {"dfcaverns_ground_cover_sponge_stone.png"},
|
tiles = {"dfcaverns_ground_cover_sponge_stone.png"},
|
||||||
|
drop = dirt_node,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {crumbly = 3, soil = 1, light_sensitive_fungus = 8},
|
groups = {crumbly = 3, soil = 1, light_sensitive_fungus = 8},
|
||||||
|
@ -146,7 +146,8 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("fern_wood")
|
df_trees.register.all_stairs("fern_wood")
|
||||||
|
df_trees.register.all_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"),
|
||||||
@ -188,6 +189,27 @@ df_primordial_items.register_leafdecay({
|
|||||||
radius = 2,
|
radius = 2,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "df_primordial_items:fern_wood",
|
||||||
|
burntime = 7,
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "group:fern_stem",
|
||||||
|
burntime = 28,
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "df_primordial_items:giant_fern_leaves",
|
||||||
|
burntime = 2,
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "df_primordial_items:fern_sapling",
|
||||||
|
burntime = 2,
|
||||||
|
})
|
||||||
------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------
|
||||||
-- Schematics
|
-- Schematics
|
||||||
|
|
||||||
|
@ -115,7 +115,8 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("primordial_mush_trunk_wood")
|
df_trees.register.all_stairs("primordial_mush_trunk_wood")
|
||||||
|
df_trees.register.all_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"),
|
||||||
@ -135,7 +136,45 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("primordial_mush_cap_wood")
|
df_trees.register.all_stairs("primordial_mush_cap_wood")
|
||||||
|
df_trees.register.all_fences("primordial_mush_cap_wood", {burntime=12})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "df_primordial_items:primordial_mush_cap_wood",
|
||||||
|
burntime = 12,
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "df_primordial_items:primordial_mush_trunk_wood",
|
||||||
|
burntime = 7,
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "df_primordial_items:mushroom_cap",
|
||||||
|
burntime = 40,
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "df_primordial_items:mushroom_trunk",
|
||||||
|
burntime = 30,
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "df_primordial_items:mushroom_gills",
|
||||||
|
burntime = 2,
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "df_primordial_items:mushroom_gills_glowing",
|
||||||
|
burntime = 4,
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "df_primordial_items:mush_sapling",
|
||||||
|
burntime = 2,
|
||||||
|
})
|
||||||
|
|
||||||
------
|
------
|
||||||
-- Schematics:
|
-- Schematics:
|
||||||
|
@ -98,7 +98,8 @@ minetest.register_node("df_trees:black_cap_wood", {
|
|||||||
sounds = df_trees.sounds.wood,
|
sounds = df_trees.sounds.wood,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("black_cap_wood")
|
df_trees.register.all_stairs("black_cap_wood")
|
||||||
|
df_trees.register.all_fences("black_cap_wood", {burntime = 30})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
@ -176,7 +176,8 @@ minetest.register_node("df_trees:blood_thorn_wood", {
|
|||||||
sounds = df_trees.sounds.wood,
|
sounds = df_trees.sounds.wood,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("blood_thorn_wood")
|
df_trees.register.all_stairs("blood_thorn_wood")
|
||||||
|
df_trees.register.all_fences("blood_thorn_wood", {burntime = 40})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
-- Note that a circular table reference will result in a crash, TODO: guard against that.
|
||||||
|
-- Unlikely to be needed, though - it'd take a lot of work for users to get into this bit of trouble.
|
||||||
|
local function deep_copy(table_in)
|
||||||
|
local table_out = {}
|
||||||
|
|
||||||
|
for index, value in pairs(table_in) do
|
||||||
|
if type(value) == "table" then
|
||||||
|
table_out[index] = deep_copy(value)
|
||||||
|
else
|
||||||
|
table_out[index] = value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return table_out
|
||||||
|
end
|
||||||
|
|
||||||
|
local S = df_trees.S
|
||||||
|
|
||||||
df_trees.sounds = {}
|
df_trees.sounds = {}
|
||||||
|
|
||||||
df_trees.sounds.wood = default.node_sound_wood_defaults()
|
df_trees.sounds.wood = default.node_sound_wood_defaults()
|
||||||
@ -29,11 +46,107 @@ df_trees.node_names.paper = "default:paper"
|
|||||||
df_trees.textures = {}
|
df_trees.textures = {}
|
||||||
df_trees.textures.gold_block = "default_gold_block.png"
|
df_trees.textures.gold_block = "default_gold_block.png"
|
||||||
|
|
||||||
|
df_trees.register = {}
|
||||||
|
|
||||||
|
df_trees.register.all_stairs = function(name, override_def)
|
||||||
|
local mod = minetest.get_current_modname()
|
||||||
|
|
||||||
|
local node_def = minetest.registered_nodes[mod..":"..name]
|
||||||
|
override_def = override_def or {}
|
||||||
|
|
||||||
|
local node_copy = deep_copy(node_def)
|
||||||
|
for index, value in pairs(override_def) do
|
||||||
|
node_copy[index] = value
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath("stairs") then
|
||||||
|
stairs.register_stair_and_slab(
|
||||||
|
name,
|
||||||
|
mod ..":" .. name,
|
||||||
|
node_copy.groups,
|
||||||
|
node_copy.tiles,
|
||||||
|
S("@1 Stair", node_copy.description),
|
||||||
|
S("@1 Slab", node_copy.description),
|
||||||
|
node_copy.sounds
|
||||||
|
)
|
||||||
|
end
|
||||||
|
if minetest.get_modpath("moreblocks") then
|
||||||
|
stairsplus:register_all(mod, name, mod..":"..name, node_copy)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
df_trees.register.all_fences = function (name, override_def)
|
||||||
|
local mod = minetest.get_current_modname()
|
||||||
|
|
||||||
|
local material = mod..":"..name
|
||||||
|
local node_def = minetest.registered_nodes[material]
|
||||||
|
override_def = override_def or {}
|
||||||
|
|
||||||
|
local burntime = override_def.burntime
|
||||||
|
|
||||||
|
default.register_fence(material .. "_fence", {
|
||||||
|
description = S("@1 Fence", node_def.description),
|
||||||
|
texture = override_def.texture or node_def.tiles[1],
|
||||||
|
material = override_def.material or material,
|
||||||
|
groups = deep_copy(node_def.groups or {}), -- the default register_fence function modifies the groups table passed in, so send a copy instead to be on the safe side.
|
||||||
|
sounds = node_def.sounds
|
||||||
|
})
|
||||||
|
if burntime then
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = material .. "_fence",
|
||||||
|
burntime = burntime, -- ignoring two sticks
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
default.register_fence_rail(material .. "_fence_rail", {
|
||||||
|
description = S("@1 Fence Rail", node_def.description),
|
||||||
|
texture = override_def.texture or node_def.tiles[1],
|
||||||
|
material = override_def.material or material,
|
||||||
|
groups = deep_copy(node_def.groups or {}), -- the default register_fence_rail function modifies the groups table passed in, so send a copy instead to be on the safe side.
|
||||||
|
sounds = node_def.sounds
|
||||||
|
})
|
||||||
|
if burntime then
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = material .. "_fence_rail",
|
||||||
|
burntime = burntime * 4/16,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
default.register_mesepost(material .. "_mese_light", {
|
||||||
|
description = S("@1 Mese Post Light", node_def.description),
|
||||||
|
texture = override_def.texture or node_def.tiles[1],
|
||||||
|
material = override_def.material or material,
|
||||||
|
groups = deep_copy(node_def.groups or {}), -- the default register_fence_rail function modifies the groups table passed in, so send a copy instead to be on the safe side.
|
||||||
|
sounds = node_def.sounds
|
||||||
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("doors") then
|
||||||
|
doors.register_fencegate(material .. "_fence_gate", {
|
||||||
|
description = S("@1 Fence Gate", node_def.description),
|
||||||
|
texture = override_def.texture or node_def.tiles[1],
|
||||||
|
material = override_def.material or material,
|
||||||
|
groups = deep_copy(node_def.groups or {}), -- the default register_fence_rail function modifies the groups table passed in, so send a copy instead to be on the safe side.
|
||||||
|
sounds = node_def.sounds
|
||||||
|
})
|
||||||
|
|
||||||
|
if burntime then
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = material .. "_fence_gate_closed",
|
||||||
|
burntime = burntime * 2, -- ignoring four sticks
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- this stuff is only for during initialization
|
-- this stuff is only for during initialization
|
||||||
minetest.after(0, function()
|
minetest.after(0, function()
|
||||||
df_trees.sounds = nil
|
df_trees.sounds = nil
|
||||||
df_trees.node_names = nil
|
df_trees.node_names = nil
|
||||||
df_trees.textures = nil
|
df_trees.textures = nil
|
||||||
|
df_trees.register = nil
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +40,8 @@ minetest.register_node("df_trees:fungiwood_wood", {
|
|||||||
sounds = df_trees.sounds.wood,
|
sounds = df_trees.sounds.wood,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("fungiwood_wood")
|
df_trees.register.all_stairs("fungiwood_wood")
|
||||||
|
df_trees.register.all_fences("fungiwood_wood", {burntime = 7})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
@ -94,8 +94,10 @@ minetest.register_node("df_trees:goblin_cap_stem_wood", {
|
|||||||
sounds = df_trees.sounds.wood,
|
sounds = df_trees.sounds.wood,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("goblin_cap_wood")
|
df_trees.register.all_stairs("goblin_cap_wood")
|
||||||
df_trees.register_all_stairs("goblin_cap_stem_wood")
|
df_trees.register.all_fences("goblin_cap_wood", {burntime = 12})
|
||||||
|
df_trees.register.all_stairs("goblin_cap_stem_wood")
|
||||||
|
df_trees.register.all_fences("goblin_cap_stem_wood", {burntime = 7})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
@ -12,48 +12,6 @@ dofile(modpath.."/aliases.lua")
|
|||||||
|
|
||||||
local S = df_trees.S
|
local S = df_trees.S
|
||||||
|
|
||||||
df_trees.register_all_stairs = function(name, override_def)
|
|
||||||
local mod = minetest.get_current_modname()
|
|
||||||
|
|
||||||
local node_def = minetest.registered_nodes[mod..":"..name]
|
|
||||||
override_def = override_def or {}
|
|
||||||
|
|
||||||
-- Note that a circular table reference will result in a crash, TODO: guard against that.
|
|
||||||
-- Unlikely to be needed, though - it'd take a lot of work for users to get into this bit of trouble.
|
|
||||||
local function deep_copy(table_in)
|
|
||||||
local table_out = {}
|
|
||||||
|
|
||||||
for index, value in pairs(table_in) do
|
|
||||||
if type(value) == "table" then
|
|
||||||
table_out[index] = deep_copy(value)
|
|
||||||
else
|
|
||||||
table_out[index] = value
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return table_out
|
|
||||||
end
|
|
||||||
|
|
||||||
local node_copy = deep_copy(node_def)
|
|
||||||
for index, value in pairs(override_def) do
|
|
||||||
node_copy[index] = value
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_modpath("stairs") then
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
name,
|
|
||||||
mod ..":" .. name,
|
|
||||||
node_copy.groups,
|
|
||||||
node_copy.tiles,
|
|
||||||
S("@1 Stair", node_copy.description),
|
|
||||||
S("@1 Slab", node_copy.description),
|
|
||||||
node_copy.sounds
|
|
||||||
)
|
|
||||||
end
|
|
||||||
if minetest.get_modpath("moreblocks") then
|
|
||||||
stairsplus:register_all(mod, name, mod..":"..name, node_copy)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
dofile(modpath.."/blood_thorn.lua")
|
dofile(modpath.."/blood_thorn.lua")
|
||||||
dofile(modpath.."/fungiwood.lua")
|
dofile(modpath.."/fungiwood.lua")
|
||||||
dofile(modpath.."/tunnel_tube.lua")
|
dofile(modpath.."/tunnel_tube.lua")
|
||||||
|
@ -22,6 +22,17 @@ Blood Thorn Stem=Blutdornstamm
|
|||||||
Dead Blood Thorn Spike=
|
Dead Blood Thorn Spike=
|
||||||
Dead Blood Thorn Stem=
|
Dead Blood Thorn Stem=
|
||||||
|
|
||||||
|
### dependencies.lua ###
|
||||||
|
|
||||||
|
@1 Fence=
|
||||||
|
@1 Fence Gate=
|
||||||
|
@1 Fence Rail=
|
||||||
|
@1 Mese Post Light=
|
||||||
|
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
||||||
|
@1 Slab=@1 Platte
|
||||||
|
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
||||||
|
@1 Stair=@1 Treppe
|
||||||
|
|
||||||
### doc.lua ###
|
### doc.lua ###
|
||||||
|
|
||||||
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
||||||
@ -153,13 +164,6 @@ Goblin Cap Stem=
|
|||||||
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
||||||
Goblin Cap Stem Planks=Goblin Cap Stem Planken
|
Goblin Cap Stem Planks=Goblin Cap Stem Planken
|
||||||
|
|
||||||
### init.lua ###
|
|
||||||
|
|
||||||
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
|
||||||
@1 Slab=@1 Platte
|
|
||||||
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
|
||||||
@1 Stair=@1 Treppe
|
|
||||||
|
|
||||||
### nether_cap.lua ###
|
### nether_cap.lua ###
|
||||||
|
|
||||||
Nether Cap=
|
Nether Cap=
|
||||||
|
@ -17,6 +17,17 @@ Blood Thorn Stem=Gambo di spina del sangue
|
|||||||
Dead Blood Thorn Spike=Spuntone di spina del sangue morta
|
Dead Blood Thorn Spike=Spuntone di spina del sangue morta
|
||||||
Dead Blood Thorn Stem=Gambo di spina del sangue morta
|
Dead Blood Thorn Stem=Gambo di spina del sangue morta
|
||||||
|
|
||||||
|
### dependencies.lua ###
|
||||||
|
|
||||||
|
@1 Fence=
|
||||||
|
@1 Fence Gate=
|
||||||
|
@1 Fence Rail=
|
||||||
|
@1 Mese Post Light=
|
||||||
|
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
||||||
|
@1 Slab=@1 Lastra
|
||||||
|
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
||||||
|
@1 Stair=@1 Scala
|
||||||
|
|
||||||
### doc.lua ###
|
### doc.lua ###
|
||||||
|
|
||||||
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
||||||
@ -144,13 +155,6 @@ Goblin Cap Spawn=Prole di cappello di folletto
|
|||||||
Goblin Cap Stem=Gambo di cappello di folletto
|
Goblin Cap Stem=Gambo di cappello di folletto
|
||||||
Goblin Cap Stem Planks=Assi di gambo di cappello di folletto
|
Goblin Cap Stem Planks=Assi di gambo di cappello di folletto
|
||||||
|
|
||||||
### init.lua ###
|
|
||||||
|
|
||||||
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
|
||||||
@1 Slab=@1 Lastra
|
|
||||||
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
|
|
||||||
@1 Stair=@1 Scala
|
|
||||||
|
|
||||||
### nether_cap.lua ###
|
### nether_cap.lua ###
|
||||||
|
|
||||||
Nether Cap=Cappello del Nether
|
Nether Cap=Cappello del Nether
|
||||||
|
@ -17,6 +17,15 @@ Blood Thorn Stem=
|
|||||||
Dead Blood Thorn Spike=
|
Dead Blood Thorn Spike=
|
||||||
Dead Blood Thorn Stem=
|
Dead Blood Thorn Stem=
|
||||||
|
|
||||||
|
### dependencies.lua ###
|
||||||
|
|
||||||
|
@1 Fence=
|
||||||
|
@1 Fence Gate=
|
||||||
|
@1 Fence Rail=
|
||||||
|
@1 Mese Post Light=
|
||||||
|
@1 Slab=
|
||||||
|
@1 Stair=
|
||||||
|
|
||||||
### doc.lua ###
|
### doc.lua ###
|
||||||
|
|
||||||
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.=
|
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.=
|
||||||
@ -107,11 +116,6 @@ Goblin Cap Spawn=
|
|||||||
Goblin Cap Stem=
|
Goblin Cap Stem=
|
||||||
Goblin Cap Stem Planks=
|
Goblin Cap Stem Planks=
|
||||||
|
|
||||||
### init.lua ###
|
|
||||||
|
|
||||||
@1 Slab=
|
|
||||||
@1 Stair=
|
|
||||||
|
|
||||||
### nether_cap.lua ###
|
### nether_cap.lua ###
|
||||||
|
|
||||||
Nether Cap=
|
Nether Cap=
|
||||||
|
@ -82,7 +82,8 @@ minetest.register_node("df_trees:nether_cap_wood", {
|
|||||||
sounds = df_trees.sounds.wood,
|
sounds = df_trees.sounds.wood,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("nether_cap_wood")
|
df_trees.register.all_stairs("nether_cap_wood")
|
||||||
|
df_trees.register.all_fences("nether_cap_wood")
|
||||||
|
|
||||||
-- sapling
|
-- sapling
|
||||||
minetest.register_node("df_trees:nether_cap_sapling", {
|
minetest.register_node("df_trees:nether_cap_sapling", {
|
||||||
|
@ -41,7 +41,8 @@ minetest.register_node("df_trees:spore_tree_wood", {
|
|||||||
sounds = df_trees.sounds.wood,
|
sounds = df_trees.sounds.wood,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("spore_tree_wood")
|
df_trees.register.all_stairs("spore_tree_wood")
|
||||||
|
df_trees.register.all_fences("spore_tree_wood", {burntime = 6})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
@ -81,7 +81,8 @@ minetest.register_node("df_trees:tower_cap_wood", {
|
|||||||
sounds = df_trees.sounds.wood,
|
sounds = df_trees.sounds.wood,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("tower_cap_wood")
|
df_trees.register.all_stairs("tower_cap_wood")
|
||||||
|
df_trees.register.all_fences("tower_cap_wood", {burntime = 7})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
@ -151,7 +151,8 @@ minetest.register_node("df_trees:tunnel_tube_wood", {
|
|||||||
sounds = df_trees.sounds.wood,
|
sounds = df_trees.sounds.wood,
|
||||||
})
|
})
|
||||||
|
|
||||||
df_trees.register_all_stairs("tunnel_tube_wood")
|
df_trees.register.all_stairs("tunnel_tube_wood")
|
||||||
|
df_trees.register.all_fences("tunnel_tube_wood", {burntime = 9})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
Loading…
Reference in New Issue
Block a user