mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-07-13 05:50:29 +02: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:
@ -12,48 +12,6 @@ dofile(modpath.."/aliases.lua")
|
||||
|
||||
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.."/fungiwood.lua")
|
||||
dofile(modpath.."/tunnel_tube.lua")
|
||||
|
Reference in New Issue
Block a user