Skip to content

Commit

Permalink
tune for voxel garden based off #38
Browse files Browse the repository at this point in the history
  • Loading branch information
wsor4035 committed May 26, 2024
1 parent f49b1c4 commit 6a769e1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 35 deletions.
16 changes: 9 additions & 7 deletions crafts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ local S = minetest.get_translator("moretrees")
for i in ipairs(moretrees.treelist) do
local treename = moretrees.treelist[i][1]

minetest.register_craft({
type = "shapeless",
output = "moretrees:"..treename.."_planks 4",
recipe = {
"moretrees:"..treename.."_trunk"
}
})
if xcompat.gameid ~= "voxelgarden" then
minetest.register_craft({
type = "shapeless",
output = "moretrees:"..treename.."_planks 4",
recipe = {
"moretrees:"..treename.."_trunk"
}
})
end

minetest.register_craft({
type = "fuel",
Expand Down
62 changes: 34 additions & 28 deletions node_defs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,15 @@ for i in ipairs(moretrees.treelist) do
on_place = minetest.rotate_node,
})

minetest.register_node("moretrees:"..treename.."_planks", {
description = moretrees.treedesc[treename].planks,
tiles = {"moretrees_"..treename.."_wood.png"},
is_ground_content = false,
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
sounds = xcompat.sounds.node_sound_wood_defaults(),
})
if xcompat.gameid ~= "voxelgarden" then
minetest.register_node("moretrees:"..treename.."_planks", {
description = moretrees.treedesc[treename].planks,
tiles = {"moretrees_"..treename.."_wood.png"},
is_ground_content = false,
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
sounds = xcompat.sounds.node_sound_wood_defaults(),
})
end

local moretrees_leaves_inventory_image = nil
local moretrees_new_leaves_waving = nil
Expand Down Expand Up @@ -346,17 +348,19 @@ for i in ipairs(moretrees.treelist) do
}
)

stairsplus:register_all(
"moretrees",
treename.."_planks",
"moretrees:"..treename.."_planks",
{
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1 },
tiles = { "moretrees_"..treename.."_wood.png" },
description = moretrees.treedesc[treename].planks,
drop = treename.."_planks",
}
)
if xcompat.gameid ~= "voxelgarden" then
stairsplus:register_all(
"moretrees",
treename.."_planks",
"moretrees:"..treename.."_planks",
{
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1 },
tiles = { "moretrees_"..treename.."_wood.png" },
description = moretrees.treedesc[treename].planks,
drop = treename.."_planks",
}
)
end
elseif minetest.get_modpath("stairs") then
stairs.register_stair_and_slab(
"moretrees_"..treename.."_trunk",
Expand All @@ -371,20 +375,22 @@ for i in ipairs(moretrees.treelist) do
xcompat.sounds.node_sound_wood_defaults()
)

stairs.register_stair_and_slab(
"moretrees_"..treename.."_planks",
"moretrees:"..treename.."_planks",
{ snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3 },
{ "moretrees_"..treename.."_wood.png" },
moretrees.treedesc[treename].planks_stair,
moretrees.treedesc[treename].planks_slab,
xcompat.sounds.node_sound_wood_defaults()
)
if xcompat.gameid ~= "voxelgarden" then
stairs.register_stair_and_slab(
"moretrees_"..treename.."_planks",
"moretrees:"..treename.."_planks",
{ snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3 },
{ "moretrees_"..treename.."_wood.png" },
moretrees.treedesc[treename].planks_stair,
moretrees.treedesc[treename].planks_slab,
xcompat.sounds.node_sound_wood_defaults()
)
end

end
end

if minetest.get_modpath("default") and moretrees.enable_fences then
if minetest.get_modpath("default") and moretrees.enable_fences and xcompat.gameid ~= "voxelgarden" then
local planks_name = "moretrees:" .. treename .. "_planks"
local planks_tile = "moretrees_" .. treename .. "_wood.png"
default.register_fence("moretrees:" .. treename .. "_fence", {
Expand Down

0 comments on commit 6a769e1

Please sign in to comment.