forked from mtcontrib/pipeworks
make pipeworks Game agnostic (#16)
* make it boot in non mtg * make water flow * fix water texture warnings * fix missing steel texture issues * remove depreciated/unnessary default function calls * make sounds work * fix default formspec crashes * fix wierd tab spacing * additionally game dig group support * move crafts to crafts.lua * make crafts support various games
This commit is contained in:
14
pipes.lua
14
pipes.lua
@ -37,11 +37,11 @@ for index, connects in ipairs(cconnects) do
|
||||
end
|
||||
--]]
|
||||
|
||||
local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1}
|
||||
local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1, dig_generic = 4}
|
||||
local pipedesc = S("Pipe Segment").." "..dump(connects)
|
||||
|
||||
if #connects == 0 then
|
||||
pgroups = {snappy = 3, tube = 1}
|
||||
pgroups = {snappy = 3, tube = 1, dig_generic = 4}
|
||||
pipedesc = S("Pipe Segment")
|
||||
end
|
||||
|
||||
@ -76,7 +76,9 @@ for index, connects in ipairs(cconnects) do
|
||||
fixed = outsel
|
||||
},
|
||||
groups = pgroups,
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
_sound_def = {
|
||||
key = "node_sound_metal_defaults",
|
||||
},
|
||||
walkable = true,
|
||||
drop = "pipeworks:pipe_1_empty",
|
||||
after_place_node = function(pos)
|
||||
@ -91,7 +93,7 @@ for index, connects in ipairs(cconnects) do
|
||||
pipenumber = index
|
||||
})
|
||||
|
||||
local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1}
|
||||
local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1, dig_generic = 4}
|
||||
|
||||
minetest.register_node("pipeworks:pipe_"..index.."_loaded", {
|
||||
description = pipedesc,
|
||||
@ -110,7 +112,9 @@ for index, connects in ipairs(cconnects) do
|
||||
fixed = outsel
|
||||
},
|
||||
groups = pgroups,
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
_sound_def = {
|
||||
key = "node_sound_metal_defaults",
|
||||
},
|
||||
walkable = true,
|
||||
drop = "pipeworks:pipe_1_empty",
|
||||
after_place_node = function(pos)
|
||||
|
Reference in New Issue
Block a user