sounds = default.node_sound_stone_defaults(),
})
-stairsplus.register_stair_and_slab_and_panel_and_micro("concrete", "technic:concrete",
+stairsplus.register_stair_and_slab_and_panel_and_micro(":stairsplus", "concrete", "technic:concrete",
{cracky=3},
{"technic_concrete_block.png"},
"Concrete Stairs",
})
-minetest.register_node("technic:constructor_mk1_off", {
- description = "Constructor MK1",
- tile_images = {"technic_constructor_mk1_top_off.png","technic_constructor_mk1_bottom_off.png","technic_constructor_mk1_side2_off.png","technic_constructor_mk1_side1_off.png",
- "technic_constructor_back.png","technic_constructor_front_off.png"},
- is_ground_content = true,
- paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon_receptor_off = 1, mesecon_effector_off = 1, mesecon = 2},
- sounds = default.node_sound_stone_defaults(),
- on_construct = function(pos)
- local meta = minetest.env:get_meta(pos)
- meta:set_string("formspec",
- "invsize[8,9;]"..
- "label[0,0;Constructor MK1]"..
- "label[5,0;Slot 1]"..
- "list[current_name;slot1;6,0;1,1;]"..
- "list[current_player;main;0,5;8,4;]")
- meta:set_string("infotext", "Constructor MK1")
- local inv = meta:get_inventory()
- inv:set_size("slot1", 1)
- end,
-
- can_dig = function(pos,player)
- local meta = minetest.env:get_meta(pos)
- local inv = meta:get_inventory()
- return inv:is_empty("slot1")
- end,
-})
-
-minetest.register_node("technic:constructor_mk1_on", {
- description = "Constructor MK1",
- tile_images = {"technic_constructor_mk1_top_on.png","technic_constructor_mk1_bottom_on.png","technic_constructor_mk1_side2_on.png","technic_constructor_mk1_side1_on.png",
- "technic_constructor_back.png","technic_constructor_front_on.png"},
- is_ground_content = true,
- paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon_receptor_off = 1, mesecon_effector_off = 1, mesecon = 2,not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
-})
-
-mesecon:register_on_signal_on(function(pos, node)
+mk1_on = function(pos, node)
local meta = minetest.env:get_meta(pos)
local inv = meta:get_inventory()
local pos1={}
local node1=minetest.env:get_node(pos1)
deploy_node (inv,"slot1",pos1,node1,node)
end
+end
-end)
-
-mesecon:register_on_signal_off(function(pos, node)
+mk1_off = function(pos, node)
if node.name == "technic:constructor_mk1_on" then
hacky_swap_node(pos,"technic:constructor_mk1_off")
nodeupdate(pos)
end
-end)
+end
-mesecon:register_effector("technic:constructor_mk1_on", "technic:constructor_mk1_off")
-minetest.register_node("technic:constructor_mk2_off", {
- description = "Constructor MK2",
- tile_images = {"technic_constructor_mk2_top_off.png","technic_constructor_mk2_bottom_off.png","technic_constructor_mk2_side2_off.png","technic_constructor_mk2_side1_off.png",
+minetest.register_node("technic:constructor_mk1_off", {
+ description = "Constructor MK1",
+ tile_images = {"technic_constructor_mk1_top_off.png","technic_constructor_mk1_bottom_off.png","technic_constructor_mk1_side2_off.png","technic_constructor_mk1_side1_off.png",
"technic_constructor_back.png","technic_constructor_front_off.png"},
is_ground_content = true,
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon_receptor_off = 1, mesecon_effector_off = 1, mesecon = 2},
+ mesecons= {effector={action_on=mk1_on}},
sounds = default.node_sound_stone_defaults(),
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
meta:set_string("formspec",
"invsize[8,9;]"..
- "label[0,0;Constructor MK2]"..
+ "label[0,0;Constructor MK1]"..
"label[5,0;Slot 1]"..
"list[current_name;slot1;6,0;1,1;]"..
- "label[5,1;Slot 2]"..
- "list[current_name;slot2;6,1;1,1;]"..
"list[current_player;main;0,5;8,4;]")
- meta:set_string("infotext", "Constructor MK2")
+ meta:set_string("infotext", "Constructor MK1")
local inv = meta:get_inventory()
inv:set_size("slot1", 1)
- inv:set_size("slot2", 1)
end,
can_dig = function(pos,player)
local meta = minetest.env:get_meta(pos)
local inv = meta:get_inventory()
- if inv:is_empty("slot1")==false or inv:is_empty("slot2")==false then return false end
- return true
+ return inv:is_empty("slot1")
end,
})
-minetest.register_node("technic:constructor_mk2_on", {
- description = "Constructor MK2",
- tile_images = {"technic_constructor_mk2_top_on.png","technic_constructor_mk2_bottom_on.png","technic_constructor_mk2_side2_on.png","technic_constructor_mk2_side1_on.png",
+minetest.register_node("technic:constructor_mk1_on", {
+ description = "Constructor MK1",
+ tile_images = {"technic_constructor_mk1_top_on.png","technic_constructor_mk1_bottom_on.png","technic_constructor_mk1_side2_on.png","technic_constructor_mk1_side1_on.png",
"technic_constructor_back.png","technic_constructor_front_on.png"},
is_ground_content = true,
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon_receptor_off = 1, mesecon_effector_off = 1, mesecon = 2,not_in_creative_inventory=1},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,mesecon = 2,not_in_creative_inventory=1},
+ mesecons= {effector={action_off=mk1_off}},
sounds = default.node_sound_stone_defaults(),
})
-mesecon:register_on_signal_on(function(pos, node)
+
+--Constructor MK2
+
+mk2_on = function(pos, node)
local meta = minetest.env:get_meta(pos)
local inv = meta:get_inventory()
local pos1={}
local node1=minetest.env:get_node(pos2)
deploy_node (inv,"slot2",pos2,node1,node)
end
+end
-end)
-
-
-mesecon:register_on_signal_off(function(pos, node)
+mk2_off = function(pos, node)
if node.name == "technic:constructor_mk2_on" then
hacky_swap_node(pos,"technic:constructor_mk2_off")
nodeupdate(pos)
end
-end)
-
-mesecon:register_effector("technic:constructor_mk2_on", "technic:constructor_mk2_off")
+end
-minetest.register_node("technic:constructor_mk3_off", {
- description = "Constructor MK3",
- tile_images = {"technic_constructor_mk3_top_off.png","technic_constructor_mk3_bottom_off.png","technic_constructor_mk3_side2_off.png","technic_constructor_mk3_side1_off.png",
+minetest.register_node("technic:constructor_mk2_off", {
+ description = "Constructor MK2",
+ tile_images = {"technic_constructor_mk2_top_off.png","technic_constructor_mk2_bottom_off.png","technic_constructor_mk2_side2_off.png","technic_constructor_mk2_side1_off.png",
"technic_constructor_back.png","technic_constructor_front_off.png"},
is_ground_content = true,
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon_receptor_off = 1, mesecon_effector_off = 1, mesecon = 2},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2},
+ mesecons= {effector={action_on=mk2_on}},
sounds = default.node_sound_stone_defaults(),
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
"list[current_name;slot1;6,0;1,1;]"..
"label[5,1;Slot 2]"..
"list[current_name;slot2;6,1;1,1;]"..
- "label[5,2;Slot 3]"..
- "list[current_name;slot3;6,2;1,1;]"..
- "label[5,3;Slot 4]"..
- "list[current_name;slot4;6,3;1,1;]"..
"list[current_player;main;0,5;8,4;]")
- meta:set_string("infotext", "Constructor MK3")
+ meta:set_string("infotext", "Constructor MK2")
local inv = meta:get_inventory()
inv:set_size("slot1", 1)
inv:set_size("slot2", 1)
- inv:set_size("slot3", 1)
- inv:set_size("slot4", 1)
-
end,
can_dig = function(pos,player)
local meta = minetest.env:get_meta(pos)
local inv = meta:get_inventory()
- if inv:is_empty("slot1")==false or inv:is_empty("slot2")==false or inv:is_empty("slot3")==false or inv:is_empty("slot4")==false then return false end
+ if inv:is_empty("slot1")==false or inv:is_empty("slot2")==false then return false end
return true
end,
})
-minetest.register_node("technic:constructor_mk3_on", {
- description = "Constructor MK3",
- tile_images = {"technic_constructor_mk3_top_on.png","technic_constructor_mk3_bottom_on.png","technic_constructor_mk3_side2_on.png","technic_constructor_mk3_side1_on.png",
+minetest.register_node("technic:constructor_mk2_on", {
+ description = "Constructor MK2",
+ tile_images = {"technic_constructor_mk2_top_on.png","technic_constructor_mk2_bottom_on.png","technic_constructor_mk2_side2_on.png","technic_constructor_mk2_side1_on.png",
"technic_constructor_back.png","technic_constructor_front_on.png"},
is_ground_content = true,
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon_receptor_off = 1, mesecon_effector_off = 1, mesecon = 2,not_in_creative_inventory=1},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2, not_in_creative_inventory=1},
+ mesecons= {effector={action_off=mk2_off}},
sounds = default.node_sound_stone_defaults(),
})
-mesecon:register_on_signal_on(function(pos, node)
+
+-- Constructor MK3
+mk3_on = function(pos, node)
local meta = minetest.env:get_meta(pos)
local inv = meta:get_inventory()
local node1=minetest.env:get_node(pos4)
deploy_node (inv,"slot4",pos4,node1,node)
end
+end
-end)
-
-
-mesecon:register_on_signal_off(function(pos, node)
+mk3_off = function(pos, node)
if node.name == "technic:constructor_mk3_on" then
hacky_swap_node(pos,"technic:constructor_mk3_off")
nodeupdate(pos)
end
-end)
+end
-mesecon:register_effector("technic:constructor_mk3_on", "technic:constructor_mk3_off")
+minetest.register_node("technic:constructor_mk3_off", {
+ description = "Constructor MK3",
+ tile_images = {"technic_constructor_mk3_top_off.png","technic_constructor_mk3_bottom_off.png","technic_constructor_mk3_side2_off.png","technic_constructor_mk3_side1_off.png",
+ "technic_constructor_back.png","technic_constructor_front_off.png"},
+ is_ground_content = true,
+ paramtype2 = "facedir",
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2},
+ mesecons= {effector={action_on=mk3_on}},
+ sounds = default.node_sound_stone_defaults(),
+ on_construct = function(pos)
+ local meta = minetest.env:get_meta(pos)
+ meta:set_string("formspec",
+ "invsize[8,9;]"..
+ "label[0,0;Constructor MK2]"..
+ "label[5,0;Slot 1]"..
+ "list[current_name;slot1;6,0;1,1;]"..
+ "label[5,1;Slot 2]"..
+ "list[current_name;slot2;6,1;1,1;]"..
+ "label[5,2;Slot 3]"..
+ "list[current_name;slot3;6,2;1,1;]"..
+ "label[5,3;Slot 4]"..
+ "list[current_name;slot4;6,3;1,1;]"..
+ "list[current_player;main;0,5;8,4;]")
+ meta:set_string("infotext", "Constructor MK3")
+ local inv = meta:get_inventory()
+ inv:set_size("slot1", 1)
+ inv:set_size("slot2", 1)
+ inv:set_size("slot3", 1)
+ inv:set_size("slot4", 1)
+
+ end,
+
+ can_dig = function(pos,player)
+ local meta = minetest.env:get_meta(pos)
+ local inv = meta:get_inventory()
+ if inv:is_empty("slot1")==false or inv:is_empty("slot2")==false or inv:is_empty("slot3")==false or inv:is_empty("slot4")==false then return false end
+ return true
+ end,
+})
+
+minetest.register_node("technic:constructor_mk3_on", {
+ description = "Constructor MK3",
+ tile_images = {"technic_constructor_mk3_top_on.png","technic_constructor_mk3_bottom_on.png","technic_constructor_mk3_side2_on.png","technic_constructor_mk3_side1_on.png",
+ "technic_constructor_back.png","technic_constructor_front_on.png"},
+ is_ground_content = true,
+ paramtype2 = "facedir",
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2,not_in_creative_inventory=1},
+ mesecons= {effector={action_off=mk3_off}},
+ sounds = default.node_sound_stone_defaults(),
+})
deploy_node =function (inv, slot_name, pos1, node1, node)
minetest.env:remove_node(pos1)
end
-end
\ No newline at end of file
+end
tiles = {"technic_copper_chest_top.png", "technic_copper_chest_top.png", "technic_copper_chest_side.png",
"technic_copper_chest_side.png", "technic_copper_chest_side.png", "technic_copper_chest_front.png"},
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
+ tube={insert_object=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:add_item("main",stack)
+ end,
+ can_insert=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:room_for_item("main",stack)
+ end,
+ input_inventory="main"},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)
tiles = {"technic_copper_chest_top.png", "technic_copper_chest_top.png", "technic_copper_chest_side.png",
"technic_copper_chest_side.png", "technic_copper_chest_side.png", "technic_copper_chest_locked.png"},
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
+ tube={insert_object=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:add_item("main",stack)
+ end,
+ can_insert=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:room_for_item("main",stack)
+ end,
+ input_inventory="main"},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer)
moreores
-flowers
pipeworks
mesecons
stairsplus
local load = math.floor(internal_EU_buffer/2000 * 100)
meta:set_string("formspec",
"invsize[8,9;]"..
- "background[-1,-1;10,11;technic_electric_furnace_GUI.png]"..
"image[1,1;1,2;technic_power_meter_bg.png^[lowpart:"..
(load)..":technic_power_meter_fg.png]"..
"list[current_name;src;3,1;1,1;]"..
"technic_gold_chest_side.png", "technic_gold_chest_side.png", "technic_gold_chest_front.png"},
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
+ tube={insert_object=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:add_item("main",stack)
+ end,
+ can_insert=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:room_for_item("main",stack)
+ end,
+ input_inventory="main"},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)
tiles = {"technic_gold_chest_top.png", "technic_gold_chest_top.png", "technic_gold_chest_side.png",
"technic_gold_chest_side.png", "technic_gold_chest_side.png", "technic_gold_chest_front"..state..".png"},
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, not_in_creative_inventory=1,tubedevice=1,tubedevice_receiver=1},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
+ tube={insert_object=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:add_item("main",stack)
+ end,
+ can_insert=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:room_for_item("main",stack)
+ end,
+ input_inventory="main"},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
drop = "technic:gold_chest",
paramtype2 = "facedir",
drop = "technic:gold_locked_chest",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
+ tube={insert_object=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:add_item("main",stack)
+ end,
+ can_insert=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:room_for_item("main",stack)
+ end,
+ input_inventory="main"},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer)
"technic_gold_chest_side.png", "technic_gold_chest_side.png", "technic_gold_chest_locked"..state..".png"},
paramtype2 = "facedir",
drop = "technic:gold_locked_chest",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, not_in_creative_inventory=1,tubedevice=1,tubedevice_receiver=1},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
+ tube={insert_object=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:add_item("main",stack)
+ end,
+ can_insert=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:room_for_item("main",stack)
+ end,
+ input_inventory="main"},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer)
local meta = minetest.env:get_meta(pos);
meta:set_string("formspec", "hack:sign_text_input")
end
-
\ No newline at end of file
+
-- Minetest 0.4.4 : technic
-minetest.register_alias("rebar", "technic:rebar")
-minetest.register_alias("concrete", "technic:concrete")
-minetest.register_alias("concrete_post", "technic:concrete_post")
-minetest.register_alias("iron_chest", "technic:iron_chest")
-minetest.register_alias("iron_locked_chest", "technic:iron_locked_chest")
-minetest.register_alias("copper_chest", "technic:copper_chest")
-minetest.register_alias("copper_locked_chest", "technic:copper_locked_chest")
-minetest.register_alias("silver_chest", "technic:silver_chest")
-minetest.register_alias("silver_locked_chest", "technic:silver_locked_chest")
-minetest.register_alias("gold_chest", "technic:gold_chest")
-minetest.register_alias("gold_locked_chest", "technic:gold_locked_chest")
-minetest.register_alias("mithril_chest", "technic:mithril_chest")
-minetest.register_alias("mithril_locked_chest", "technic:mithril_locked_chest")
-
-
modpath=minetest.get_modpath("technic")
--Read technic config file
dofile(modpath.."/sonic_screwdriver.lua")
-- mesecons and tubes related
-dofile(modpath.."/injector.lua")
+--dofile(modpath.."/injector.lua")
dofile(modpath.."/node_breaker.lua")
-dofile(modpath.."/deployer.lua")
+--dofile(modpath.."/deployer.lua")
dofile(modpath.."/constructor.lua")
if enable_item_drop then dofile(modpath.."/item_drop.lua") end
tiles = {"technic_iron_chest_top.png", "technic_iron_chest_top.png", "technic_iron_chest_side.png",
"technic_iron_chest_side.png", "technic_iron_chest_side.png", "technic_iron_chest_front.png"},
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
+ tube={insert_object=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:add_item("main",stack)
+ end,
+ can_insert=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:room_for_item("main",stack)
+ end,
+ input_inventory="main"},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)
tiles = {"technic_iron_chest_top.png", "technic_iron_chest_top.png", "technic_iron_chest_side.png",
"technic_iron_chest_side.png", "technic_iron_chest_side.png", "technic_iron_chest_locked.png"},
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
+ tube={insert_object=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:add_item("main",stack)
+ end,
+ can_insert=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:room_for_item("main",stack)
+ end,
+ input_inventory="main"},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer)
}
})
+node_breaker_on = function(pos, node)
+ if node.name == "technic:nodebreaker_off" then
+ hacky_swap_node(pos,"technic:nodebreaker_on")
+ break_node (pos,node.param2)
+ nodeupdate(pos)
+ end
+end
+
+node_breaker_off = function(pos, node)
+ if node.name == "technic:nodebreaker_on" then
+ hacky_swap_node(pos,"technic:nodebreaker_off")
+ nodeupdate(pos)
+ end
+end
+
minetest.register_node("technic:nodebreaker_off", {
description = "Node Breaker",
tile_images = {"technic_nodebreaker_top_off.png","technic_nodebreaker_bottom_off.png","technic_nodebreaker_side2_off.png","technic_nodebreaker_side1_off.png",
"technic_nodebreaker_back.png","technic_nodebreaker_front_off.png"},
is_ground_content = true,
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon_receptor_off = 1, mesecon_effector_off = 1, mesecon = 2,tubedevice=1},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2,tubedevice=1},
+ mesecons= {effector={action_on=node_breaker_on, action_off=node_breaker_off}},
sounds = default.node_sound_stone_defaults(),
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
description = "Node Breaker",
tile_images = {"technic_nodebreaker_top_on.png","technic_nodebreaker_bottom_on.png","technic_nodebreaker_side2_on.png","technic_nodebreaker_side1_on.png",
"technic_nodebreaker_back.png","technic_nodebreaker_front_on.png"},
+ mesecons= {effector={action_on=node_breaker_on, action_off=node_breaker_off}},
is_ground_content = true,
paramtype2 = "facedir",
- tubelike=1,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon_receptor_off = 1, mesecon_effector_off = 1, mesecon = 2,tubedevice=1,not_in_creative_inventory=1},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2,tubedevice=1,not_in_creative_inventory=1},
sounds = default.node_sound_stone_defaults(),
})
-mesecon:register_on_signal_on(function(pos, node)
- if node.name == "technic:nodebreaker_off" then
- minetest.env:add_node(pos, {name="technic:nodebreaker_on", param2 = node.param2})
- break_node (pos,node.param2)
- nodeupdate(pos)
- end
-end)
-
-mesecon:register_on_signal_off(function(pos, node)
- if node.name == "technic:nodebreaker_on" then
- minetest.env:add_node(pos, {name="technic:nodebreaker_off", param2 = node.param2})
- nodeupdate(pos)
- end
-end)
-
-mesecon:register_effector("technic:nodebreaker_on", "technic:nodebreaker_off")
function break_node (pos,n_param)
local pos1={}
if n_param==0 then pos2.z=pos2.z-1 pos1.x=pos1.z+1 z_velocity=1 end
local node=minetest.env:get_node(pos2)
- local meta = minetest.env:get_meta(pos1)
- tubelike=meta:get_int("tubelike")
- --if tubelike==1 then
if node.name == "air" then return nil end
if node.name == "default:lava_source" then return nil end
if node.name == "default:lava_flowing" then return nil end
item1:get_luaentity().start_pos = {x=pos.x,y=pos.y,z=pos.z}
item1:setvelocity({x=x_velocity, y=0, z=z_velocity})
item1:setacceleration({x=0, y=0, z=0})
--- minetest.item_drop(dropped_item, "", pos1)
end
minetest.env:remove_node(pos2)
- --end
end
sounds = default.node_sound_stone_defaults(),
})
-stairsplus.register_stair_and_slab_and_panel_and_micro("marble", "technic:marble",
+stairsplus.register_stair_and_slab_and_panel_and_micro(":stairsplus", "marble", "technic:marble",
{cracky=3},
{"technic_marble.png"},
"Marble Stairs",
"Marble Panel",
"Marble Microblock",
"marble")
-stairsplus.register_stair_and_slab_and_panel_and_micro("marble_bricks", "technic:marble_bricks",
+stairsplus.register_stair_and_slab_and_panel_and_micro(":stairsplus", "marble_bricks", "technic:marble_bricks",
{cracky=3},
{"technic_marble_bricks.png"},
"Marble Bricks Stairs",
"Marble Bricks Panel",
"Marble Bricks Microblock",
"marble_bricks")
-stairsplus.register_stair_and_slab_and_panel_and_micro("granite", "technic:granite",
+stairsplus.register_stair_and_slab_and_panel_and_micro(":stairsplus", "granite", "technic:granite",
{cracky=3},
{"technic_granite.png"},
"Granite Stairs",
"Granite Panel",
"Granite Microblock",
"granite")
-stairsplus.register_stair_and_slab_and_panel_and_micro("obsidian", "technic:obsidian",
+stairsplus.register_stair_and_slab_and_panel_and_micro(":stairsplus", "obsidian", "technic:obsidian",
{cracky=3},
{"technic_obsidian.png"},
"Obsidian Stairs",
end
end
--print("generate_ore done")
-end
\ No newline at end of file
+end
tiles = {"technic_silver_chest_top.png", "technic_silver_chest_top.png", "technic_silver_chest_side.png",
"technic_silver_chest_side.png", "technic_silver_chest_side.png", "technic_silver_chest_front.png"},
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
+ tube={insert_object=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:add_item("main",stack)
+ end,
+ can_insert=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:room_for_item("main",stack)
+ end,
+ input_inventory="main"},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)
tiles = {"technic_silver_chest_top.png", "technic_silver_chest_top.png", "technic_silver_chest_side.png",
"technic_silver_chest_side.png", "technic_silver_chest_side.png", "technic_silver_chest_locked.png"},
paramtype2 = "facedir",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
- legacy_facedir_simple = true,
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
+ tube={insert_object=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:add_item("main",stack)
+ end,
+ can_insert=function(pos,node,stack,direction)
+ local meta=minetest.env:get_meta(pos)
+ local inv=meta:get_inventory()
+ return inv:room_for_item("main",stack)
+ end,
+ input_inventory="main"},legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer)
local meta = minetest.env:get_meta(pos)