1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-29 23:00:49 +02:00

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:
wsor4035
2022-03-14 21:39:58 -04:00
committed by GitHub
parent 5618003be3
commit 5aa0501872
21 changed files with 466 additions and 328 deletions

View File

@ -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)