barrel cacti spread, prickly pears can only be taken down one pad at a time.
parent
0bb6948d28
commit
2d6531892f
|
@ -46,6 +46,7 @@ minetest.register_node('desert_life:barrel_cacti_'..num..'_sp', {
|
|||
drawtype = 'mesh',
|
||||
mesh = 'dl_barrel_cacti_'..num..'.obj',
|
||||
tiles = {name='dl_barrel_cacti.png'},
|
||||
drop = 'desert_life:barrel_cacti_'..num,
|
||||
groups = {oddly_breakable_by_hand=3, choppy=1, dl_bc=1},
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'facedir',
|
||||
|
@ -70,3 +71,21 @@ minetest.register_decoration({
|
|||
y_max = 30,
|
||||
decoration = "desert_life:barrel_cacti_1_sp",
|
||||
})
|
||||
|
||||
minetest.register_abm{
|
||||
nodenames = {"group:dl_bc"},
|
||||
interval = 30,
|
||||
chance = 20,
|
||||
action = function(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
if node.name == 'desert_life:barrel_cacti_1_sp' then
|
||||
minetest.set_node(pos, {name = "desert_life:barrel_cacti_2_sp", param2 = node.param2})
|
||||
end
|
||||
if node.name == 'desert_life:barrel_cacti_2_sp' then
|
||||
minetest.set_node(pos, {name = "desert_life:barrel_cacti_3_sp", param2 = node.param2})
|
||||
end
|
||||
if node.name == 'desert_life:barrel_cacti_3_sp' then
|
||||
desert_life.spread('desert_life:barrel_cacti_1_sp', pos, 'default:desert_sand', 'air')
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ for i in ipairs (prickly_pear_table) do
|
|||
drawtype = 'mesh',
|
||||
mesh = 'dl_pp_'..num..'.obj',
|
||||
tiles = {name='dl_prickly_pear.png'},
|
||||
groups = {oddly_breakable_by_hand=3, choppy=2, dl_pp=1, not_in_creative_inventory=1},
|
||||
groups = {not_in_creative_inventory=1},
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'facedir',
|
||||
selection_box = col,
|
||||
|
@ -81,7 +81,7 @@ minetest.register_node('desert_life:prickly_pear', {
|
|||
drawtype = 'mesh',
|
||||
mesh = 'dl_pp_1.obj',
|
||||
tiles = {name='dl_prickly_pear.png'},
|
||||
groups = {oddly_breakable_by_hand=3, choppy=2, },
|
||||
groups = {},
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'facedir',
|
||||
selection_box = {
|
||||
|
|
Loading…
Reference in New Issue