mirror of
https://github.com/mt-mods/moretrees.git
synced 2024-12-27 03:00:24 +01:00
manual merge https://github.com/mt-mods/moretrees/pull/19 and resolve conflicts
This commit is contained in:
parent
5bc6bdc3d9
commit
7879bd8192
@ -419,6 +419,11 @@ for i in ipairs(moretrees.treelist) do
|
||||
|
||||
-- the default game provides jungle tree and pine saplings.
|
||||
if treename~="jungletree" and treename ~= "pine" then
|
||||
local regular_groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1}
|
||||
if minetest.settings:get_bool("creative_mode", false) then
|
||||
regular_groups["not_in_creative_inventory"]=1
|
||||
end
|
||||
|
||||
minetest.register_node("moretrees:"..treename.."_sapling", {
|
||||
description = moretrees.treedesc[treename].sapling,
|
||||
drawtype = "plantlike",
|
||||
@ -432,7 +437,7 @@ for i in ipairs(moretrees.treelist) do
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
|
||||
groups = regular_groups,
|
||||
sounds = default.node_sound_defaults(),
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
@ -466,6 +471,10 @@ for i in ipairs(moretrees.treelist) do
|
||||
})
|
||||
end
|
||||
|
||||
local ongen_groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1,not_in_creative_inventory=1}
|
||||
if minetest.settings:get_bool("creative_mode", false) then
|
||||
ongen_groups["not_in_creative_inventory"]=nil
|
||||
end
|
||||
minetest.register_node("moretrees:"..treename.."_sapling_ongen", {
|
||||
description = S("@1 (fast growth)", moretrees.treedesc[treename].sapling),
|
||||
drawtype = "plantlike",
|
||||
@ -479,7 +488,7 @@ for i in ipairs(moretrees.treelist) do
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
|
||||
groups = ongen_groups,
|
||||
sounds = default.node_sound_defaults(),
|
||||
drop = "moretrees:"..treename.."_sapling",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
Loading…
Reference in New Issue
Block a user