From 70d478934da3c3e846ecd882b08fc48779b7fe78 Mon Sep 17 00:00:00 2001 From: unknown <24964441+wsor4035@users.noreply.github.com> Date: Sat, 5 Mar 2022 20:04:29 -0500 Subject: [PATCH] make it boot in non mtg --- decorative_tubes.lua | 4 ++-- devices.lua | 34 +++++++++++++++++----------------- filter-injector.lua | 2 +- init.lua | 2 +- mod.conf | 5 +++-- pipes.lua | 4 ++-- routing_tubes.lua | 2 +- tube_registration.lua | 2 +- wielder.lua | 2 +- 9 files changed, 29 insertions(+), 28 deletions(-) diff --git a/decorative_tubes.lua b/decorative_tubes.lua index 308330b..4024e02 100644 --- a/decorative_tubes.lua +++ b/decorative_tubes.lua @@ -14,7 +14,7 @@ minetest.register_node("pipeworks:steel_block_embedded_tube", { paramtype2 = "facedir", groups = {cracky=1, oddly_breakable_by_hand = 1, tubedevice = 1}, legacy_facedir_simple = true, - sounds = default.node_sound_stone_defaults(), + --sounds = default.node_sound_stone_defaults(), tube = { connect_sides = {front = 1, back = 1,}, priority = 50, @@ -68,7 +68,7 @@ minetest.register_node("pipeworks:steel_pane_embedded_tube", { paramtype2 = "facedir", groups = {cracky=1, oddly_breakable_by_hand = 1, tubedevice = 1}, legacy_facedir_simple = true, - sounds = default.node_sound_stone_defaults(), + --sounds = default.node_sound_stone_defaults(), tube = { connect_sides = {front = 1, back = 1,}, priority = 50, diff --git a/devices.lua b/devices.lua index 0acbc76..10b6c66 100644 --- a/devices.lua +++ b/devices.lua @@ -148,7 +148,7 @@ for s in ipairs(states) do paramtype = "light", paramtype2 = "facedir", groups = dgroups, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, pipe_connections = { top = 1 }, after_place_node = function(pos) @@ -170,7 +170,7 @@ for s in ipairs(states) do local fdir = node.param2 minetest.swap_node(pos, { name = "pipeworks:pump_"..states[3-s], param2 = fdir }) end, - on_rotate = screwdriver.rotate_simple + on_rotate = screwdriver and screwdriver.rotate_simple or nil }) -- FIXME: this currently assumes that pumps can only rotate around the fixed axis pointing Y+. @@ -200,7 +200,7 @@ for s in ipairs(states) do fixed = { -5/16, -4/16, -8/16, 5/16, 5/16, 8/16 } }, groups = dgroups, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -248,7 +248,7 @@ minetest.register_node(nodename_valve_loaded, { fixed = { -5/16, -4/16, -8/16, 5/16, 5/16, 8/16 } }, groups = {snappy=3, pipe=1, not_in_creative_inventory=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -298,7 +298,7 @@ minetest.register_node("pipeworks:grating", { sunlight_propagates = true, paramtype = "light", groups = {snappy=3, pipe=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, pipe_connections = { top = 1 }, after_place_node = function(pos) @@ -323,7 +323,7 @@ minetest.register_node(nodename_spigot_empty, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, pipe_connections = { left=1, right=1, front=1, back=1, left_param2 = 3, right_param2 = 1, front_param2 = 2, back_param2 = 0 }, @@ -366,7 +366,7 @@ minetest.register_node(nodename_spigot_loaded, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, not_in_creative_inventory=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, pipe_connections = { left=1, right=1, front=1, back=1, left_param2 = 3, right_param2 = 1, front_param2 = 2, back_param2 = 0 }, @@ -422,7 +422,7 @@ minetest.register_node(nodename_panel_empty, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -442,7 +442,7 @@ minetest.register_node(nodename_panel_loaded, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, not_in_creative_inventory=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -472,7 +472,7 @@ minetest.register_node(nodename_sensor_empty, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -511,7 +511,7 @@ minetest.register_node(nodename_sensor_loaded, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, not_in_creative_inventory=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -578,7 +578,7 @@ for fill = 0, 10 do paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, tankfill=fill+1, not_in_creative_inventory=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, drop = "pipeworks:storage_tank_0", pipe_connections = { top = 1, bottom = 1}, @@ -606,7 +606,7 @@ for fill = 0, 10 do paramtype = "light", paramtype2 = "facedir", groups = sgroups, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, drop = "pipeworks:storage_tank_0", pipe_connections = { top = 1, bottom = 1}, @@ -633,7 +633,7 @@ minetest.register_node(nodename_fountain_empty, { sunlight_propagates = true, paramtype = "light", groups = {snappy=3, pipe=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, pipe_connections = { bottom = 1 }, after_place_node = function(pos) @@ -668,7 +668,7 @@ minetest.register_node(nodename_fountain_loaded, { sunlight_propagates = true, paramtype = "light", groups = {snappy=3, pipe=1, not_in_creative_inventory=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, pipe_connections = { bottom = 1 }, after_place_node = function(pos) @@ -718,7 +718,7 @@ minetest.register_node(nodename_sp_empty, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -740,7 +740,7 @@ minetest.register_node(nodename_sp_loaded, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, not_in_creative_inventory=1}, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) diff --git a/filter-injector.lua b/filter-injector.lua index 5ae3719..56f998c 100644 --- a/filter-injector.lua +++ b/filter-injector.lua @@ -377,7 +377,7 @@ for _, data in ipairs({ paramtype2 = "facedir", groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2}, legacy_facedir_simple = true, - sounds = default.node_sound_wood_defaults(), + --sounds = default.node_sound_wood_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) set_filter_formspec(data, meta) diff --git a/init.lua b/init.lua index beeefb7..ff72a75 100644 --- a/init.lua +++ b/init.lua @@ -137,7 +137,7 @@ dofile(pipeworks.modpath..logicdir.."flowable_node_registry_install.lua") if pipeworks.enable_pipes then dofile(pipeworks.modpath.."/pipes.lua") end if pipeworks.enable_teleport_tube then dofile(pipeworks.modpath.."/teleport_tube.lua") end if pipeworks.enable_pipe_devices then dofile(pipeworks.modpath.."/devices.lua") end -if pipeworks.enable_redefines then +if pipeworks.enable_redefines and minetest.get_modpath("default") then dofile(pipeworks.modpath.."/compat-chests.lua") dofile(pipeworks.modpath.."/compat-furnaces.lua") end diff --git a/mod.conf b/mod.conf index 17fd51c..92b6202 100644 --- a/mod.conf +++ b/mod.conf @@ -1,5 +1,6 @@ name = pipeworks description = This mod uses mesh nodes and nodeboxes to supply a complete set of 3D pipes and tubes, along with devices that work with them. -depends = default, basic_materials, screwdriver -optional_depends = mesecons, mesecons_mvps, digilines, signs_lib, unified_inventory +#depends = default, basic_materials, screwdriver +depends = basic_materials +optional_depends = mesecons, mesecons_mvps, digilines, signs_lib, unified_inventory, default, screwdriver min_minetest_version = 5.2.0 diff --git a/pipes.lua b/pipes.lua index befbbb9..d6e82a2 100644 --- a/pipes.lua +++ b/pipes.lua @@ -76,7 +76,7 @@ for index, connects in ipairs(cconnects) do fixed = outsel }, groups = pgroups, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, drop = "pipeworks:pipe_1_empty", after_place_node = function(pos) @@ -110,7 +110,7 @@ for index, connects in ipairs(cconnects) do fixed = outsel }, groups = pgroups, - sounds = default.node_sound_metal_defaults(), + --sounds = default.node_sound_metal_defaults(), walkable = true, drop = "pipeworks:pipe_1_empty", after_place_node = function(pos) diff --git a/routing_tubes.lua b/routing_tubes.lua index a99d1c3..7a9c98a 100644 --- a/routing_tubes.lua +++ b/routing_tubes.lua @@ -178,7 +178,7 @@ if pipeworks.enable_one_way_tube then node_box = {type = "fixed", 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}, - sounds = default.node_sound_wood_defaults(), + --sounds = default.node_sound_wood_defaults(), tube = { connect_sides = {left = 1, right = 1}, can_go = function(pos, node, velocity, stack) diff --git a/tube_registration.lua b/tube_registration.lua index e1859f9..12a7941 100644 --- a/tube_registration.lua +++ b/tube_registration.lua @@ -102,7 +102,7 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e fixed = outboxes }, groups = tgroups, - sounds = default.node_sound_wood_defaults(), + --sounds = default.node_sound_wood_defaults(), walkable = true, stack_max = 99, basename = name, diff --git a/wielder.lua b/wielder.lua index 22df13f..b86704f 100644 --- a/wielder.lua +++ b/wielder.lua @@ -184,7 +184,7 @@ local function register_wielder(data) paramtype2 = "facedir", tubelike = 1, groups = groups, - sounds = default.node_sound_stone_defaults(), + --sounds = default.node_sound_stone_defaults(), drop = data.name_base.."_off", on_construct = function(pos) local meta = minetest.get_meta(pos)