mirror of
https://github.com/minetest-mods/technic.git
synced 2024-08-21 05:54:05 +02:00
Bunch of fixes
This commit is contained in:
parent
23e1d8e0ca
commit
876218ea81
@ -73,7 +73,7 @@ minetest.register_node("technic:concrete_post", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
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},
|
{cracky=3},
|
||||||
{"technic_concrete_block.png"},
|
{"technic_concrete_block.png"},
|
||||||
"Concrete Stairs",
|
"Concrete Stairs",
|
||||||
|
@ -19,6 +19,34 @@ minetest.register_craft({
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mk1_on = function(pos, node)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
local pos1={}
|
||||||
|
pos1.x=pos.x
|
||||||
|
pos1.y=pos.y
|
||||||
|
pos1.z=pos.z
|
||||||
|
if node.param2==3 then pos1.x=pos1.x+1 end
|
||||||
|
if node.param2==2 then pos1.z=pos1.z+1 end
|
||||||
|
if node.param2==1 then pos1.x=pos1.x-1 end
|
||||||
|
if node.param2==0 then pos1.z=pos1.z-1 end
|
||||||
|
|
||||||
|
if node.name == "technic:constructor_mk1_off" then
|
||||||
|
hacky_swap_node(pos,"technic:constructor_mk1_on")
|
||||||
|
nodeupdate(pos)
|
||||||
|
local node1=minetest.env:get_node(pos1)
|
||||||
|
deploy_node (inv,"slot1",pos1,node1,node)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("technic:constructor_mk1_off", {
|
minetest.register_node("technic:constructor_mk1_off", {
|
||||||
description = "Constructor MK1",
|
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",
|
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",
|
||||||
@ -26,6 +54,7 @@ minetest.register_node("technic:constructor_mk1_off", {
|
|||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
paramtype2 = "facedir",
|
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_receptor_off = 1, mesecon_effector_off = 1, mesecon = 2},
|
||||||
|
mesecons= {effector={action_on=mk1_on}},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.env:get_meta(pos)
|
||||||
@ -53,39 +82,46 @@ minetest.register_node("technic:constructor_mk1_on", {
|
|||||||
"technic_constructor_back.png","technic_constructor_front_on.png"},
|
"technic_constructor_back.png","technic_constructor_front_on.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
paramtype2 = "facedir",
|
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(),
|
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 meta = minetest.env:get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
local pos1={}
|
local pos1={}
|
||||||
|
local pos2={}
|
||||||
pos1.x=pos.x
|
pos1.x=pos.x
|
||||||
pos1.y=pos.y
|
pos1.y=pos.y
|
||||||
pos1.z=pos.z
|
pos1.z=pos.z
|
||||||
if node.param2==3 then pos1.x=pos1.x+1 end
|
pos2.x=pos.x
|
||||||
if node.param2==2 then pos1.z=pos1.z+1 end
|
pos2.y=pos.y
|
||||||
if node.param2==1 then pos1.x=pos1.x-1 end
|
pos2.z=pos.z
|
||||||
if node.param2==0 then pos1.z=pos1.z-1 end
|
if node.param2==3 then pos1.x=pos1.x+1 pos2.x=pos2.x+2 end
|
||||||
|
if node.param2==2 then pos1.z=pos1.z+1 pos2.z=pos2.z+2 end
|
||||||
|
if node.param2==1 then pos1.x=pos1.x-1 pos2.x=pos2.x-2 end
|
||||||
|
if node.param2==0 then pos1.z=pos1.z-1 pos2.z=pos2.z-2 end
|
||||||
|
|
||||||
if node.name == "technic:constructor_mk1_off" then
|
if node.name == "technic:constructor_mk2_off" then
|
||||||
hacky_swap_node(pos,"technic:constructor_mk1_on")
|
hacky_swap_node(pos,"technic:constructor_mk2_on")
|
||||||
nodeupdate(pos)
|
nodeupdate(pos)
|
||||||
local node1=minetest.env:get_node(pos1)
|
local node1=minetest.env:get_node(pos1)
|
||||||
deploy_node (inv,"slot1",pos1,node1,node)
|
deploy_node (inv,"slot1",pos1,node1,node)
|
||||||
|
local node1=minetest.env:get_node(pos2)
|
||||||
|
deploy_node (inv,"slot2",pos2,node1,node)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end)
|
mk2_off = function(pos, node)
|
||||||
|
if node.name == "technic:constructor_mk2_on" then
|
||||||
mesecon:register_on_signal_off(function(pos, node)
|
hacky_swap_node(pos,"technic:constructor_mk2_off")
|
||||||
if node.name == "technic:constructor_mk1_on" then
|
|
||||||
hacky_swap_node(pos,"technic:constructor_mk1_off")
|
|
||||||
nodeupdate(pos)
|
nodeupdate(pos)
|
||||||
end
|
end
|
||||||
end)
|
end
|
||||||
|
|
||||||
mesecon:register_effector("technic:constructor_mk1_on", "technic:constructor_mk1_off")
|
|
||||||
|
|
||||||
minetest.register_node("technic:constructor_mk2_off", {
|
minetest.register_node("technic:constructor_mk2_off", {
|
||||||
description = "Constructor MK2",
|
description = "Constructor MK2",
|
||||||
@ -93,7 +129,8 @@ minetest.register_node("technic:constructor_mk2_off", {
|
|||||||
"technic_constructor_back.png","technic_constructor_front_off.png"},
|
"technic_constructor_back.png","technic_constructor_front_off.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
paramtype2 = "facedir",
|
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(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.env:get_meta(pos)
|
||||||
@ -125,97 +162,14 @@ minetest.register_node("technic:constructor_mk2_on", {
|
|||||||
"technic_constructor_back.png","technic_constructor_front_on.png"},
|
"technic_constructor_back.png","technic_constructor_front_on.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
paramtype2 = "facedir",
|
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(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
mesecon:register_on_signal_on(function(pos, node)
|
|
||||||
local meta = minetest.env:get_meta(pos)
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
local pos1={}
|
|
||||||
local pos2={}
|
|
||||||
pos1.x=pos.x
|
|
||||||
pos1.y=pos.y
|
|
||||||
pos1.z=pos.z
|
|
||||||
pos2.x=pos.x
|
|
||||||
pos2.y=pos.y
|
|
||||||
pos2.z=pos.z
|
|
||||||
if node.param2==3 then pos1.x=pos1.x+1 pos2.x=pos2.x+2 end
|
|
||||||
if node.param2==2 then pos1.z=pos1.z+1 pos2.z=pos2.z+2 end
|
|
||||||
if node.param2==1 then pos1.x=pos1.x-1 pos2.x=pos2.x-2 end
|
|
||||||
if node.param2==0 then pos1.z=pos1.z-1 pos2.z=pos2.z-2 end
|
|
||||||
|
|
||||||
if node.name == "technic:constructor_mk2_off" then
|
-- Constructor MK3
|
||||||
hacky_swap_node(pos,"technic:constructor_mk2_on")
|
mk3_on = function(pos, node)
|
||||||
nodeupdate(pos)
|
|
||||||
local node1=minetest.env:get_node(pos1)
|
|
||||||
deploy_node (inv,"slot1",pos1,node1,node)
|
|
||||||
local node1=minetest.env:get_node(pos2)
|
|
||||||
deploy_node (inv,"slot2",pos2,node1,node)
|
|
||||||
end
|
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
|
|
||||||
mesecon:register_on_signal_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")
|
|
||||||
|
|
||||||
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_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 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_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)
|
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.env:get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
|
|
||||||
@ -257,18 +211,65 @@ mesecon:register_on_signal_on(function(pos, node)
|
|||||||
local node1=minetest.env:get_node(pos4)
|
local node1=minetest.env:get_node(pos4)
|
||||||
deploy_node (inv,"slot4",pos4,node1,node)
|
deploy_node (inv,"slot4",pos4,node1,node)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end)
|
mk3_off = function(pos, node)
|
||||||
|
|
||||||
|
|
||||||
mesecon:register_on_signal_off(function(pos, node)
|
|
||||||
if node.name == "technic:constructor_mk3_on" then
|
if node.name == "technic:constructor_mk3_on" then
|
||||||
hacky_swap_node(pos,"technic:constructor_mk3_off")
|
hacky_swap_node(pos,"technic:constructor_mk3_off")
|
||||||
nodeupdate(pos)
|
nodeupdate(pos)
|
||||||
end
|
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)
|
deploy_node =function (inv, slot_name, pos1, node1, node)
|
||||||
@ -294,4 +295,4 @@ if node1.name == "air" then
|
|||||||
minetest.env:remove_node(pos1)
|
minetest.env:remove_node(pos1)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -38,7 +38,18 @@ minetest.register_node("technic:copper_chest", {
|
|||||||
tiles = {"technic_copper_chest_top.png", "technic_copper_chest_top.png", "technic_copper_chest_side.png",
|
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"},
|
"technic_copper_chest_side.png", "technic_copper_chest_side.png", "technic_copper_chest_front.png"},
|
||||||
paramtype2 = "facedir",
|
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,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
@ -89,7 +100,18 @@ minetest.register_node("technic:copper_locked_chest", {
|
|||||||
tiles = {"technic_copper_chest_top.png", "technic_copper_chest_top.png", "technic_copper_chest_side.png",
|
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"},
|
"technic_copper_chest_side.png", "technic_copper_chest_side.png", "technic_copper_chest_locked.png"},
|
||||||
paramtype2 = "facedir",
|
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,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
moreores
|
moreores
|
||||||
flowers
|
|
||||||
pipeworks
|
pipeworks
|
||||||
mesecons
|
mesecons
|
||||||
stairsplus
|
stairsplus
|
||||||
|
@ -107,7 +107,6 @@ minetest.register_abm({
|
|||||||
local load = math.floor(internal_EU_buffer/2000 * 100)
|
local load = math.floor(internal_EU_buffer/2000 * 100)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"invsize[8,9;]"..
|
"invsize[8,9;]"..
|
||||||
"background[-1,-1;10,11;technic_electric_furnace_GUI.png]"..
|
|
||||||
"image[1,1;1,2;technic_power_meter_bg.png^[lowpart:"..
|
"image[1,1;1,2;technic_power_meter_bg.png^[lowpart:"..
|
||||||
(load)..":technic_power_meter_fg.png]"..
|
(load)..":technic_power_meter_fg.png]"..
|
||||||
"list[current_name;src;3,1;1,1;]"..
|
"list[current_name;src;3,1;1,1;]"..
|
||||||
|
@ -57,6 +57,17 @@ minetest.register_node("technic:gold_chest", {
|
|||||||
"technic_gold_chest_side.png", "technic_gold_chest_side.png", "technic_gold_chest_front.png"},
|
"technic_gold_chest_side.png", "technic_gold_chest_side.png", "technic_gold_chest_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,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,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
@ -117,7 +128,18 @@ minetest.register_node("technic:gold_chest".. state, {
|
|||||||
tiles = {"technic_gold_chest_top.png", "technic_gold_chest_top.png", "technic_gold_chest_side.png",
|
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"},
|
"technic_gold_chest_side.png", "technic_gold_chest_side.png", "technic_gold_chest_front"..state..".png"},
|
||||||
paramtype2 = "facedir",
|
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,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
drop = "technic:gold_chest",
|
drop = "technic:gold_chest",
|
||||||
@ -189,6 +211,17 @@ minetest.register_node("technic:gold_locked_chest", {
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
drop = "technic:gold_locked_chest",
|
drop = "technic:gold_locked_chest",
|
||||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,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,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
@ -287,7 +320,18 @@ minetest.register_node("technic:gold_locked_chest".. state, {
|
|||||||
"technic_gold_chest_side.png", "technic_gold_chest_side.png", "technic_gold_chest_locked"..state..".png"},
|
"technic_gold_chest_side.png", "technic_gold_chest_side.png", "technic_gold_chest_locked"..state..".png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
drop = "technic:gold_locked_chest",
|
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,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
@ -608,4 +652,4 @@ function locked_chest_punched (pos,node,puncher)
|
|||||||
local meta = minetest.env:get_meta(pos);
|
local meta = minetest.env:get_meta(pos);
|
||||||
meta:set_string("formspec", "hack:sign_text_input")
|
meta:set_string("formspec", "hack:sign_text_input")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,20 +1,5 @@
|
|||||||
-- Minetest 0.4.4 : technic
|
-- 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")
|
modpath=minetest.get_modpath("technic")
|
||||||
|
|
||||||
--Read technic config file
|
--Read technic config file
|
||||||
@ -64,9 +49,9 @@ dofile(modpath.."/screwdriver.lua")
|
|||||||
dofile(modpath.."/sonic_screwdriver.lua")
|
dofile(modpath.."/sonic_screwdriver.lua")
|
||||||
|
|
||||||
-- mesecons and tubes related
|
-- mesecons and tubes related
|
||||||
dofile(modpath.."/injector.lua")
|
--dofile(modpath.."/injector.lua")
|
||||||
dofile(modpath.."/node_breaker.lua")
|
dofile(modpath.."/node_breaker.lua")
|
||||||
dofile(modpath.."/deployer.lua")
|
--dofile(modpath.."/deployer.lua")
|
||||||
dofile(modpath.."/constructor.lua")
|
dofile(modpath.."/constructor.lua")
|
||||||
|
|
||||||
if enable_item_drop then dofile(modpath.."/item_drop.lua") end
|
if enable_item_drop then dofile(modpath.."/item_drop.lua") end
|
||||||
|
@ -41,7 +41,18 @@ minetest.register_node("technic:iron_chest", {
|
|||||||
tiles = {"technic_iron_chest_top.png", "technic_iron_chest_top.png", "technic_iron_chest_side.png",
|
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"},
|
"technic_iron_chest_side.png", "technic_iron_chest_side.png", "technic_iron_chest_front.png"},
|
||||||
paramtype2 = "facedir",
|
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,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
@ -90,7 +101,18 @@ minetest.register_node("technic:iron_locked_chest", {
|
|||||||
tiles = {"technic_iron_chest_top.png", "technic_iron_chest_top.png", "technic_iron_chest_side.png",
|
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"},
|
"technic_iron_chest_side.png", "technic_iron_chest_side.png", "technic_iron_chest_locked.png"},
|
||||||
paramtype2 = "facedir",
|
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,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
|
@ -8,13 +8,29 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
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", {
|
minetest.register_node("technic:nodebreaker_off", {
|
||||||
description = "Node Breaker",
|
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",
|
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"},
|
"technic_nodebreaker_back.png","technic_nodebreaker_front_off.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
paramtype2 = "facedir",
|
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(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.env:get_meta(pos)
|
||||||
@ -26,29 +42,13 @@ minetest.register_node("technic:nodebreaker_on", {
|
|||||||
description = "Node Breaker",
|
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",
|
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"},
|
"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,
|
is_ground_content = true,
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
tubelike=1,
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2,tubedevice=1,not_in_creative_inventory=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},
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
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)
|
function break_node (pos,n_param)
|
||||||
local pos1={}
|
local pos1={}
|
||||||
@ -70,9 +70,6 @@ function break_node (pos,n_param)
|
|||||||
if n_param==0 then pos2.z=pos2.z-1 pos1.x=pos1.z+1 z_velocity=1 end
|
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 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 == "air" then return nil end
|
||||||
if node.name == "default:lava_source" then return nil end
|
if node.name == "default:lava_source" then return nil end
|
||||||
if node.name == "default:lava_flowing" then return nil end
|
if node.name == "default:lava_flowing" then return nil end
|
||||||
@ -86,9 +83,7 @@ function break_node (pos,n_param)
|
|||||||
item1:get_luaentity().start_pos = {x=pos.x,y=pos.y,z=pos.z}
|
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:setvelocity({x=x_velocity, y=0, z=z_velocity})
|
||||||
item1:setacceleration({x=0, y=0, z=0})
|
item1:setacceleration({x=0, y=0, z=0})
|
||||||
-- minetest.item_drop(dropped_item, "", pos1)
|
|
||||||
end
|
end
|
||||||
minetest.env:remove_node(pos2)
|
minetest.env:remove_node(pos2)
|
||||||
--end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ minetest.register_node( "technic:obsidian", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
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},
|
{cracky=3},
|
||||||
{"technic_marble.png"},
|
{"technic_marble.png"},
|
||||||
"Marble Stairs",
|
"Marble Stairs",
|
||||||
@ -46,7 +46,7 @@ stairsplus.register_stair_and_slab_and_panel_and_micro("marble", "technic:marble
|
|||||||
"Marble Panel",
|
"Marble Panel",
|
||||||
"Marble Microblock",
|
"Marble Microblock",
|
||||||
"marble")
|
"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},
|
{cracky=3},
|
||||||
{"technic_marble_bricks.png"},
|
{"technic_marble_bricks.png"},
|
||||||
"Marble Bricks Stairs",
|
"Marble Bricks Stairs",
|
||||||
@ -54,7 +54,7 @@ stairsplus.register_stair_and_slab_and_panel_and_micro("marble_bricks", "technic
|
|||||||
"Marble Bricks Panel",
|
"Marble Bricks Panel",
|
||||||
"Marble Bricks Microblock",
|
"Marble Bricks Microblock",
|
||||||
"marble_bricks")
|
"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},
|
{cracky=3},
|
||||||
{"technic_granite.png"},
|
{"technic_granite.png"},
|
||||||
"Granite Stairs",
|
"Granite Stairs",
|
||||||
@ -62,7 +62,7 @@ stairsplus.register_stair_and_slab_and_panel_and_micro("granite", "technic:grani
|
|||||||
"Granite Panel",
|
"Granite Panel",
|
||||||
"Granite Microblock",
|
"Granite Microblock",
|
||||||
"granite")
|
"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},
|
{cracky=3},
|
||||||
{"technic_obsidian.png"},
|
{"technic_obsidian.png"},
|
||||||
"Obsidian Stairs",
|
"Obsidian Stairs",
|
||||||
@ -336,4 +336,4 @@ function generate_stratus(name, wherein, ceilin, ceil, minp, maxp, seed, stratus
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
--print("generate_ore done")
|
--print("generate_ore done")
|
||||||
end
|
end
|
||||||
|
@ -38,7 +38,18 @@ minetest.register_node("technic:silver_chest", {
|
|||||||
tiles = {"technic_silver_chest_top.png", "technic_silver_chest_top.png", "technic_silver_chest_side.png",
|
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"},
|
"technic_silver_chest_side.png", "technic_silver_chest_side.png", "technic_silver_chest_front.png"},
|
||||||
paramtype2 = "facedir",
|
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,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
@ -106,8 +117,18 @@ minetest.register_node("technic:silver_locked_chest", {
|
|||||||
tiles = {"technic_silver_chest_top.png", "technic_silver_chest_top.png", "technic_silver_chest_side.png",
|
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"},
|
"technic_silver_chest_side.png", "technic_silver_chest_side.png", "technic_silver_chest_locked.png"},
|
||||||
paramtype2 = "facedir",
|
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},
|
||||||
legacy_facedir_simple = true,
|
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(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
Loading…
Reference in New Issue
Block a user