forked from mtcontrib/pipeworks
add decorative tubes: one steel block embedded the other passing through an airtight pane
This commit is contained in:
parent
e9432321e9
commit
4379b1904d
79
decorative_tubes.lua
Normal file
79
decorative_tubes.lua
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
local straight = function(pos, node, velocity, stack) return {velocity} end
|
||||||
|
|
||||||
|
minetest.register_node("pipeworks:steel_block_embedded_tube", {
|
||||||
|
description = "Airtight steelblock embedded tube",
|
||||||
|
tiles = {
|
||||||
|
"default_steel_block.png", "default_steel_block.png",
|
||||||
|
"default_steel_block.png", "default_steel_block.png",
|
||||||
|
"default_steel_block.png^pipeworks_tube_connection_metallic.png",
|
||||||
|
"default_steel_block.png^pipeworks_tube_connection_metallic.png",
|
||||||
|
},
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {cracky=1, oddly_breakable_by_hand = 1, tubedevice = 1},
|
||||||
|
legacy_facedir_simple = true,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
tube = {
|
||||||
|
connect_sides = {front = 1, back = 1,},
|
||||||
|
priority = 50,
|
||||||
|
can_go = straight,
|
||||||
|
can_insert = function(pos, node, stack, direction)
|
||||||
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
return vector.equals(dir, direction) or vector.equals(vector.multiply(dir, -1), direction)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "pipeworks:steel_block_embedded_tube 1",
|
||||||
|
recipe = {
|
||||||
|
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||||
|
{ "default:steel_ingot", "pipeworks:tube_1", "default:steel_ingot" },
|
||||||
|
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
local pane_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{ -9/64, -9/64, -8/16, 9/64, 9/64, 8/16 }, -- tube
|
||||||
|
{ -8/16, -8/16, -1/16, 8/16, 8/16, 1/16 } -- pane
|
||||||
|
}
|
||||||
|
}
|
||||||
|
minetest.register_node("pipeworks:steel_pane_embedded_tube", {
|
||||||
|
drawtype = "nodebox",
|
||||||
|
description = "Airtight panel embedded tube ",
|
||||||
|
tiles = {
|
||||||
|
"pipeworks_pane_embedded_tube_sides.png^[transformR90",
|
||||||
|
"pipeworks_pane_embedded_tube_sides.png^[transformR90",
|
||||||
|
"pipeworks_pane_embedded_tube_sides.png",
|
||||||
|
"pipeworks_pane_embedded_tube_sides.png",
|
||||||
|
"pipeworks_pane_embedded_tube_ends.png", "pipeworks_pane_embedded_tube_ends.png",
|
||||||
|
},
|
||||||
|
node_box = pane_box,
|
||||||
|
selection_box = pane_box,
|
||||||
|
collision_box = pane_box,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {cracky=1, oddly_breakable_by_hand = 1, tubedevice = 1},
|
||||||
|
legacy_facedir_simple = true,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
tube = {
|
||||||
|
connect_sides = {front = 1, back = 1,},
|
||||||
|
priority = 50,
|
||||||
|
can_go = straight,
|
||||||
|
can_insert = function(pos, node, stack, direction)
|
||||||
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
return vector.equals(dir, direction) or vector.equals(vector.multiply(dir, -1), direction)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "pipeworks:steel_pane_embedded_tube 1",
|
||||||
|
recipe = {
|
||||||
|
{ "", "pipeworks:tube_1t", "" },
|
||||||
|
{ "default:steel_ingot", "pipeworks:tube_1", "default:steel_ingot" },
|
||||||
|
{ "", "pipeworks:tube_1", "" }
|
||||||
|
},
|
||||||
|
})
|
1
init.lua
1
init.lua
@ -120,6 +120,7 @@ dofile(pipeworks.modpath.."/routing_tubes.lua")
|
|||||||
dofile(pipeworks.modpath.."/sorting_tubes.lua")
|
dofile(pipeworks.modpath.."/sorting_tubes.lua")
|
||||||
dofile(pipeworks.modpath.."/vacuum_tubes.lua")
|
dofile(pipeworks.modpath.."/vacuum_tubes.lua")
|
||||||
dofile(pipeworks.modpath.."/signal_tubes.lua")
|
dofile(pipeworks.modpath.."/signal_tubes.lua")
|
||||||
|
dofile(pipeworks.modpath.."/decorative_tubes.lua")
|
||||||
dofile(pipeworks.modpath.."/filter-injector.lua")
|
dofile(pipeworks.modpath.."/filter-injector.lua")
|
||||||
dofile(pipeworks.modpath.."/trashcan.lua")
|
dofile(pipeworks.modpath.."/trashcan.lua")
|
||||||
dofile(pipeworks.modpath.."/wielder.lua")
|
dofile(pipeworks.modpath.."/wielder.lua")
|
||||||
|
BIN
textures/pipeworks_pane_embedded_tube_ends.png
Normal file
BIN
textures/pipeworks_pane_embedded_tube_ends.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
textures/pipeworks_pane_embedded_tube_sides.png
Normal file
BIN
textures/pipeworks_pane_embedded_tube_sides.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 963 B |
Loading…
Reference in New Issue
Block a user