2018-04-08 14:11:39 +00:00
|
|
|
-- holostorage cabling
|
2018-04-07 15:27:34 +00:00
|
|
|
|
2018-04-08 14:11:39 +00:00
|
|
|
minetest.register_node("holostorage:cable", {
|
2018-04-07 15:27:34 +00:00
|
|
|
description = "Storage Cable",
|
|
|
|
drawtype = "nodebox",
|
2018-04-08 14:11:39 +00:00
|
|
|
tiles = {"holostorage_cable.png"},
|
2018-04-07 15:27:34 +00:00
|
|
|
node_box = {
|
|
|
|
type = "connected",
|
|
|
|
fixed = {{-1/8, -1/8, -1/8, 1/8, 1/8, 1/8}},
|
|
|
|
connect_front = {
|
|
|
|
{-1/8, -1/8, -1/2, 1/8, 1/8, -1/8}
|
|
|
|
},
|
|
|
|
connect_back = {
|
|
|
|
{-1/8, -1/8, 1/8, 1/8, 1/8, 1/2}
|
|
|
|
},
|
|
|
|
connect_top = {
|
|
|
|
{-1/8, 1/8, -1/8, 1/8, 1/2, 1/8}
|
|
|
|
},
|
|
|
|
connect_bottom = {
|
|
|
|
{-1/8, -1/2, -1/8, 1/8, -1/8, 1/8}
|
|
|
|
},
|
|
|
|
connect_left = {
|
|
|
|
{-1/2, -1/8, -1/8, 1/8, 1/8, 1/8}
|
|
|
|
},
|
|
|
|
connect_right = {
|
|
|
|
{1/8, -1/8, -1/8, 1/2, 1/8, 1/8}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
connect_sides = { "top", "bottom", "front", "left", "back", "right" },
|
|
|
|
is_ground_content = false,
|
|
|
|
connects_to = {
|
2018-04-08 14:11:39 +00:00
|
|
|
"group:holostorage_controller",
|
|
|
|
"group:holostorage_distributor",
|
|
|
|
"group:holostorage_cable",
|
2018-04-07 15:27:34 +00:00
|
|
|
},
|
|
|
|
groups = {
|
2018-04-08 14:11:39 +00:00
|
|
|
holostorage_distributor = 1,
|
|
|
|
holostorage_cable = 1,
|
2018-04-07 15:27:34 +00:00
|
|
|
cracky = 2,
|
|
|
|
oddly_breakable_by_hand = 2
|
|
|
|
},
|
|
|
|
on_construct = function (pos)
|
2018-04-08 14:11:39 +00:00
|
|
|
holostorage.network.clear_networks(pos)
|
2018-04-07 15:27:34 +00:00
|
|
|
end,
|
2018-04-09 09:01:17 +00:00
|
|
|
after_dig_node = holostorage.network.clear_networks,
|
2018-04-07 15:27:34 +00:00
|
|
|
})
|