local colbox_tube_light = {
   type = 'fixed',
   fixed = {
      {-.1, -.5, -.4, .1, -.4, .4},}}

minetest.register_node('lights:tube_light', {
   description = 'Fluorecent Light',
   drawtype = 'mesh',
   mesh = 'lights_tube_light.obj',
   paramtype = 'light',
   paramtype2 = 'facedir',
   light_source = 14,
   selection_box = colbox_tube_light,
   collision_box = colbox_tube_light,
   tiles = {'lights_tube_light.png'},
   groups = {breakable=1},
   on_place = minetest.rotate_node,
})

minetest.register_node('lights:table_lamp', {
   description = 'Table Lamp',
   drawtype = 'mesh',
   mesh = 'lights_table_lamp.obj',
   paramtype = 'light',
   light_source = 10,
   selection_box = {type = 'fixed',
   fixed = {
      {-.25, -.5, -.25, .25, .4375, .25},}},
   collision_box = {type = 'fixed',
   fixed = {
      {-.25, -.5, -.25, .25, .4375, .25},}},
   tiles = {'lights_table_lamp.png'},
   groups = {breakable=1},
})

minetest.register_node('lights:floor_lamp', {
   description = 'Floor Lamp',
   drawtype = 'mesh',
   mesh = 'lights_floor_lamp.obj',
   paramtype = 'light',
   light_source = 5,
   selection_box = {type = 'fixed',
      fixed = {
         {-.25, -.5, -.25, .25, 1.4375, .25},}},
   collision_box = {type = 'fixed',
      fixed = {
         {-.25, -.5, -.25, .25, 1.4375, .25},}},
   tiles = {'lights_table_lamp.png'},
   groups = {breakable=1},
   on_construct = function(pos)
      lights.light_above(pos, 10)
   end,
   on_destruct = lights.remove_above,
})

minetest.register_node('lights:lamp_modern', {
   description = 'Modern Lamp',
   drawtype = 'mesh',
   mesh = 'lights_lamp_modern.obj',
   paramtype = 'light',
   paramtype2 = 'facedir',
   light_source = 14,
   selection_box = {type = 'fixed',
      fixed = {
         {-.25, -.5, -.25, .25, .4375, .25},}},
   collision_box = {type = 'fixed',
      fixed = {
         {-.25, -.5, -.25, .25, .4375, .25},}},
   tiles = {'lights_lamp_modern.png'},
   groups = {breakable=1},
})

minetest.register_node('lights:lamp_wall', {
   description = 'Wall Lamp',
   drawtype = 'mesh',
   mesh = 'lights_lamp_wall.obj',
   paramtype = 'light',
   paramtype2 = 'wallmounted',
   light_source = 14,
   selection_box = {type = 'fixed',
      fixed = {
         {-.2, -.5, -.25, .2, 0, .3125},}},
   collision_box = {type = 'fixed',
      fixed = {
         {-.2, -.5, -.25, .2, 0, .3125},}},
   tiles = {'lights_lamp_wall.png'},
   groups = {breakable=1},
})

minetest.register_node('lights:chandelier_1', {
   description = 'Chandelier',
   drawtype = 'mesh',
   mesh = 'lights_chandelier_1.obj',
   tiles = {'lights_chandelier_1.png'},
   paramtype = 'light',
   paramtype2 = 'facedir',
   light_source = 14,
   selection_box = {type = 'fixed',
      fixed = {
         {-.5, -.25, -.5, .5, .25, .5},}},
   collision_box = {type = 'fixed',
      fixed = {
         {-.5, -.25, -.5, .5, .25, .5},}},
   groups = {breakable=1},
   after_place_node = lights.chandelier_placement,
   on_destruct = lights.chandelier_removal,
   on_punch = lights.chandelier_placement
})

minetest.register_node('lights:chandelier_rod_br', {
   description = 'Chandelier Rod (Oil Rubbed Bronze)',
   drawtype = 'mesh',
   mesh = 'lights_chandelier_rod.obj',
   tiles = {'lights_chandelier_rod_br.png'},
   paramtype = 'light',
   light_source = 2,
   selection_box = {type = 'fixed',
      fixed = {
         {-.1, -.5, -.1, .1, .5, .1},}},
   collision_box = {type = 'fixed',
      fixed = {
         {-.1, -.5, -.1, .1, .5, .1},}},
   groups = {breakable=1},
})
