mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-05-11 21:30:22 +02:00
* fix #150 (issue #150) * tube not tube device * tntd * embedded tube is durable * Update pane_embedded_tube.lua * Update registration.lua * Update item_transport.lua * redundant * one-way tube is tube * pipe not tube * built-in method * more deduplication * "=" → " = "
This commit is contained in:
parent
858154cb78
commit
b0496fcd41
@ -84,6 +84,7 @@ end)
|
|||||||
|
|
||||||
function pipeworks.break_tube(pos)
|
function pipeworks.break_tube(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
|
if core.get_item_group(node.name, "tube") ~= 1 then return end
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("the_tube_was", minetest.serialize(node))
|
meta:set_string("the_tube_was", minetest.serialize(node))
|
||||||
minetest.swap_node(pos, {name = "pipeworks:broken_tube_1"})
|
minetest.swap_node(pos, {name = "pipeworks:broken_tube_1"})
|
||||||
|
10
pipes.lua
10
pipes.lua
@ -37,11 +37,11 @@ for index, connects in ipairs(cconnects) do
|
|||||||
end
|
end
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1, dig_generic = 4, axey=1, handy=1, pickaxey=1}
|
local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1, dig_generic = 4, axey = 1, handy = 1, pickaxey = 1}
|
||||||
local pipedesc = S("Pipe Segment").." "..dump(connects)
|
local pipedesc = S("Pipe Segment").." "..dump(connects)
|
||||||
|
|
||||||
if #connects == 0 then
|
if #connects == 0 then
|
||||||
pgroups = {snappy = 3, tube = 1, dig_generic = 4, axey=1, handy=1, pickaxey=1}
|
pgroups = {snappy = 3, pipe = 1, dig_generic = 4, axey = 1, handy = 1, pickaxey = 1}
|
||||||
pipedesc = S("Pipe Segment")
|
pipedesc = S("Pipe Segment")
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ for index, connects in ipairs(cconnects) do
|
|||||||
},
|
},
|
||||||
groups = pgroups,
|
groups = pgroups,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
_mcl_hardness=0.8,
|
_mcl_hardness = 0.8,
|
||||||
_sound_def = {
|
_sound_def = {
|
||||||
key = "node_sound_metal_defaults",
|
key = "node_sound_metal_defaults",
|
||||||
},
|
},
|
||||||
@ -95,7 +95,7 @@ for index, connects in ipairs(cconnects) do
|
|||||||
pipenumber = index
|
pipenumber = index
|
||||||
})
|
})
|
||||||
|
|
||||||
local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1, dig_generic = 4, axey=1, handy=1, pickaxey=1}
|
local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1, dig_generic = 4, axey = 1, handy = 1, pickaxey = 1}
|
||||||
|
|
||||||
minetest.register_node("pipeworks:pipe_"..index.."_loaded", {
|
minetest.register_node("pipeworks:pipe_"..index.."_loaded", {
|
||||||
description = pipedesc,
|
description = pipedesc,
|
||||||
@ -115,7 +115,7 @@ for index, connects in ipairs(cconnects) do
|
|||||||
},
|
},
|
||||||
groups = pgroups,
|
groups = pgroups,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
_mcl_hardness=0.8,
|
_mcl_hardness = 0.8,
|
||||||
_sound_def = {
|
_sound_def = {
|
||||||
key = "node_sound_metal_defaults",
|
key = "node_sound_metal_defaults",
|
||||||
},
|
},
|
||||||
|
@ -30,7 +30,7 @@ minetest.register_node("pipeworks:steel_pane_embedded_tube", {
|
|||||||
collision_box = pane_box,
|
collision_box = pane_box,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {cracky=1, oddly_breakable_by_hand = 1, tubedevice = 1, dig_glass = 2, pickaxey=1, handy=1},
|
groups = {cracky=1, oddly_breakable_by_hand = 1, tubedevice = 1, tube = 1, dig_glass = 2, pickaxey=1, handy=1},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
_mcl_hardness=0.8,
|
_mcl_hardness=0.8,
|
||||||
legacy_facedir_simple = true,
|
legacy_facedir_simple = true,
|
||||||
|
@ -179,7 +179,7 @@ if pipeworks.enable_one_way_tube then
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
node_box = {type = "fixed",
|
node_box = {type = "fixed",
|
||||||
fixed = {{-1/2, -9/64, -9/64, 1/2, 9/64, 9/64}}},
|
fixed = {{-1/2, -9/64, -9/64, 1/2, 9/64, 9/64}}},
|
||||||
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, tubedevice = 1, axey=1, handy=1, pickaxey=1},
|
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, tubedevice = 1, tube = 1, axey=1, handy=1, pickaxey=1},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
_mcl_hardness=0.8,
|
_mcl_hardness=0.8,
|
||||||
_sound_def = {
|
_sound_def = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user