mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-22 13:52:31 +01:00
Don't allow tubing items into LV machines
This commit is contained in:
parent
bde49aca61
commit
08db41ee4d
@ -64,6 +64,20 @@ technic.register_alloy_recipe("default:copper_ingot", 2, "technic:zinc_ingot",
|
|||||||
technic.register_alloy_recipe("default:sand", 2, "technic:coal_dust", 2, "technic:silicon_wafer", 1)
|
technic.register_alloy_recipe("default:sand", 2, "technic:coal_dust", 2, "technic:silicon_wafer", 1)
|
||||||
technic.register_alloy_recipe("technic:silicon_wafer", 1, "technic:gold_dust", 1, "technic:doped_silicon_wafer", 1)
|
technic.register_alloy_recipe("technic:silicon_wafer", 1, "technic:gold_dust", 1, "technic:doped_silicon_wafer", 1)
|
||||||
|
|
||||||
|
local tube = {
|
||||||
|
insert_object = function(pos, node, stack, direction)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
return inv:add_item("src", stack)
|
||||||
|
end,
|
||||||
|
can_insert = function(pos, node, stack, direction)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
return inv:room_for_item("src", stack)
|
||||||
|
end,
|
||||||
|
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function technic.register_alloy_furnace(data)
|
function technic.register_alloy_furnace(data)
|
||||||
local tier = data.tier
|
local tier = data.tier
|
||||||
@ -71,6 +85,7 @@ function technic.register_alloy_furnace(data)
|
|||||||
|
|
||||||
local tube_side_texture = data.tube and "technic_"..ltier.."_alloy_furnace_side_tube.png"
|
local tube_side_texture = data.tube and "technic_"..ltier.."_alloy_furnace_side_tube.png"
|
||||||
or "technic_"..ltier.."_alloy_furnace_side.png"
|
or "technic_"..ltier.."_alloy_furnace_side.png"
|
||||||
|
|
||||||
local groups = {cracky=2}
|
local groups = {cracky=2}
|
||||||
local active_groups = {cracky=2, not_in_creative_inventory=1}
|
local active_groups = {cracky=2, not_in_creative_inventory=1}
|
||||||
if data.tube then
|
if data.tube then
|
||||||
@ -95,20 +110,6 @@ function technic.register_alloy_furnace(data)
|
|||||||
|
|
||||||
data.formspec = formspec
|
data.formspec = formspec
|
||||||
|
|
||||||
local tube = {
|
|
||||||
insert_object = function(pos, node, stack, direction)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
return inv:add_item("src", stack)
|
|
||||||
end,
|
|
||||||
can_insert = function(pos, node, stack, direction)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
return inv:room_for_item("src", stack)
|
|
||||||
end,
|
|
||||||
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
|
|
||||||
}
|
|
||||||
|
|
||||||
minetest.register_node("technic:"..ltier.."_alloy_furnace", {
|
minetest.register_node("technic:"..ltier.."_alloy_furnace", {
|
||||||
description = S("%s Alloy Furnace"):format(tier),
|
description = S("%s Alloy Furnace"):format(tier),
|
||||||
tiles = {"technic_"..ltier.."_alloy_furnace_top.png",
|
tiles = {"technic_"..ltier.."_alloy_furnace_top.png",
|
||||||
@ -119,7 +120,7 @@ function technic.register_alloy_furnace(data)
|
|||||||
"technic_"..ltier.."_alloy_furnace_front.png"},
|
"technic_"..ltier.."_alloy_furnace_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = groups,
|
groups = groups,
|
||||||
tube = tube,
|
tube = data.tube and tube or nil,
|
||||||
technic = data,
|
technic = data,
|
||||||
legacy_facedir_simple = true,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
@ -164,7 +165,7 @@ function technic.register_alloy_furnace(data)
|
|||||||
light_source = 8,
|
light_source = 8,
|
||||||
drop = "technic:"..ltier.."_alloy_furnace",
|
drop = "technic:"..ltier.."_alloy_furnace",
|
||||||
groups = active_groups,
|
groups = active_groups,
|
||||||
tube = tube,
|
tube = data.tube and tube or nil,
|
||||||
technic = data,
|
technic = data,
|
||||||
legacy_facedir_simple = true,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
|
|
||||||
local S = technic.getter
|
local S = technic.getter
|
||||||
|
|
||||||
function technic.register_electric_furnace(data)
|
local tube = {
|
||||||
local tier = data.tier
|
|
||||||
local ltier = string.lower(tier)
|
|
||||||
|
|
||||||
local tube_side_texture = data.tube and "technic_"..ltier.."_electric_furnace_side_tube.png"
|
|
||||||
or "technic_"..ltier.."_electric_furnace_side.png"
|
|
||||||
|
|
||||||
local tube = {
|
|
||||||
insert_object = function(pos, node, stack, direction)
|
insert_object = function(pos, node, stack, direction)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
@ -20,7 +13,23 @@ function technic.register_electric_furnace(data)
|
|||||||
return inv:room_for_item("src", stack)
|
return inv:room_for_item("src", stack)
|
||||||
end,
|
end,
|
||||||
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
|
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function technic.register_electric_furnace(data)
|
||||||
|
local tier = data.tier
|
||||||
|
local ltier = string.lower(tier)
|
||||||
|
|
||||||
|
local tube_side_texture = data.tube and "technic_"..ltier.."_electric_furnace_side_tube.png"
|
||||||
|
or "technic_"..ltier.."_electric_furnace_side.png"
|
||||||
|
|
||||||
|
local groups = {cracky=2}
|
||||||
|
local active_groups = {cracky=2, not_in_creative_inventory=1}
|
||||||
|
if data.tube then
|
||||||
|
groups.tubedevice = 1
|
||||||
|
groups.tubedevice_receiver = 1
|
||||||
|
active_groups.tubedevice = 1
|
||||||
|
active_groups.tubedevice_receiver = 1
|
||||||
|
end
|
||||||
|
|
||||||
local formspec =
|
local formspec =
|
||||||
"invsize[8,10;]"..
|
"invsize[8,10;]"..
|
||||||
@ -46,10 +55,10 @@ function technic.register_electric_furnace(data)
|
|||||||
"technic_"..ltier.."_electric_furnace_side.png",
|
"technic_"..ltier.."_electric_furnace_side.png",
|
||||||
"technic_"..ltier.."_electric_furnace_front.png"},
|
"technic_"..ltier.."_electric_furnace_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {cracky=2, tubedevice=1, tubedevice_receiver=1},
|
groups = groups,
|
||||||
legacy_facedir_simple = true,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
tube = tube,
|
tube = data.tube and tube or nil,
|
||||||
technic = data,
|
technic = data,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
@ -87,11 +96,11 @@ function technic.register_electric_furnace(data)
|
|||||||
"technic_"..ltier.."_electric_furnace_side.png",
|
"technic_"..ltier.."_electric_furnace_side.png",
|
||||||
"technic_"..ltier.."_electric_furnace_front_active.png"},
|
"technic_"..ltier.."_electric_furnace_front_active.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {cracky=2, tubedevice=1, tubedevice_receiver=1, not_in_creative_inventory=1},
|
groups = active_groups,
|
||||||
light_source = 8,
|
light_source = 8,
|
||||||
legacy_facedir_simple = true,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
tube = tube,
|
tube = data.tube and tube or nil,
|
||||||
technic = data,
|
technic = data,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
|
|
||||||
local S = technic.getter
|
local S = technic.getter
|
||||||
|
|
||||||
function technic.register_grinder(data)
|
local tube = {
|
||||||
local tier = data.tier
|
|
||||||
local ltier = string.lower(tier)
|
|
||||||
local tube = {
|
|
||||||
insert_object = function(pos, node, stack, direction)
|
insert_object = function(pos, node, stack, direction)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
@ -16,7 +13,21 @@ function technic.register_grinder(data)
|
|||||||
return inv:room_for_item("src", stack)
|
return inv:room_for_item("src", stack)
|
||||||
end,
|
end,
|
||||||
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
|
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function technic.register_grinder(data)
|
||||||
|
local tier = data.tier
|
||||||
|
local ltier = string.lower(tier)
|
||||||
|
|
||||||
|
local groups = {cracky=2}
|
||||||
|
local active_groups = {cracky=2, not_in_creative_inventory=1}
|
||||||
|
if data.tube then
|
||||||
|
groups.tubedevice = 1
|
||||||
|
groups.tubedevice_receiver = 1
|
||||||
|
active_groups.tubedevice = 1
|
||||||
|
active_groups.tubedevice_receiver = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local formspec =
|
local formspec =
|
||||||
"invsize[8,10;]"..
|
"invsize[8,10;]"..
|
||||||
@ -38,9 +49,9 @@ function technic.register_grinder(data)
|
|||||||
"technic_"..ltier.."_grinder_side.png", "technic_"..ltier.."_grinder_side.png",
|
"technic_"..ltier.."_grinder_side.png", "technic_"..ltier.."_grinder_side.png",
|
||||||
"technic_"..ltier.."_grinder_side.png", "technic_"..ltier.."_grinder_front.png"},
|
"technic_"..ltier.."_grinder_side.png", "technic_"..ltier.."_grinder_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {cracky=2, tubedevice=1, tubedevice_receiver=1},
|
groups = groups,
|
||||||
technic = data,
|
technic = data,
|
||||||
tube = tube,
|
tube = data.tube and tube or nil,
|
||||||
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)
|
||||||
@ -76,11 +87,11 @@ function technic.register_grinder(data)
|
|||||||
"technic_"..ltier.."_grinder_side.png", "technic_"..ltier.."_grinder_side.png",
|
"technic_"..ltier.."_grinder_side.png", "technic_"..ltier.."_grinder_side.png",
|
||||||
"technic_"..ltier.."_grinder_side.png", "technic_"..ltier.."_grinder_front_active.png"},
|
"technic_"..ltier.."_grinder_side.png", "technic_"..ltier.."_grinder_front_active.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {cracky=2, tubedevice=1, tubedevice_receiver=1, not_in_creative_inventory=1},
|
groups = active_groups,
|
||||||
legacy_facedir_simple = true,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
technic = data,
|
technic = data,
|
||||||
tube = tube,
|
tube = data.tube and tube or nil,
|
||||||
can_dig = function(pos,player)
|
can_dig = function(pos,player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
|
Loading…
Reference in New Issue
Block a user