sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
- minetest.get_node_timer(pos):start(math.random(2400,4800))
+ minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
- minetest.get_node_timer(pos):start(math.random(2400,4800))
+ minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
- minetest.get_node_timer(pos):start(math.random(2400,4800))
+ minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
- minetest.get_node_timer(pos):start(math.random(2400,4800))
+ minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
- minetest.get_node_timer(pos):start(math.random(2400,4800))
+ minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
- minetest.get_node_timer(pos):start(math.random(1200, 2400))
+ minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
- minetest.get_node_timer(pos):start(math.random(1200, 2400))
+ minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
end
local function chest_lid_obstructed(pos)
- local above = { x = pos.x, y = pos.y + 1, z = pos.z }
+ local above = {x = pos.x, y = pos.y + 1, z = pos.z}
local def = minetest.registered_nodes[minetest.get_node(above).name]
-- allow ladders, signs, wallmounted things and torches to not obstruct
- if def.drawtype == "airlike" or
+ if def and
+ (def.drawtype == "airlike" or
def.drawtype == "signlike" or
def.drawtype == "torchlike" or
- (def.drawtype == "nodebox" and def.paramtype2 == "wallmounted") then
+ (def.drawtype == "nodebox" and def.paramtype2 == "wallmounted")) then
return false
end
return true
local def_closed = table.copy(def)
def_opened.mesh = "chest_open.obj"
+ for i = 1, #def_opened.tiles do
+ if type(def_opened.tiles[i]) == "string" then
+ def_opened.tiles[i] = {name = def_opened.tiles[i], backface_culling = true}
+ elseif def_opened.tiles[i].backface_culling == nil then
+ def_opened.tiles[i].backface_culling = true
+ end
+ end
def_opened.drop = "default:" .. name
def_opened.groups.not_in_creative_inventory = 1
def_opened.selection_box = {
type = "fixed",
fixed = { -1/2, -1/2, -1/2, 1/2, 3/16, 1/2 },
- }
+ }
def_opened.can_dig = function()
return false
end