| | |
| | | local dirs1 = { 20, 23, 22, 21 } |
| | | local dirs2 = { 9, 18, 7, 12 } |
| | | |
| | | function technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing) |
| | | local technic_homedecor_rotate_and_place = function(itemstack, placer, pointed_thing) |
| | | if not technic_homedecor_node_is_owned(pointed_thing.under, placer) |
| | | and not technic_homedecor_node_is_owned(pointed_thing.above, placer) then |
| | | local node = minetest.env:get_node(pointed_thing.under) |
| | |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | print("Hello") |
| | | technic_inductive_on_construct(pos, 100, "Yellow Glowlight (thick)") |
| | | print("Hello2") |
| | | technic.inductive_on_construct(pos, 100, "Yellow Glowlight (thick)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | print("Punch") |
| | | technic_inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_half_yellow_active") |
| | | print("Punch2") |
| | | technic.inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_half_yellow_active") |
| | | end |
| | | }) |
| | | |
| | |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 100, "Yellow Glowlight (thick)") |
| | | technic.inductive_on_construct(pos, 100, "Yellow Glowlight (thick)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_half_yellow") |
| | | technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_half_yellow") |
| | | end |
| | | }) |
| | | |
| | |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 100, "Yellow Glowlight (thin)") |
| | | technic.inductive_on_construct(pos, 100, "Yellow Glowlight (thin)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_quarter_yellow_active") |
| | | technic.inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_quarter_yellow_active") |
| | | end |
| | | }) |
| | | |
| | |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 100, "Yellow Glowlight (thin)") |
| | | technic.inductive_on_construct(pos, 100, "Yellow Glowlight (thin)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_quarter_yellow") |
| | | technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_quarter_yellow") |
| | | end |
| | | }) |
| | | |
| | |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 100, "White Glowlight (thick)") |
| | | technic.inductive_on_construct(pos, 100, "White Glowlight (thick)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_half_white_active") |
| | | technic.inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_half_white_active") |
| | | end |
| | | }) |
| | | |
| | |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 100, "White Glowlight (thick)") |
| | | technic.inductive_on_construct(pos, 100, "White Glowlight (thick)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_half_white") |
| | | technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_half_white") |
| | | end |
| | | }) |
| | | |
| | |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 100, "White Glowlight (thin)") |
| | | technic.inductive_on_construct(pos, 100, "White Glowlight (thin)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_quarter_white_active") |
| | | technic.inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_quarter_white_active") |
| | | end |
| | | }) |
| | | |
| | |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 100, "White Glowlight (thin)") |
| | | technic.inductive_on_construct(pos, 100, "White Glowlight (thin)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_quarter_white") |
| | | technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_quarter_white") |
| | | end |
| | | }) |
| | | |
| | |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 50, "Yellow Glowlight (small cube)") |
| | | technic.inductive_on_construct(pos, 50, "Yellow Glowlight (small cube)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_off(pos, 50, "technic:homedecor_glowlight_small_cube_yellow_active") |
| | | technic.inductive_on_punch_off(pos, 50, "technic:homedecor_glowlight_small_cube_yellow_active") |
| | | end |
| | | }) |
| | | |
| | |
| | | sounds = default.node_sound_wood_defaults(), |
| | | |
| | | groups = { snappy = 3, not_in_creative_inventory=1}, |
| | | drop="technic:homedecor_glowlight_cube_yellow", |
| | | drop="technic:homedecor_glowlight_small_cube_yellow", |
| | | on_place = function(itemstack, placer, pointed_thing) |
| | | technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing) |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 50, "Yellow Glowlight (small cube)") |
| | | technic.inductive_on_construct(pos, 50, "Yellow Glowlight (small cube)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_small_cube_yellow") |
| | | technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_small_cube_yellow") |
| | | end |
| | | }) |
| | | |
| | |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 50, "White Glowlight (small cube)") |
| | | technic.inductive_on_construct(pos, 50, "White Glowlight (small cube)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_off(pos, 50, "technic:homedecor_glowlight_small_cube_white_active") |
| | | technic.inductive_on_punch_off(pos, 50, "technic:homedecor_glowlight_small_cube_white_active") |
| | | end |
| | | }) |
| | | |
| | |
| | | sounds = default.node_sound_wood_defaults(), |
| | | |
| | | groups = { snappy = 3, not_in_creative_inventory=1}, |
| | | drop="technic:homedecor_glowlight_cube_white", |
| | | drop="technic:homedecor_glowlight_small_cube_white", |
| | | on_place = function(itemstack, placer, pointed_thing) |
| | | technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing) |
| | | return itemstack |
| | | end, |
| | | on_construct = function(pos) |
| | | technic_inductive_on_construct(pos, 50, "White Glowlight (small cube)") |
| | | technic.inductive_on_construct(pos, 50, "White Glowlight (small cube)") |
| | | end, |
| | | on_punch = function(pos, node, puncher) |
| | | technic_inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_small_cube_white") |
| | | technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_small_cube_white") |
| | | end |
| | | }) |
| | | |
| | | register_inductive_machine("technic:homedecor_glowlight_half_yellow") |
| | | register_inductive_machine("technic:homedecor_glowlight_half_white") |
| | | register_inductive_machine("technic:homedecor_glowlight_quarter_yellow") |
| | | register_inductive_machine("technic:homedecor_glowlight_quarter_white") |
| | | register_inductive_machine("technic:homedecor_glowlight_small_cube_yellow") |
| | | register_inductive_machine("technic:homedecor_glowlight_small_cube_white") |
| | | technic.register_inductive_machine("technic:homedecor_glowlight_half_yellow") |
| | | technic.register_inductive_machine("technic:homedecor_glowlight_half_white") |
| | | technic.register_inductive_machine("technic:homedecor_glowlight_quarter_yellow") |
| | | technic.register_inductive_machine("technic:homedecor_glowlight_quarter_white") |
| | | technic.register_inductive_machine("technic:homedecor_glowlight_small_cube_yellow") |
| | | technic.register_inductive_machine("technic:homedecor_glowlight_small_cube_white") |