123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- minetest.register_node('furniture:ceiling_fan', {
- description = 'Ceiling Fan',
- drawtype = 'mesh',
- mesh = 'furniture_ceiling_fan.obj',
- tiles = {'furniture_ceiling_fan.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {-.4, .25, -.4, .4, .5, .4},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.4, .25, -.4, .4, .5, .4},
- },
- groups = {breakable=1},
- })
- minetest.register_node('furniture:grandfather_clock', {
- description = 'Grandfather Clock',
- drawtype = 'mesh',
- mesh = 'furniture_grandfather_clock.obj',
- tiles = {'furniture_grandfather_clock.png'},
- use_texture_alpha = 'clip',
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {-.325, -.5, 0, .325, 1.4375, .4375},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.325, -.5, 0, .325, 1.4375, .4375},
- },
- groups = {breakable=1, stash=1},
- on_rightclick = furniture.right_click,
- on_punch = furniture.punch
- })
- minetest.register_node('furniture:railing_straight', {
- description = 'Straight Railing',
- drawtype = 'mesh',
- mesh = 'furniture_railing_straight.obj',
- tiles = {'furniture_railing.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {-.5, -.5, .4375, .5, .4375, .5625},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.5, -.5, .4375, .5, 1, .5625},
- },
- groups = {breakable=1},
- after_place_node = function(pos, placer)
- if placer:get_player_control().sneak then
- local node = minetest.get_node(pos)
- local new_pos = {x = pos.x, y = pos.y+1, z = pos.z}
- minetest.remove_node(pos)
- minetest.add_node(new_pos, {name = 'furniture:railing_straight', param2 = node.param2})
- end
- end,
- })
- minetest.register_node('furniture:railing_corner', {
- description = 'Corner Railing',
- drawtype = 'mesh',
- mesh = 'furniture_railing_corner.obj',
- tiles = {'furniture_railing.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {{-.5, -.5, .4375, .5, .4375, .5625},
- {.5625, -.5, -.5, .4375, .4375, .5625}}
- },
- collision_box = {
- type = 'fixed',
- fixed = {{-.5, -.5, .4375, .5, .4375, .5625},
- {.5625, -.5, -.5, .4375, .4375, .5625}}
- },
- groups = {breakable=1},
- after_place_node = function(pos, placer)
- if placer:get_player_control().sneak then
- local node = minetest.get_node(pos)
- local new_pos = {x = pos.x, y = pos.y+1, z = pos.z}
- minetest.remove_node(pos)
- minetest.add_node(new_pos, {name = 'furniture:railing_corner', param2 = node.param2})
- end
- end,
- })
- minetest.register_node('furniture:ladder', {
- description = 'Ladder',
- drawtype = 'mesh',
- mesh = 'furniture_ladder.obj',
- tiles = {'furniture_ladder.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- walkable = false,
- climbable = true,
- selection_box = {
- type = 'fixed',
- fixed = {-.5, -.5, .25, .5, .5, .5}
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.5, -.5, -.5, .5, .5, .5}
- },
- groups = {breakable=1},
- })
|